wait_mode¶
Runs in the client Sends nothing to the robot
Wait until the robot is in a given mode. It waits until the robot's status shows mode, and sends no command: change the mode first, with enter_exec_mode(), enter_idle_mode() or the like, or call those with wait=True to do both. It returns at once when the latest status already shows mode. The robot sends its status when it changes, checking 50 times a second, so a mode that lasts less than about 20 ms can pass unseen.
Syntax¶
Arguments¶
| Name | Type | Default | Description |
|---|---|---|---|
mode |
str |
required | The mode, as the robot names it: "IDLE", "EXEC", "JOG", "HOMING", "RTI", "SOFT_RTI", "SAFETY_STOP", "FLASHING", "ACTIVE_ERROR" or "BOOTING". Spelled any other way, for example in lower case, it never matches, and the wait runs into its timeout. |
timeout |
float | None |
10.0 |
Seconds to wait at most. None waits as long as it takes. |
Returns¶
Nothing.
Examples¶
Exceptions¶
RobotTimeout: The robot did not reportmodewithintimeout.RobotConnectionError: The client is not connected, or lost its connection while waiting.