Module finger_types_data

Get model information for the different Finger types.

The simulation supports different types of (Tri-)Finger robots which all follow the same basic idea but have different models. The functions of this module help getting the type-specific information.

class trifinger_simulation.finger_types_data.FingerTypesDataFormat(urdf_file, number_of_fingers, initial_joint_positions)[source]

Describes the format for the finger type data, comprising of the corresponding urdf, and the number of fingers.

Create new instance of FingerTypesDataFormat(urdf_file, number_of_fingers, initial_joint_positions)

Parameters:
  • urdf_file (str)

  • number_of_fingers (int)

  • initial_joint_positions (Sequence[float])

urdf_file: str

Path to the URDF file (relative to the URDF base directory)

number_of_fingers: int

Number of fingers the robot has.

initial_joint_positions: Sequence[float]

Initial joint positions.

trifinger_simulation.finger_types_data.get_valid_finger_types()[source]

Get list of supported finger types.

Returns:

List of supported finger types.

Return type:

KeysView[str]

trifinger_simulation.finger_types_data.check_finger_type(name)[source]

Check if name is a valid finger type.

Parameters:

name (str) – Name of the finger type.

Returns:

The name if it is valid.

Raises:

ValueError – If name is not a valid finger type.

Return type:

str

trifinger_simulation.finger_types_data.get_finger_urdf(name)[source]

Get the name of the URDF-file with the model of the specified finger type.

Parameters:

name (str) – Name of the finger type.

Returns:

The name of the URDF file in the robot_properties_fingers package.

Raises:

ValueError – If name is not a valid finger type.

Return type:

str

trifinger_simulation.finger_types_data.get_number_of_fingers(name)[source]

Get the number of fingers of the specified finger type

Parameters:

name (str) – Name of the finger type.

Returns:

Number of fingers.

Raises:

ValueError – If name is not a valid finger type.

Return type:

int

trifinger_simulation.finger_types_data.get_initial_joint_positions(name)[source]

Get initial joint positions of the specified finger type

Parameters:

name (str) – Name of the finger type.

Returns:

Angular joint positions.

Raises:

ValueError – If name is not a valid finger type.

Return type:

Sequence[float]