dotbot.dotbot_simulator module#
Dotbot simulator for the DotBot project.
- class dotbot.dotbot_simulator.DotBotSimulator(settings)[source]#
Bases:
ThreadSimulator class for the dotbot.
- Parameters:
settings (SimulatedDotBotSettings)
- handle_frame(frame)[source]#
Decode the serial input received from the gateway.
- Parameters:
frame (Frame)
- property header#
- class dotbot.dotbot_simulator.DotBotSimulatorCommunicationInterface(on_frame_received, simulator_init_state_path)[source]#
Bases:
ThreadBidirectional serial interface to control simulated robots
- Parameters:
on_frame_received (Callable)
simulator_init_state_path (str)
- class dotbot.dotbot_simulator.DotBotSimulatorMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
EnumOperation mode of the dotbot simulator.
- AUTOMATIC = 'AUTOMATIC'#
- MANUAL = 'MANUAL'#
- class dotbot.dotbot_simulator.InitStateToml(*, dotbots, network=SimulatedNetworkSettings(pdr=100))[source]#
Bases:
BaseModel- Parameters:
dotbots (List[SimulatedDotBotSettings])
network (SimulatedNetworkSettings)
- dotbots: List[SimulatedDotBotSettings]#
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- network: SimulatedNetworkSettings#
- class dotbot.dotbot_simulator.SimulatedDotBotSettings(*, address, pos_x, pos_y, theta, calibrated=True, motor_left_error=0.5, motor_right_error=0)[source]#
Bases:
BaseModel- Parameters:
address (str)
pos_x (int)
pos_y (int)
theta (float)
calibrated (bool)
motor_left_error (float)
motor_right_error (float)
- address: str#
- calibrated: bool#
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- motor_left_error: float#
- motor_right_error: float#
- pos_x: int#
- pos_y: int#
- theta: float#
- class dotbot.dotbot_simulator.SimulatedNetworkSettings(*, pdr=100)[source]#
Bases:
BaseModel- Parameters:
pdr (int)
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- pdr: int#