Skip to content

This repository provides various utilities (operation with ros2_control, automatic sensor generation and sensor data publishing) for easy use of Isaac Sim for drone development.

License

Notifications You must be signed in to change notification settings

SasaKuruppuarachchi/isaacsim_ros2_drone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Comprehensive Guide to Dokerised implementation of IsaacSim with ROS 2 for drone development

This dockerised implementation is made with aspirations from following open-source repositories. Credits should go to the respective creators.

Installation

Prerequisites

  • Ubuntu 20.04/22.04 Operating System
  • NVIDIA GPU (RTX 2070 or higher)
  • NVIDIA GPU Driver (recommended version 525.85)

Nucleus Server

Download and install Omniverse Launcher and install Nucleus Server

Installing docker

Follow the latest instructions at the official docker page

Installing Portainer CE

Portainer CE is an open-source GUI for creating and managing docker containers. Install it following these instructions

Installing Nvidia Docker

Install the Nvidia Container toolkit with These Instructions

If GPUs fail to load after deploying Isaac sim docker please follow these instructions. TODO

General Installation

  1. Clone the repo to your ros2 workspace

    git clone https://github.com/SasaKuruppuarachchi/isaacsim_ros2_drone.git
  2. Get git submodules

    cd isaacsim_ros2_drone
    git submodule update --init --recursive
    cd px4
    git clone -b v1.14.0-rc2 https://github.com/PX4/PX4-Autopilot.git --recursive
  3. Build a docker image with shell script.

    cd docker
    chmod +x build_docker_image.sh
    ./build_docker_image.sh
  4. Launch a docker container

    ./launch_docker.sh
  5. Launch Isaac Sim

    At this point, you are expected to have NVIDIA Isaac Sim fully installed and working. To make sure you have everything setup correctly, open a new terminal window (Ctrl+Alt+T), and test the following commands:

    Check that the simulator app can be launched

    • Run the simulator with the --help argument to see all available options
    ISAACSIM --help
    • Run the simulator. A new window should open
    ISAACSIM

    Check that you can launch the simulator from a python script (standalone mode)

    • Run the bundled python interpreter and see if it prints on the terminal "Hello World."
    ISAACSIM_PYTHON -c "print('Hello World.')"
    • Run the python interpreter and check if we can run a script that starts the simulator and adds cubes to the world
    ISAACSIM_PYTHON ${ISAACSIM_PATH}/standalone_examples/api/omni.isaac.core/add_cubes.py

    If you were unable to run the commands above successfuly, then something is incorrectly configured. Please do not proceed with this installation until you have everything setup correctly.

Note

Secondary screens could freeze due to a bug in Nvidia driver. Disconnect and reconnect the HDMI If Isaac sim failed to launch please post the log in issues section

  1. Attach to docker in new terminal to build and launch Px4_Auopilot
    docker exec -it isaac-sim-ros2 bash
    cd /root
    cd PX4-Autopilot
    make px4_sitl_default none
    if PX4 lauched properly you can exit out of it.

Note

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

Enabling Pegasus Simulator in Isaacsim (First Operation)

  1. Launch ISAACSIM application.

  2. Open the Window->extensions on the top menubar inside Isaac Sim. alt text

  3. On the Extensions manager menu, we can enable or disable extensions. By pressing the settings button, we can add a path to the Pegasus-Simulator repository.

    alt text

  4. The path inserted should be the path to the repository followed by /extensions.

    alt text

  5. After adding the path to the extension, we can enable the Pegasus Simulator extension on the third-party tab.

    alt text

When enabling the extension for the first time, the python requirements should be install automatically for the build in ISAACSIM_PYTHON , and after a few seconds, the Pegasus widget GUI should pop-up.

  1. The Pegasus Simulator window should appear docked to the bottom-right section of the screen.

    alt text

Getting Started

  1. Open a new terminal to launch QGC

    docker exec -it isaac-sim-ros2 bash
    su ubuntu
    cd
    ./QGroundControl.AppImage
  2. If Isaacsim is not running alunch in a new terminal

    docker exec -it isaac-sim-ros2 bash
    ISAACSIM
  3. Make sure the Pegasus Simulator Extension is enabled.

    alt text

  4. On the Pegasus Simulator tab in the bottom-right corner, click on the Load Scene button.

    alt text

  5. Again, on the Pegasus Simulator tab, click on the Load Vehicle button.

    alt text

  6. Press the play button on the simulator's control bar on the left corner.

    alt text

  7. On QGroundControl, an arrow representing the vehicle should pop-up. You can now perform a take-off, but pressing the take-off button on top-left corner of QGroundControl.

    alt text

  8. On QGroundControl, left-click on a place on the map, press Go to location and slide at the bottom of the screen to confirm the target waypoint for the drone to follow.

    alt text

About

This repository provides various utilities (operation with ros2_control, automatic sensor generation and sensor data publishing) for easy use of Isaac Sim for drone development.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published