MoveCommand¶
- class pyniryo_nate.components.MoveCommand(robot: Robot, command_id: str, timeout: float, callbacks: List[Callable[[MoveFeedback], None]])[source]¶
Bases:
BaseCommandRepresents a move command and tracks its execution progress.
This class monitors the state of a robot movement operation, receiving feedback through MQTT and allowing you to wait for completion.
Attributes
command_idGet the command ID of the command.
Get the current state of the move command.
Methods
- Parameters:
robot (Robot)
command_id (str)
timeout (float)
callbacks (List[Callable[[MoveFeedback], None]])
- property state: MoveState¶
Get the current state of the move command.
- Returns:
The current state of the move command.
- wait() None[source]¶
Wait for the move command to complete. A timeout of zero or less waits indefinitely. The timeout counts from the moment the command was sent. A paused move keeps waiting until it is resumed.
- Raises:
TimeoutError – If the timeout is exceeded.
PyNiryoError – If the execution fails.
- Return type:
None