hijimasa / isaac-ros2-control-sample

This repository provides various utilities (operation with ros2_control, automatic sensor generation and sensor data publishing) for easy use of Isaac Sim.
https://hijimasa.github.io/isaac_ros2_utils/
MIT License
68 stars 7 forks source link
isaac-sim ros2 ros2-control ros2-humble sensor-simulation

isaac-ros2-control-sample

This repository shows how to control the robot from ros2_control to make Isaac Sim easier to use. Important packages are "topic_based_ros2_control" and "isaac_ros2_scripts". "topic_based_ros2_control" provide hardware_interface class and send the commands from ros2_control to "isaac_ros2_scripts". "isaac_ros2_scripts" is needed bacause Isaac Sim needs specific python environment. "isaac_ros2_scripts" has the python script to launch and control Isaac Sim.

The features of this repository are below:

Prerequisite

  1. Docker
  2. Isaac Sim Docker Image (Tested using image based on nvcr.io/nvidia/isaac-sim:2022.2.1)
  3. Nucleus Server (I installed with the Omniverse Laungher)

How to use

  1. Install Docker and pull Isaac Sim Docker Image. refer to https://docs.omniverse.nvidia.com/app_isaacsim/app_isaacsim/install_container.html

  2. Clone the repo to your ros2 workspace

    git clone https://github.com/hijimasa/isaac-ros2-control-sample.git
  3. Get git submodules

    cd isaac-ros2-control-sample
    git submodule update --init --recursive
  4. Build a docker image with shell script.

    cd docker
    ./build_docker_image.sh
  5. Launch a docker container

    ./launch_docker.sh
  6. Build ros2 source codes

    colcon build && source install/setup.sh
  7. Launch the package

    7.1. For Mobile Robot

    • To launch simulator

      ros2 run isaac_ros2_scripts launcher
    • To spawn robot (another terminal)

      docker exec -it isaac-sim /bin/bash
      ros2 launch isaac_diffbot_sim diffbot_spawn.launch.py
    • To launch teleop_twist_keyboard (another terminal)

      docker exec -it isaac-sim /bin/bash
      ros2 run teleop_twist_keyboard teleop_twist_keyboard

      7.2. For Arm Robot

    • To launch simulator

      ros2 run isaac_ros2_scripts launcher
    • To spawn robot (another terminal)

      docker exec -it isaac-sim /bin/bash
      ros2 launch franka_moveit_config demo.launch.py 

[!NOTE] For the first time, launching Isaac Sim takes a very long time. Isaac Sim must be fully launched to spawn the robot.

Next

You can make URDF for Isaac Sim with this documentation.

Bug