Motion Planning with Nvidia cuRobo and ROS2

Gaurav Gupta
Black Coffee Robotics
5 min readJul 29, 2024

Fast and reliable motion planning for robotic arms is essential. Tasks like packaging and palletizing objects of different shapes and sizes require high-speed, on-the-fly motion planning while precise maneuvers are necessary for applications like robotic surgery.

We at Black Coffee Robotics have seen an ever-increasing demand for faster motion planning capabilities to keep up with the rapidly evolving needs of the industry. In scenarios where traditional CPU-bound graph planners like RRT struggle to generate efficient motion plans and algorithms like Trajopt often take several seconds to optimize trajectory, new solutions are needed. We tested one such solution i.e. Nvidia’s cuRobo, which reframes motion generation as a global optimization problem. By leveraging the power of GPUs, cuRobo claims to explore a vast search space of possible trajectories identifying optimal solutions in a fraction of the time required by conventional methods.‍

A Conceptual Overview of Parallelization in Motion Planning

The standard CPU-bound approach to motion generation using a graph planner involves a two-step process:

  1. Planning a single collision-free geometric path.
  2. Smoothing that path for efficiency.

In contrast, cuRobo uses parallel GPU processing to run many instances of collision-free inverse kinematics(IK) to get multiple solutions. It then generates trajectory seeds by linearly interpolating between the start joint configuration and calculated IK solutions. Finally, it runs trajectory optimization on the seeds in parallel to obtain the best collision-free trajectory. This unlocks several key advantages, including improved trajectory quality and faster planning time.‍

CuRobo: CUDA Accelerated Robot Library

CuRobo leverages Nvidia’s parallel computing architecture to generate timestep-optimized, collision-free trajectories. We tested cuRobo because its Nvidia GPU-centric design allowed us to perform parallel motion planning on Nvidia GPUs, rather than relying on specialized hardware like FPGAs. Additionally, its integration with PyTorch, offering a Python frontend, promises a more streamlined development process.‍

Getting Started with cuRobo

CuRobo has a simple setup process using NVIDIA’s robotics simulation platform Isaac Sim. By following the official documentation, you can configure and run cuRobo on any system that meets Isaac Sim’s minimum specifications. While an NVIDIA RTX graphics card is required to run Isaac Sim, cuRobo is compatible with non-RTX NVIDIA GPUs as well.

To remove cuRobo’s dependency on Isaac Sim for simulation and enable broader compatibility with any ROS2-supported simulator or hardware driver, we developed a custom ROS2 wrapper around cuRobo. This allows us to visualize motion plans in RViz and provides a clear picture of the planned robot’s motion.

Here is the breakdown of the steps to get started with the cuRobo and ROS2:

  1. Robot Configuration: CuRobo utilizes robot configuration files in addition to the standard URDF file. These configuration files are readily available for industrial robot arms on their official Github. and can be generated for custom robots following the provided tutorial.
  2. Development of ROS2 nodes: Develop ROS2 nodes to accept the desired goal pose for the robot arm and publish the trajectories generated by cuRobo based on the received goal pose.
Trajectory generated by cuRobo

‍Comparison of cuRobo Motion Planning with MoveIt2 (RRTConnect)

To conduct a head-to-head comparison between cuRobo and MoveIt2’s default planner, we tested motion generation for various goal poses using a simulated UR5 arm on the same machine.

Obstacle-Free Planning

On testing various Cartesian poses within the arm’s workspace to generate motion paths, we found the following results.

  • CuRobo: Running cuRobo in obstacle-free environments resulted in a mean planning time of 0.19 seconds and a success percentage of 100%.
CuRobo — no obstacles

  • MoveIt2 (RRTConnect): Running MoveIt2 in obstacle-free environments resulted in a mean planning time of 0.17 seconds and a success percentage of 96%.
MoveIt2 — no obstacles

Result: In our obstacle-free planning test, cuRobo demonstrated a slight edge in reliability and quality. CuRobo achieved a 100% success rate and superior trajectory quality, despite a comparable mean planning time of 0.19 seconds to MoveIt2’s 0.17 seconds.

Planning with obstacles

On testing various Cartesian poses with obstacles in the workspace we observed the following.

  • CuRobo: Running cuRobo in an environment with obstacles resulted in a mean planning time of 0.69 seconds and a success percentage of 90.32%.
CuRobo with obstacles‍

MoveIt2 (RRTConnect): Running MoveIt2 in the same environment with obstacles resulted in a mean planning time of 0.33 seconds and a success percentage of 62.50%.

MoveIt2 with obstacles

Result: In environments with obstacles, cuRobo demonstrated better reliability and trajectory quality. CuRobo achieved a 90.32% success rate compared to MoveIt2’s 62.50%, despite having a longer mean planning time of 0.69 seconds versus MoveIt’s 0.33 seconds.‍

Challenges and Limitations with cuRobo

While cuRobo offers advantages, setting up cuRobo for custom robotic arms can be a tedious process. Configuring cuRobo for a non-supported robotic arm currently requires collision generation using Isaac Sim and a robot configuration file which is manually created using this template. Ideally, the future should see more user-friendly, accessible tools or simplified workflows for configuring cuRobo with non-supported robotic arm setups without relying on Isaac Sim. Additionally, it’s important to note that the cuRobo license restricts its use to non-commercial purposes (with the exception of Nvidia Corporation and its affiliates). The only way to use it for commercial applications is to either ask Nvidia for a license, or use it via their Moveit plugin.

‍Conclusion

CuRobo is a compelling alternative for robot motion planning. It leverages parallelization on the GPU, leading to faster and higher-quality motion. Although custom arm setups currently have implementation challenges, cuRobo’s potential is evident. As development progresses, it could become a significant improvement for motion generation. Recently, NVIDIA released cuRobo as a MoveIt2 plugin, but it remains to be tested and is outside the scope of this article.‍

Are you planning to use accelerated motion planning for your next-gen robotic project? We’re here to help! Reach out to us.

--

--