store_gripper_tool_id¶
Runs at once Any mode Disabled Takes control
Store this gripper's tool ID in its drive. A gripper's drive can hold which gripper it is built into, its tool ID: 1 for an SSG-48, 11 to 33 for an MSG (the tens digit is the rail, 1, 2 or 3 for 100, 150 or 200 mm; the units digit the motor, 1, 2 or 3 for the small, medium or large one), 200 to 254 for a gripper of your own. The robot compares it with the <tool_id> in the active gripper's XML all the time: another ID stops the robot (GRIPPER_TOOL_MISMATCH, it cannot be enabled), since that XML's tool length, mass and collision model would be wrong; 0, not stored yet, only gets a note. This command writes the XML's ID into the drive and saves the drive's flash, so it stays after a power-off. The save stores the drive's whole working config, as save_drive_config() does. The drive does not answer for up to about a second meanwhile. Only with the arm disabled. Nothing moves.
Syntax¶
Arguments¶
None.
Returns¶
dict
A dict: tool_id (the number stored) and tool (it in words, for example "MSG, 150 mm rail, 21.5 mm motor").
Examples¶
Further details¶
Warning
Store it only with the gripper the XML describes fitted. An ID stored in the wrong gripper's drive hides the mismatch this check exists for.
Usage restrictions 6 codes
This command runs at once; it is not queued. The robot accepts it only when it is 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 — the active gripper's XML declares no
<tool_id> - [6023] No gripper — the robot has no CAN gripper
- [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, the gripper's drive has not reported its identity yet, or its flash cannot keep the ID (firmware before 109). 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, another client holds control, there is no CAN gripper, or its XML declares no 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: