Tutorial for cuMotion MoveIt Plugin with Isaac Sim

https://media.githubusercontent.com/media/NVIDIA-ISAAC-ROS/.github/main/resources/isaac_ros_docs/concepts/manipulation/cumotion_moveit/isaac_sim.jpg/

Overview

This tutorial walks through the process of planning trajectories for a simulated Franka 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 less featureful MoveIt example provided with Isaac Sim.

This tutorial has been tested with Isaac Sim 4.0 and Isaac Sim 2023.1.1.

Tutorial Walkthrough

  1. Set up your development environment by following the instructions in Getting Started.

  2. Clone isaac_ros_common under ${ISAAC_ROS_WS}/src.

    cd ${ISAAC_ROS_WS}/src && \
       git clone https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common.git
    
  3. Install the isaac_ros_cumotion_examples package and its dependencies (including isaac_ros_cumotion and isaac_ros_cumotion_moveit):

    1. Launch the Docker container using the run_dev.sh script:

      cd ${ISAAC_ROS_WS}/src/isaac_ros_common && \
         ./scripts/run_dev.sh
      
    2. Install the prebuilt Debian package:

      sudo apt-get install -y ros-humble-isaac-ros-cumotion-examples
      
  4. Install and configure Isaac Sim following the steps in the Isaac ROS Isaac Sim Setup Guide, stopping after step 4.

  5. This tutorial uses the Isaac Sim “standalone workflow,” in which Isaac Sim is launched via 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 docker container), source your ROS 2 workspace, e.g.,

    source /opt/ros/humble/setup.bash
    
  6. Run python.sh with the full path to the start_isaac_sim_franka.py script provided by the isaac_ros_cumotion_examples package. Please note that this is a standalone script and could be copied to another location for convenience.

    Please clone or download the script from here. Then run it with python.sh as follows.

    ./python.sh <DOWNLOAD_PATH>/start_isaac_sim_franka.py
    

    Once Isaac Sim fully loads, the timeline will begin playing automatically.

    Note

    The example should be loaded in Isaac Sim before MoveIt is launched.

  7. In a terminal within the Isaac ROS Docker container, launch MoveIt (including RViz) using the provided launch file. Remember to first run source install/setup.bash if package was built from source.

    ros2 launch isaac_ros_cumotion_examples franka_isaac_sim.launch.py
    

    The visualization of the robot in RViz should reflect the current joint state of the simulated robot in Isaac Sim.

  1. In a separate terminal within the Docker container, run the cuMotion planner node. Remember to first run source install/setup.bash if package was built from source.

    ros2 run isaac_ros_cumotion cumotion_planner_node --ros-args -p robot:=franka.xrdf -p urdf_path:=/opt/ros/humble/share/moveit_resources_panda_description/urdf/panda.urdf
    
  2. In RViz, enable cuMotion by ensuring that isaac_ros_cumotion and cuMotion are selected within the “Planning Library” pane within the “Context” tab in the bottom left corner of the RViz window.

https://media.githubusercontent.com/media/NVIDIA-ISAAC-ROS/.github/main/resources/isaac_ros_docs/repositories_and_packages/isaac_ros_cumotion/isaac_ros_cumotion_moveit/moveit_context.png/
  1. Then 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.

  2. Click the “Execute” button in RViz. The simulated Franka robot in Isaac Sim will follow the motion of the robot in RViz.