Skip to content

begin_gripper_change

Runs at once IDLE mode Disabled Takes control

Begin changing the gripper with the arm holding its homing. Use it before you unplug the gripper. The arm stays disabled and its joints keep holding, so the wrist resists while you twist the gripper off and on. The jaws go idle first, and let go of a part they hold. While the gripper is being changed, its silence and its faults are not reported, so unplugging it does not un-home the arm; enabling, the gripper's commands and every mode but IDLE and motors off are refused. A gripper plugged in again gets its settings from the robot by itself. It works with any tool, also one without a drive such as the Flange, to fit a gripper with one or the other way round. End it with end_gripper_change(), naming the fitted tool's file when it is another; latest_status()["gripper"]["changing"] and ["answering"] show where it is while the active tool has a drive. The new gripper's jaws need calibrating afterwards (calibrate_gripper()).

Syntax

robot.begin_gripper_change()

Arguments

None.

Returns

Nothing.

Examples

robot.begin_gripper_change()
# unplug the gripper, fit it again
robot.end_gripper_change()
Usage restrictions 5 codes

This command runs at once; it is not queued. The robot accepts it only when it is in IDLE mode and disabled, 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:

  • [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
  • [6003] Invalid arguments — an argument was given; it takes none
  • [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
  • [6026] Refused by RTI — rTI refused it: the arm is enabled, it is not in IDLE, or the gripper is already being changed. The message says why

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

  • CommandRejected: The robot refused it: the arm is enabled or not in IDLE, or 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.

Protocol

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

{"id": "c1", "cmd": "begin_gripper_change", "args": []}

See also