gripper_utils

class real_robot.utils.visualization.gripper_utils.XArmGripper[source]

Bases: object

An object representing a UFactory XArm gripper. Used for drawing grasp pose control points only

get_control_points(q=0.0, pose=array([[1., 0., 0., 0.], [0., 1., 0., 0.], [0., 0., 1., 0.], [0., 0., 0., 1.]]), symmetric=False) ndarray[source]

Return the 5 control points of gripper representation. Control point order indices are shown below (symmetric=True is in parentheses)

  • 0 (0)

y <—*
1 (2) ——- 2 (1) |
| v
3 (4) * * 4 (3) z

left right

Parameters:
  • q – gripper finger joint value

  • pose – gripper pose from world frame to xarm_gripper_base_link

Return pts:

[batch_size, 5, 3] np.floating np.ndarray

get_control_points_lineset(control_points: ndarray) LineSet[source]

Contruct a LineSet for visualizing control_points :param control_points: [batch_size, 5, 3] np.floating np.ndarray

load_gripper_points()[source]

Load gripper points