Skip to content

end_gripper_change

Runs at once Any mode Takes control

End changing the gripper once it answers again. The robot clears the gripper drive's faults, then counts its silence and faults again after one second. Enabling and the gripper's commands work again. Refused while the gripper does not answer: plug it in first. A tool without a drive (the Flange, a vacuum tool) answers nothing and is not waited for; and from such a tool the robot cannot hear the new gripper's drive yet: it checks its product and tool ID once it answers, and reports its loss after one second if it never does.

With gripper, another gripper's file is applied: the robot takes its settings, its tool length, mass and collision model and its homing set-up at once, without a restart, and saves it as the active gripper in config/system.xml. The fitted gripper's drive must be the product that file names, and its tool ID that file's (a drive with none stored passes). Then the executor, the self-collision checker and the dashboard restart with it, about 10 s: this client's connection drops and must connect again. The reply comes once the file is saved, applied and the restart has started; from then until the restart, enabling and moves are refused. The arm keeps holding, and keeps its homing unless removed. A gripper with a tool ID proposes its file: latest_status()["gripper"]["proposed"]. Any tool can be applied this way, with a drive or without one.

Syntax

robot.end_gripper_change(gripper=None, removed=False)

Arguments

Name Type Default Description
gripper str | None None The name of a gripper file in grippers/ (without .xml), for example "SSG48". None keeps the active one.
removed bool False Whether the gripper was taken off the flange. Then the arm is no longer homed: J6's Hall magnet and J5's stop sit on the gripper, so they move with a re-fitted gripper. Home the arm again; that homing takes J5's and J6's new spots for this gripper without asking.

Returns

dict

A dict: gripper (the active gripper now) and restart (whether the executor, the checker and the dashboard restart).

Examples

robot.end_gripper_change()
robot.end_gripper_change("SSG48", removed=True)
Usage restrictions 5 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 — an unknown gripper file, a removed that is not True or False, or more than two arguments
  • [6027] Gripper change not completed — another gripper's file was not applied completely: config/system.xml could not be saved (nothing changed), RTI failed while applying it, or the restart did not start. In the last two cases the arm cannot be enabled until the robot service restarts. The message names the step
  • [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 gripper is not being changed, its drive does not answer, a gripper is being applied, or the file cannot be read, is a tool without a drive, names another product or another tool ID than the fitted drive's. 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 gripper is not being changed, its drive does not answer, another client holds control, or the gripper file is unknown, cannot be read, names another product or another tool ID. 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": "end_gripper_change", "args": []}

See also