wait_motion_complete¶
Runs in the client Sends nothing to the robot
Wait until the last command this client queued has finished. It waits for one command: the last move, delay or gripper command the robot accepted from this client. A command the robot refused when it was sent does not count. It returns at once when this client has queued nothing yet or called stop() since, or when that command has already finished.
It does not wait for the commands queued before it, nor report their failures: wait_idle() does both. Moves finish in the order they were queued, but a gripper command does not hold up the moves after it, so an earlier gripper command can still be moving.
Syntax¶
Arguments¶
| Name | Type | Default | Description |
|---|---|---|---|
timeout |
float | None |
None |
Seconds to wait at most. None or 0 waits up to 120 s. |
Returns¶
Nothing.
Examples¶
robot.move_joints(90, -105, 165, 0, -30, 180)
robot.wait_motion_complete()
robot.move_joints(90, -100, 160, 0, -30, 180)
robot.wait_motion_complete(timeout=30)
Exceptions¶
CommandRejected: The command failed after the robot accepted it, for example withJOINT_LIMIT,STOPPEDorABORTED, or the connection was lost first (CONNECTION_LOSTorDISCONNECTED). Itscodenames the failure. Every later call raises it again, until another command is queued or this client callsstop().RobotTimeout: The command had not finished aftertimeout, or 120 s.