Skip to content

GripperResult

A class in the client from robotclient import GripperResult

One gripper command's outcome: why its jaws stopped.

gripper_result(), wait_holding_part() and wait_released_part() return one. Its code tells a part between the jaws from jaws that reached their target with nothing there; "complete" alone cannot.

Methods and properties

Name What it does
object_detected Whether something stopped the jaws before their target.
reached_target Whether the jaws reached their target with nothing in the way.
name Short text for the code, such as "reached target, no object".

GripperResult.object_detected

Whether something stopped the jaws before their target.

True for codes 1 and 2: the gripper reported that the jaws pressed on something while opening or closing. After a close that is the part being held; after an open it means something blocked the jaws.

result.object_detected

Value bool

Example

robot.close_gripper()
robot.wait_gripper_move_complete()
robot.gripper_result().object_detected

GripperResult.reached_target

Whether the jaws reached their target with nothing in the way.

True for code 3 only. Code 0, the jaws within 5 of the target while the gripper still reported motion, reads False.

result.reached_target

Value bool

Example

robot.open_gripper()
robot.wait_gripper_move_complete()
robot.gripper_result().reached_target

GripperResult.name

Short text for the code, such as "reached target, no object".

Code 0 reads "still moving", 1 "object detected while opening", 2 "object detected while closing" and 3 "reached target, no object". Any other code reads "unknown(N)", with the code for N.

result.name

Value str

Example

robot.close_gripper()
robot.wait_gripper_move_complete()
robot.gripper_result().name