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]
- on_command_clear_position_history(topic, _)[source]#
Called when a clear position history command is received.
- on_message(_, topic, payload, qos, properties)[source]#
Called when a message is received from the controller.
- class dotbot.controller.ControllerSettings(port, baudrate, dotbot_address, gw_address, swarm_id, controller_port='8000', webbrowser=False, handshake=False, edge=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)
edge (bool)
verbose (bool)
- baudrate: int#
- controller_port: int = '8000'#
- dotbot_address: str#
- edge: bool = False#
- 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