Interfaces
Common interface definitions
AdapterProtocol
Bases: Protocol
interface for communication bridge
Source code in roxbot/interfaces.py
79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
|
main()
async
main loop for the bridge
Source code in roxbot/interfaces.py
91 92 |
|
publish(topic, msg)
async
send a message to a topic
Source code in roxbot/interfaces.py
82 83 |
|
register_callback(topic, callback)
async
register a callback for a topic, subscribe to topic if required
Source code in roxbot/interfaces.py
85 86 |
|
remove_callback(topic)
async
remove callback for a topic and unsubscribe if required
Source code in roxbot/interfaces.py
88 89 |
|
HeadingData
Bases: NamedTuple
heading data
Source code in roxbot/interfaces.py
44 45 46 47 48 49 50 51 52 53 |
|
MachineProtocol
Bases: Protocol
generic machine interface, provides a uniform interface for different machine types such as trikes, differential drives, etc.
Source code in roxbot/interfaces.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
|
cmd_curvature(v_linear, curvature)
motion command by curvature
Parameters:
Name | Type | Description | Default |
---|---|---|---|
v_linear |
float
|
driving velocity |
required |
curvature |
float
|
driving curvature (1/radius) |
required |
Source code in roxbot/interfaces.py
70 71 72 73 74 75 76 |
|
cmd_vel(linear_velocity, angular_velocity)
send velocity commands to the machine
Source code in roxbot/interfaces.py
67 68 |
|
get_pose()
return current pose (x, y, theta), in meters. Pose class provides a method for converting to GPS coordinates.
Source code in roxbot/interfaces.py
63 64 65 |
|
Pose
Bases: NamedTuple
Represents a pose in 2D space
Source code in roxbot/interfaces.py
12 13 14 15 16 17 18 19 20 21 |
|
PositionData
Bases: NamedTuple
latitude and longitude data
Source code in roxbot/interfaces.py
29 30 31 32 33 34 35 36 37 38 39 40 41 |
|