Gripper Model

The GripperModel class serves as a direct intermediary class that reads in information from a corresponding gripper XML file and also contains relevant hard-coded information from that XML. In conjunction with the RobotModel class, this serves as the core modeling component of the higher-level Robot class used in simulation.

Base Gripper Model

class robosuite.models.grippers.gripper_model.GripperModel(fname, idn=0)

Base class for grippers

Parameters
  • fname (str) – Path to relevant xml file to create this gripper instance

  • idn (int or str) – Number or some other unique identification string for this gripper instance

hide_visualization()

Hides all visualization geoms and sites. This should be called before rendering to agents

format_action(action)

Given (-1,1) abstract control as np-array returns the (-1,1) control signals for underlying actuators as 1-d np array

property naming_prefix

Generates a standardized prefix to append to all xml names to prevent naming collisions

Returns

Prefix unique to this gripper based on its ID

Return type

str

property visualization_sites

Grabs a dict of sites corresponding to the geoms used to aid visualization by human. (usually “site” and “cylinder”) (and should be hidden from robots)

Returns

‘grip_site’ (str)

Name of grip actuation intersection location site

’grip_cylinder’ (str)

Name of grip actuation z-axis location site

Return type

dict

property sensors

Grabs a dict of sensor names for each gripper (usually “force_ee” and “torque_ee”)

Returns

‘force_ee’ (str)

Name of force eef sensor for this gripper

’torque_ee’ (str)

Name of torque eef sensor for this gripper

Return type

dict

property dof

Defines the number of DOF of the gripper

Returns

gripper DOF

Return type

int

property init_qpos

Defines the default rest (open) qpos of the gripper

Returns

Default init qpos of this gripper

Return type

np.array

property speed

How quickly the gripper opens / closes

Returns

Speed of the gripper

Return type

float

property _joints

List of joint names of the gripper. Note that these are the raw string names directly pulled from a gripper’s corresponding XML file, NOT the adjusted name with an auto-generated naming prefix

Returns

Raw XML joint names for this gripper

Return type

list

property _actuators

List of actuator names of the gripper. Note that these are the raw string names directly pulled from a gripper’s corresponding XML file, NOT the adjusted name with an auto-generated naming prefix

Returns

Raw XML actuator names for this gripper

Return type

list

property _contact_geoms

List of names corresponding to the geoms used to determine contact with the gripper. Note that these are the raw string names directly pulled from a gripper’s corresponding XML file, NOT the adjusted name with an auto-generated naming prefix

Returns

Raw XML relevant contact geoms for this gripper

Return type

list

property _visualization_geoms

List of sites corresponding to the geoms used to aid visualization by human (and should be hidden from robots). Note that these are the raw string names directly pulled from a gripper’s corresponding XML file, NOT the adjusted name with an auto-generated naming prefix

Returns

Raw XML relevant visualization geoms for this gripper

Return type

list

property _important_geoms

Geoms corresponding to important components of the gripper (by default, left_finger and right_finger). Note that these are the raw string names directly pulled from a gripper’s corresponding XML file, NOT the adjusted name with an auto-generated naming prefix

Note that this should be a dict of lists.

Returns

Raw XML important geoms, where each set of geoms are grouped as a list and are organized by keyword string entries into a dict

Return type

dict of list