curobo.cuda_robot_model.kinematics_parser module¶
Base module for parsing kinematics from different representations.
cuRobo provides kinematics parsing from an URDF and a partial implementation for parsing from
a USD. To parse from other representations, an user can extend the KinematicsParser
class and implement only the abstract methods. Optionally, user can also provide functions for
reading meshes, useful for debugging and visualization.
- class LinkParams(
- link_name: str,
- joint_name: str,
- joint_type: ~curobo.cuda_robot_model.types.JointType,
- fixed_transform: ~numpy.ndarray,
- parent_link_name: str | None = None,
- joint_limits: ~typing.List[float] | None = None,
- joint_axis: ~numpy.ndarray | None = None,
- joint_id: int | None = None,
- joint_velocity_limits: ~typing.List[float] = <factory>,
- joint_offset: ~typing.List[float] = <factory>,
- mimic_joint_name: str | None = None,
Bases:
object
Parameters of a link in the kinematic tree.
- static from_dict( ) LinkParams ¶
Create a LinkParams object from a dictionary.
- Parameters:
dict_data – Dictionary containing link parameters.
- Returns:
Link parameters object.
- Return type:
- class KinematicsParser(
- extra_links: Dict[str, LinkParams] | None = None,
Bases:
object
Base class for parsing kinematics.
Implement abstractmethods to parse kinematics from any representation. Optionally, implement methods for reading meshes for visualization and debugging.
Initialize the KinematicsParser.
- Parameters:
extra_links – Additional links to be added to the kinematic tree.
- _parent_map¶
Parent link for all link in the kinematic tree.
- abstract build_link_parent()¶
Build a map of parent links to each link in the kinematic tree.
Use this function to fill
_parent_map
. Checkcurobo.cuda_robot_model.urdf_kinematics_parser.UrdfKinematicsParser.build_link_parent
for an example implementation.
- abstract get_link_parameters( ) LinkParams ¶
Get parameters of a link in the kinematic tree.
- Parameters:
link_name – Name of the link.
base – Is this the base link of the robot?
- Returns:
Parameters of the link.
- Return type:
- add_absolute_path_to_link_meshes(
- mesh_dir: str = '',
Add absolute path to link meshes.
- Parameters:
mesh_dir – Absolute path to the directory containing link meshes.
- get_link_mesh(
- link_name: str,
Get mesh of a link.
- Parameters:
link_name – Name of the link.
- Returns:
Mesh of the link.
- Return type:
- get_controlled_joint_names() List[str] ¶
Get names of all controlled joints in the robot.
- Returns:
Names of all controlled joints in the robot.
- _get_from_extra_links(
- link_name: str,
Get link parameters for extra links.
- Parameters:
link_name – Name of the link.
- Returns:
Link parameters if found, else None.
- Return type: