curobo.cuda_robot_model package

This module contains GPU accelerated kinematics leveraging CUDA. Kinematics computations enable mapping from a robot’s joint configuration to the pose of the robot’s links in Cartesian space (with reference to the robot’s base link). In cuRobo, robot’s geometry is approximated with spheres and their positions are also computed as part of kinematics. This mapping is differentiable, enabling their use in optimization problems and as part of neural networks.

../_images/robot_representation.png

Robot representation in cuRobo is shown for the Franka Panda robot.

Kinematics in CuRobo currently supports single axis actuated joints, where the joint can be actuated as prismatic or revolute joints. Continuous joints are approximated to revolute joints with limits at [-6, +6] radians. Mimic joints are not supported, so convert mimic joints to independent joints.

CuRobo loads a robot’s kinematic tree from KinematicsTensorConfig. This config is generated using CudaRobotGenerator. A parser base class KinematicsParser is provided to help with parsing kinematics from standard formats. Kinematics parsing from URDF is implemented in UrdfKinematicsParser. An experimental USD kinematics parser is provided in UsdKinematicsParser, which is missing an additional transform between the joint origin and link origin, so this might not work for all robots. An example workflow for setting up a robot from URDF is shown below:

digraph { rankdir=LR; bgcolor="#808080"; edge [color = "#FFFFFF"; fontsize=10]; node [shape="box", style="rounded, filled", fontsize=12, color="#76b900", fontcolor="#FFFFFF"]; "CudaRobotGenerator" [color="#FFFFFF", fontcolor="#000000"] "UrdfKinematicsParser" [fillcolor="#FFFFFF", fontcolor="#000000", style="box, filled", color="#000000"] "CudaRobotGenerator" [color="#FFFFFF", fontcolor="#000000"] "URDF" [fillcolor="#FFFFFF", fontcolor="#000000", style="box, filled, dashed", color="#000000"] "XRDF" [fillcolor="#FFFFFF", fontcolor="#000000", style="box, filled, dashed", color="#000000"] "cuRobo YML" [fillcolor="#FFFFFF", fontcolor="#000000", style="box, filled", color="#000000"] "CudaRobotGeneratorConfig" -> "CudaRobotGenerator"; "CudaRobotGenerator" -> "UrdfKinematicsParser" [dir="both"]; "CudaRobotGenerator" -> "CudaRobotModelConfig"; "URDF" -> "cuRobo YML"; "XRDF" -> "cuRobo YML" [style="dashed",label="Optional", fontcolor="#FFFFFF"]; "cuRobo YML" -> "CudaRobotGeneratorConfig"; }

In addition to parsing data from a kinematics file (urdf, usd), CuRobo also needs a sphere representation of the robot that approximates the volume of the robot’s links with spheres. Several other parameters are also needed to represent kinematics in CuRobo. A tutorial on setting up a robot is provided in Configuring a New Robot. cuRobo also supports using XRDF for representing the additional parameters of the robot that are not available in URDF.

Once a robot configuration file is setup, you can pass this to CudaRobotModelConfig to generate an instance of kinematics configuraiton. CudaRobotModel takes this configuration and provides access to kinematics computations.

Note

CudaRobotModel creates memory tensors that are used by CUDA kernels while CudaRobotModelConfig contains only the robot kinematics configuration. To reduce memory overhead, you can pass one instance of CudaRobotModelConfig to many instances of CudaRobotModel.

Submodules