dotbot.controller module#
Interface of the Dotbot controller.
- exception dotbot.controller.ControllerException[source]#
Bases:
ExceptionException raised by Dotbot controllers.
- class dotbot.controller.Controller(settings)[source]#
Bases:
objectAbstract base class of specific implementations of Dotbot controllers.
- Parameters:
settings (ControllerSettings) –
- get_dotbots(query)[source]#
Returns the list of dotbots matching the query.
- Parameters:
query (DotBotQueryModel) –
- Return type:
List[DotBotModel]
- handle_received_payload(payload)[source]#
Handle a received payload.
- Parameters:
payload (ProtocolPayload) –
- on_command_clear_position_history(topic, _)[source]#
Called when a clear position history command is received.
- send_payload(payload)[source]#
Sends a command in an HDLC frame over serial.
- Parameters:
payload (ProtocolPayload) –
- class dotbot.controller.ControllerSettings(port, baudrate, dotbot_address, gw_address, swarm_id, controller_port='8000', webbrowser=False, handshake=False, verbose=False)[source]#
Bases:
objectData class that holds controller settings.
- Parameters:
port (str) –
baudrate (int) –
dotbot_address (str) –
gw_address (str) –
swarm_id (str) –
controller_port (int) –
webbrowser (bool) –
handshake (bool) –
verbose (bool) –
- baudrate: int#
- controller_port: int = '8000'#
- dotbot_address: str#
- gw_address: str#
- handshake: bool = False#
- port: str#
- swarm_id: str#
- verbose: bool = False#
- webbrowser: bool = False#
- dotbot.controller.gps_distance(last, new)[source]#
Helper function that computes the distance between 2 GPS positions in m.
- Parameters:
last (DotBotGPSPosition) –
new (DotBotGPSPosition) –
- Return type:
float
- dotbot.controller.lh2_distance(last, new)[source]#
Helper function that computes the distance between 2 LH2 positions.
- Parameters:
last (DotBotLH2Position) –
new (DotBotLH2Position) –
- Return type:
float