Skip to content

rti_set_start_pose_check

Runs at once Any mode Takes control

Switch the check of the first command after a claim on or off. With the check on, the robot compares the first command of each claim with the arm. A position target must lie within 0.1 rad (about 5.7 deg) of every joint's measured position; a velocity within 10 % of the joint's real-time velocity limit (after rti_set_vel_scale()); a torque within what the joint's real-time torque-rate limit allows in four ticks (16 ms). A first command outside that is refused: the arm brakes to rest and the robot latches RTI_START_POSE. It catches a controller that starts from zeros or from an old pose.

The setting is read when the first command of a claim arrives, so it applies to the next claim, or to the current one before its first command.

Syntax

robot.rti_set_start_pose_check(enabled)

Arguments

Name Type Default Description
enabled bool required True to check the first command, False to let any first command through.

Default values

On, set each time the robot software starts and at every rti_connect(). The tolerance, 0.1 rad, is config/system.xml <rti_defaults><start_pose_tol_rad>, read at start.

Returns

Nothing.

Examples

robot.rti_connect(wait=True)
robot.rti_set_start_pose_check(True)
robot.rti_disconnect(wait=True)

Further details

Warning

With the check off, a first command far from the arm, such as all zeros, reaches the motors: the arm moves there at its real-time limits. The check stays off until it is switched on or the next rti_connect().

Usage restrictions 3 codes

This command runs at once; it is not queued. The robot accepts it in any mode and state, from the client that holds control or when no client does.

It answers with one of these codes when it does not carry the command out:

  • [6101] Control held by another client — another client holds control; the message names it
  • [6003] Invalid arguments — the value is not true or false (1 / 0), or the message did not carry exactly one value; this client always sends one
  • [6025] RTI not running or not answering — rTI did not answer within 1 s: it is not running or not responding. The command may still have taken effect

In Python, a code above raises CommandRejected; its number is the code. The call raises:

  • CommandRejected: Another client holds control. Or RTI refused it or did not answer within 1 s (Errors:).
  • RobotTimeout: The robot did not answer within 5 s.
  • RobotConnectionError: The client is not connected.

If the connection drops while the call waits for the robot's answer, it raises CommandRejected with the code CONNECTION_LOST (DISCONNECTED after disconnect()); while it waits for the robot's status, RobotConnectionError.

Like every immediate command, it also answers BAD_ARGS when a raw client sends a value the robot cannot read at all, and INTERNAL when it fails inside the robot.

See also