pycram.robot_descriptions

Submodules

Package Contents

Classes

BoxyDescription

The RobotDescription as an abstract class which needs to be inherited from to implement

DonbotDescription

The RobotDescription as an abstract class which needs to be inherited from to implement

HSRBDescription

The RobotDescription as an abstract class which needs to be inherited from to implement

PR2Description

The RobotDescription as an abstract class which needs to be inherited from to implement

UR5Description

The RobotDescription as an abstract class which needs to be inherited from to implement

TiagoDescription

The RobotDescription as an abstract class which needs to be inherited from to implement

StretchDescription

The RobotDescription as an abstract class which needs to be inherited from to implement

RobotDescription

The RobotDescription as an abstract class which needs to be inherited from to implement

InitializedRobotDescription

Functions

update_robot_description([robot_name, from_ros])

Attributes

logger

robot_description

class pycram.robot_descriptions.BoxyDescription

Bases: pycram.robot_description.RobotDescription

The RobotDescription as an abstract class which needs to be inherited from to implement a robot description for specific object. It implements different functions to add and get chains of different objects types which inherit of the class ChainDescription. Moreover, it allows to model the robot with its odom_frame, base_frame, base_link and torso links and joints. Different cameras can be added and static transforms and poses can be added too.

Initialises the robot description with the given frames.

class pycram.robot_descriptions.DonbotDescription

Bases: pycram.robot_description.RobotDescription

The RobotDescription as an abstract class which needs to be inherited from to implement a robot description for specific object. It implements different functions to add and get chains of different objects types which inherit of the class ChainDescription. Moreover, it allows to model the robot with its odom_frame, base_frame, base_link and torso links and joints. Different cameras can be added and static transforms and poses can be added too.

Initialises the robot description with the given frames.

get_camera_frame(name='rgb_camera')

Returns the camera frame of the given camera with the name camera_name.

Returns:

str

class pycram.robot_descriptions.HSRBDescription

Bases: pycram.robot_description.RobotDescription

The RobotDescription as an abstract class which needs to be inherited from to implement a robot description for specific object. It implements different functions to add and get chains of different objects types which inherit of the class ChainDescription. Moreover, it allows to model the robot with its odom_frame, base_frame, base_link and torso links and joints. Different cameras can be added and static transforms and poses can be added too.

Initialises the robot description with the given frames.

get_camera_frame(name='head_center_camera_frame')

Returns the camera frame of the given camera with the name camera_name.

Returns:

str

class pycram.robot_descriptions.PR2Description

Bases: pycram.robot_description.RobotDescription

The RobotDescription as an abstract class which needs to be inherited from to implement a robot description for specific object. It implements different functions to add and get chains of different objects types which inherit of the class ChainDescription. Moreover, it allows to model the robot with its odom_frame, base_frame, base_link and torso links and joints. Different cameras can be added and static transforms and poses can be added too.

Initialises the robot description with the given frames.

get_camera_frame(name='optical_frame')

Returns the camera frame of the given camera with the name camera_name.

Returns:

str

class pycram.robot_descriptions.UR5Description

Bases: pycram.robot_description.RobotDescription

The RobotDescription as an abstract class which needs to be inherited from to implement a robot description for specific object. It implements different functions to add and get chains of different objects types which inherit of the class ChainDescription. Moreover, it allows to model the robot with its odom_frame, base_frame, base_link and torso links and joints. Different cameras can be added and static transforms and poses can be added too.

Initialises the robot description with the given frames.

get_camera_frame(name='camera')

Returns the camera frame of the given camera with the name camera_name.

Returns:

str

class pycram.robot_descriptions.TiagoDescription

Bases: pycram.robot_description.RobotDescription

The RobotDescription as an abstract class which needs to be inherited from to implement a robot description for specific object. It implements different functions to add and get chains of different objects types which inherit of the class ChainDescription. Moreover, it allows to model the robot with its odom_frame, base_frame, base_link and torso links and joints. Different cameras can be added and static transforms and poses can be added too.

Initialises the robot description with the given frames.

get_camera_frame(name='optical')

Returns the camera frame of the given camera with the name camera_name.

Returns:

str

class pycram.robot_descriptions.StretchDescription

Bases: pycram.robot_description.RobotDescription

The RobotDescription as an abstract class which needs to be inherited from to implement a robot description for specific object. It implements different functions to add and get chains of different objects types which inherit of the class ChainDescription. Moreover, it allows to model the robot with its odom_frame, base_frame, base_link and torso links and joints. Different cameras can be added and static transforms and poses can be added too.

Initialises the robot description with the given frames.

get_camera_frame(name='color')

Returns the camera frame of the given camera with the name camera_name.

Returns:

str

static stretch_orientation_generator(position, origin)
class pycram.robot_descriptions.RobotDescription(name: str, base_frame: str, base_link: str, torso_link: typing_extensions.Optional[str] = None, torso_joint: typing_extensions.Optional[str] = None, odom_frame: typing_extensions.Optional[str] = None, odom_joints: typing_extensions.Optional[typing_extensions.List[str]] = None)

The RobotDescription as an abstract class which needs to be inherited from to implement a robot description for specific object. It implements different functions to add and get chains of different objects types which inherit of the class ChainDescription. Moreover, it allows to model the robot with its odom_frame, base_frame, base_link and torso links and joints. Different cameras can be added and static transforms and poses can be added too.

Initialises the robot description with the given frames.

_safely_access_chains(chain_name: str, verbose: typing_extensions.Optional[bool] = True) typing_extensions.Union[None, ChainDescription]

This function returns the chain_description of the name chain_name or None, if there exists no chain description with the name chain_name.

_get_chain_description(chain_name: str, description_type: typing_extensions.Optional[typing_extensions.Type[ChainDescription]] = ChainDescription, is_same_description_type: typing_extensions.Optional[bool] = True) typing_extensions.Union[None, typing_extensions.Type[ChainDescription]]

This function checks if there is a chain saved in self.chains with the chain name chain_name. Moreover, if is_same_description_type is True it will be checked if the found chain is of the given object class description_type. If is_same_description_type is False, it will be just checked if the found chain is a subclass of description_type.

Returns:

subclass of ChainDescription or None

get_tool_frame(manipulator_name: str) typing_extensions.Union[None, str]

Returns the tool frame of the manipulator description with the name manipulator name.

Returns:

str

get_static_joint_chain(chain_name: str, configuration: str) typing_extensions.Union[None, typing_extensions.Dict[str, float]]

Returns the static joint chain given the chains name chain_name and the configurations name configuration.

Returns:

dict[str: float]

get_static_tf(base_link: str, target_link: str)
get_static_pose(frame: str)
add_chain(name: str, chain_description: ChainDescription) typing_extensions.Union[None, bool]

This functions adds the chain description chain_description with the name name and overwrites the existing chain description of name name, if it already exists in self.chains.

add_chains(chains_dict: typing_extensions.Dict[str, ChainDescription]) None

This function calls recursively the self.add_chain function and adds therefore the chain description saved in the values part of the dictionary chains_dict with the names saved in the key part of the dictionary chains_dict.

add_camera(name: str, camera_description: CameraDescription) typing_extensions.Union[None, bool]

This functions adds the camera description camera_description with the name name and overwrites the existing camera description of name name, if it already exists in self.cameras.

add_cameras(cameras_dict: typing_extensions.Dict[str, CameraDescription]) None

This function calls recursively the self.add_camera function and adds therefore the camera description saved in the values part of the dictionary cameras_dict with the names saved in the key part of the dictionary cameras_dict.

get_camera_frame(camera_name: str) typing_extensions.Union[None, str]

Returns the camera frame of the given camera with the name camera_name.

Returns:

str

add_static_joint_chain(chain_name: str, configuration: str, static_joint_states: typing_extensions.List[float]) typing_extensions.Union[None, bool]

This function calls the add_static_joint_chain function on the chain object with the name chain_name. For more information see the add_static_joint_chain in ChainDescription.

Parameters:
  • chain_name – The name of the new static joint chain

  • configuration – The name of the configuration of this joint chain

add_static_joint_chains(chain_name: str, static_joint_states: typing_extensions.Dict[str, typing_extensions.List[float]]) None

This function calls recursively the self.add_static_joint_chain function with the name chain_name and adds therefore the static joint values saved in the values part of the dictionary static_joint_states with the configuration names saved in the key part of the dictionary static_joint_states.

Parameters:

chain_name – The name for the new chain

add_static_gripper_chain(manipulator_name: str, configuration: str, static_joint_states: typing_extensions.Dict[str, typing_extensions.List[float]]) typing_extensions.Union[None, bool]

This function adds a static gripper chain to a gripper description if there exists a manipulator description with the name manipulator_name. The static gripper joint vales in static_joint_states are then saved with the configuration name configuration in the manipulator description object. For more information see the add_static_joint_chain in ChainDescription.

add_static_gripper_chains(manipulator_name: str, static_joint_states: typing_extensions.Dict[str, typing_extensions.List[float]]) None

This function calls recursively the self.add_static_gripper_chain function with the name manipulator_name and adds therefore the static joint values saved in the values part of the dictionary static_joint_states with the configuration names saved in the key part of the dictionary static_joint_states.

get_static_gripper_chain(manipulator_name: str, configuration: str) typing_extensions.Dict[str, float]

Returns the static gripper joint chain given the manipulator name manipulator_name and the configuration name configuration.

For more information see the function get_static_joint_chain in ChainDescription.

Returns:

dict[str: list[float]] or None

get_child(name)

Returns the child of a Joint or Link in the URDF. If ‘name’ is a Joint a Link will be returned and vice versa.

Parameters:

name – The name of the Joint/Link for which the child will be returned.

Returns:

The child Joint/Link

get_parent(name)

Returns the parent of a Joint or Link in the URDF. If ‘name’ is a Joint a Link will be returned and vice versa.

Parameters:

name – The name of the Joint/Link for which the parent will be returned.

Returns:

The parent Joint/Link

pycram.robot_descriptions.logger
class pycram.robot_descriptions.InitializedRobotDescription(robot_description)
i
current_description_loaded
pycram.robot_descriptions.update_robot_description(robot_name=None, from_ros=None)
pycram.robot_descriptions.robot_description