dotbot.controller module#
Interface of the Dotbot controller.
- exception dotbot.controller.ControllerException[source]#
Bases:
ExceptionException raised by Dotbot controllers.
- class dotbot.controller.CalibrationHomography(homography_matrix=<factory>)[source]#
Bases:
objectDataclass that holds computed LH2 homography for a basestation indicated by index.
- Parameters:
homography_matrix (bytes)
- homography_matrix: bytes#
- 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]
- class dotbot.controller.ControllerSettings(adapter='serial', port='/dev/ttyACM0', baudrate=1000000, mqtt_host='localhost', mqtt_port=1883, mqtt_use_tls=False, mqtt_username=None, mqtt_password=None, gw_address='0000000000000000', network_id='0000', controller_http_port=8000, map_size='2000x2000', background_map='', webbrowser=False, verbose=False, log_level='info', log_output='/home/docs/checkouts/readthedocs.org/user_builds/pydotbot/checkouts/0.29.0rc2/doc/pydotbot.log', csv_data_output=None, simulator_init_state='simulator_init_state.toml')[source]#
Bases:
objectData class that holds controller settings.
- Parameters:
adapter (str)
port (str)
baudrate (int)
mqtt_host (str)
mqtt_port (int)
mqtt_use_tls (bool)
mqtt_username (str | None)
mqtt_password (str | None)
gw_address (str)
network_id (str)
controller_http_port (int)
map_size (str)
background_map (str)
webbrowser (bool)
verbose (bool)
log_level (str)
log_output (str)
csv_data_output (str | None)
simulator_init_state (str)
- adapter: str = 'serial'#
- background_map: str = ''#
- baudrate: int = 1000000#
- controller_http_port: int = 8000#
- csv_data_output: str | None = None#
- gw_address: str = '0000000000000000'#
- log_level: str = 'info'#
- log_output: str = '/home/docs/checkouts/readthedocs.org/user_builds/pydotbot/checkouts/0.29.0rc2/doc/pydotbot.log'#
- map_size: str = '2000x2000'#
- mqtt_host: str = 'localhost'#
- mqtt_password: str | None = None#
- mqtt_port: int = 1883#
- mqtt_use_tls: bool = False#
- mqtt_username: str | None = None#
- network_id: str = '0000'#
- port: str = '/dev/ttyACM0'#
- simulator_init_state: str = 'simulator_init_state.toml'#
- 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
- dotbot.controller.load_calibration()[source]#
- Return type:
list[CalibrationHomography]