Skip to content

delay

Queued EXEC mode Takes control

Wait a given time between two queued moves. The pause is queued like a move: the arm stops and holds still for seconds after the moves queued before it, then the next move starts.

Syntax

robot.delay(seconds, timeout=120.0, **options)

Arguments

Name Type Default Description
seconds float required How long to wait, in seconds; more than 0.
timeout float 120.0 Seconds to wait for the move to finish, in sync mode only.
**options Any each setting's own Settings for this move only. Each one you leave out takes its default: speed = 100 % accel = 100 % duration = none (the speed decides) profile = "ruckig" jerk = 100 % ramp_fraction = 0.25 blend = 0 blend_mode = "exact_velocity" blend_continuity = "c1" ik_solver = "pinocchio" singularity_strategy = "stop" samples = automatic dry_run = False

Returns

str

The command id. The call returns once the robot has accepted the pause; call wait_idle() to wait until it has finished. In sync mode the call returns when the pause has finished.

Examples

robot.move_linear_rel_world(0, 0, -0.02)
robot.delay(0.5)
robot.move_linear_rel_world(0, 0, 0.02)
robot.wait_idle()
Usage restrictions 12 codes

This command is added to the robot's motion queue. The robot accepts it only when it is ready for motion (EXEC mode), from the client that holds control or when no client does. Otherwise, the robot refuses it with one of:

  • [6010] Command not allowed now — the message names the mode or state it needs
  • [6101] Control held by another client — another client holds control; the message names it
  • [5002] Program aborted — an earlier move failed; clear errors first
  • [6004] Invalid motion options — a setting is unknown, out of range, or refused for a single move
  • [6011] Motion queue full

Once accepted, the move can still fail before it starts:

  • [5011] Invalid duration — the time is not more than 0 seconds, or not a finite number
  • [5008] Zone check unavailable — safety zones are active, but the robot model to check them is missing
  • [5001] Trajectory planning failed
  • [3201] Trajectory not taken by RTI

A move that has started can end early with:

  • [5003] Command cancelled — an earlier move failed, or the robot left EXEC mode
  • [5004] Command stopped — stop() was called
  • [5005] Move did not settle — only with set_completion_policy("strict")

In Python, a refusal raises CommandRejected; its number is the code above. A failure after the robot accepted the move is raised by wait_idle() as MotionFailed, or by this call itself in sync mode as CommandRejected. No answer raises RobotTimeout; no connection, RobotConnectionError.

Protocol

A client that does not use robotclient sends this over the TCP command protocol (port 29000) for the example above:

{"id": "c1", "cmd": "delay", "args": [0.5]}

See also