calibrate_gripper¶
Runs at once Any mode Takes control
Calibrate the gripper: find both ends of its jaws' travel. The gripper opens its jaws fully, then closes them fully, pressing against each end, and records the two ends as 0 and 255 of its position scale. It takes a few seconds: about 4.5 s from closed jaws. Until a gripper has calibrated, it moves to no target. Homing calibrates the gripper as one of its steps, so call this only to calibrate again without homing, for example after the gripper's drive lost power. No status field reports the calibration.
The call returns at once. The robot then sends the gripper only status requests until the gripper reports itself calibrated, but not before the gripper XML's <homing_calibration_wait_s> has passed, and for at most 30 s. The next gripper command ends a calibration still running, so wait that long before it. The calibration drops the gripper's target: the jaws stay where it leaves them until the next gripper command. While homing drives the gripper, and during firmware flashing, the calibration waits until they end.
Syntax¶
Arguments¶
None.
Returns¶
Any
None. The robot answers before the calibration starts.
Examples¶
import time
robot.calibrate_gripper()
time.sleep(6)
robot.open_gripper()
robot.wait_gripper_move_complete()
Further details¶
Warning
The jaws open and close fully by themselves and let go of a part they hold. Keep hands away from the jaws.
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
- [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
In Python, a code above raises CommandRejected; its number is the code. The call raises:
CommandRejected: The robot refused it: the robot has no CAN gripper, 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: