Tutorial for cuMotion MoveIt Plugin with Isaac Sim#
Overview#
This tutorial walks through the process of planning trajectories for a simulated Franka or UR robot in Isaac Sim, leveraging the cuMotion plugin for MoveIt 2 provided by Isaac ROS cuMotion. It is based on an example developed by PickNik Robotics, which in turn was based on a MoveIt example, with fewer features, provided with Isaac Sim.
Tutorial Walkthrough#
Set Up Development Environment#
Set up your development environment by following the instructions in Getting Started.
Install isaac_ros_cumotion_moveit and Examples#
Install the
isaac_ros_cumotion_examplespackage and its dependencies (includingisaac_ros_cumotionandisaac_ros_cumotion_moveit):Activate the Isaac ROS environment:
isaac-ros activateInstall the prebuilt Debian package:
sudo apt-get update
sudo apt-get install -y ros-jazzy-isaac-ros-cumotion-examples
Clone this repository under
${ISAAC_ROS_WS}/src:cd ${ISAAC_ROS_WS}/src && \ git clone --recurse-submodules -b release-4.1 https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_cumotion.git isaac_ros_cumotion
Activate the Isaac ROS environment:
isaac-ros activateUse
rosdepto install the package’s dependencies:sudo apt-get update
rosdep update && rosdep install --from-paths ${ISAAC_ROS_WS}/src/isaac_ros_cumotion --ignore-src -y
Build the package from source:
cd ${ISAAC_ROS_WS} && \ colcon build --packages-up-to isaac_ros_cumotion_examples
Source the ROS workspace:
Note
Make sure to repeat this step in every terminal created inside the Isaac ROS environment.
Because this package was built from source, the enclosing workspace must be sourced for ROS to be able to find the package’s contents.
source install/setup.bash
Install and configure Isaac Sim following the steps in the Isaac ROS Isaac Sim Setup Guide, stopping after step 4.
This tutorial uses the Isaac Sim standalone workflow, in which Isaac Sim is launched using a Python script. In the terminal opened using the Open in Terminal button in the Isaac Sim App Selector (and notably not in a shell within the Isaac ROS environment), source your ROS 2 workspace. For example:
source /opt/ros/jazzy/setup.bash
Set up your robot using the instructions below:
Start Isaac Sim and open the following scene:
https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/5.1/Isaac/Samples/ROS2/Scenario/isaac_manipulator_scene.usd
Optional: The above scene contains a UR10e robot. If you would like to experiment with a different UR robot:
Delete the UR10e from the scene.
Find the alternative robot in Isaac Sim’s robot assets folder and drag it onto the table in the scene.
Edit the Action Graph so that the
ROS2 Publish Joint StateandArticulation Controllernodes refer to the new robot, and save the USD file.
After the scene is fully loaded, click Play.
Note
Before launching MoveIt, ensure that the scene is loaded in Isaac Sim and that the timeline is playing.
Running
ros2 topic listin your ROS workspace should show a number of topics streaming data from Isaac Sim.
Start Isaac Sim and open the scene containing the Franka robot.
Enable the robotics example window by clicking Window > Examples > Robotics Examples.
In the Robotics Examples tab, select ROS2 > MoveIt > Franka MoveIt and click Load Sample Scene.
After Isaac Sim fully loads, the timeline will begin playing automatically.
Note
The example should be loaded in Isaac Sim before MoveIt is launched.
Running
ros2 topic listin your ROS workspace should show a number of topics streaming data from Isaac Sim.
Follow the entire Custom Manipulator tutorial.
Start Isaac Sim and open the following scene:
https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/5.1/Isaac/Samples/ROS2/Scenario/isaac_manipulator_scene.usd
Delete the UR10e robot from the scene.
Find your robot’s USD file in Isaac Sim’s robot assets folder (or use the one you made by following the Custom Manipulator tutorial) and drag it onto the table in the scene.
In the Action Graph, edit the
ROS2 Publish Joint StateandArticulation Controllernodes to refer to the new robot.Save the USD file, and click Play.
Note
Before launching MoveIt, ensure that the scene is loaded in Isaac Sim and that the timeline is playing.
Running
ros2 topic listin your ROS workspace should show a number of topics streaming data from Isaac Sim.
Set Up MoveIt 2 with cuMotion#
Note
If you are using a UR robot other than UR5e or UR10e, follow the Creating an XRDF file for a Custom Manipulator section of the Custom Manipulator tutorial before proceeding to the instructions below.
The Isaac Sim scene contains a UR10e by default and will have to be modified for other robots. Refer to section above.
Open a new terminal inside the Isaac ROS environment.
isaac-ros activateLaunch MoveIt (including RViz) using the provided launch file. Remember to first run
source install/setup.bashif package was built from source.ros2 launch isaac_ros_cumotion_examples ur_isaac_sim.launch.py ur_type:=<UR_TYPE>
Note
Replace
<UR_TYPE>with the type of your UR robot (for example,ur10e).The visualization of the robot in RViz should reflect the current joint state of the simulated robot in Isaac Sim.
Open a new terminal inside the Isaac ROS environment.
isaac-ros activateLaunch cuMotion planner node and MoveIt (including RViz) using the provided launch file. Remember to first run
source install/setup.bashif package was built from source.ros2 launch isaac_ros_cumotion_examples franka_isaac_sim.launch.py
Verify that the visualization of the robot in RViz reflects the current joint state of the simulated robot in Isaac Sim.
Open a new terminal inside the Isaac ROS environment.
isaac-ros activateLaunch MoveIt (including RViz) using the launch file you created in the Custom Manipulator tutorial. Remember to first run
source install/setup.bashif the package was built from source.ros2 launch <PACKAGE_CONTAINING_LAUNCH_FILE> <ROBOT>.launch.py
Verify that the visualization of the robot in RViz reflects the current joint state of the simulated robot in Isaac Sim.
Open another terminal inside the Isaac ROS environment.
isaac-ros activateRun the cuMotion planner node. Remember to first run
source install/setup.bashif package was built from source.ros2 run isaac_ros_cumotion cumotion_planner_node --ros-args \ -p robot:=<FULL_PATH_TO_XRDF> \ -p urdf_path:=<FULL_PATH_TO_URDF>
Using the cuMotion Planner in MoveIt#
In RViz, enable cuMotion by ensuring that
isaac_ros_cumotionandcuMotionare selected within the Planning Library pane within the Context tab in the bottom left corner of the RViz window.
Select a target pose for the robot end effector and click the Plan button in the Planning tab. If planning is successful, an animation of the trajectory will be visualized in RViz.
Click the Execute button in RViz. The simulated robot in Isaac Sim will follow the motion of the robot in RViz.