/husky_demo

Husky Simulation and Hardware In the Loop simulation on Isaac SIM with Isaac ROS

Primary LanguagePythonMIT LicenseMIT

Husky Demo

husky 3D mapping

Tested on Isaac Sim 2023.1.0 and Isaac Sim 2023.1.1

Hardware required

Workstation:

  1. Internet connection
  2. x86/64 machine
  3. Install Ubuntu 22.04
  4. Install ROS2 Humble
  5. NVIDIA Graphic card with RTX
  6. Display
  7. Keyboard and Mouse

NVIDIA Jetson:

  1. NVIDIA Jetson Orin Nano
  2. Jetpack 5.1.2

Tools:

  1. Router
  2. eth cables

Setup hardware and installation

Before to start check you have all requirements and connect the driver following this image

hardware-setup

It is preferable to connect workstation and the NVIDIA Jetson Orin Nano with a lan cable and not use WiFi.

Install ROS2 Humble on Desktop

Follow the Isaac Sim 2023 official documentation and check or install ROS2 Humble on your desktop Running native ROS.

In quick steps:

  1. Download ROS 2 following the instructions on the official website: ROS 2 Humble Ubuntu 22.04
  2. Source the ROS environment in the terminal. You must perform this step each time before using any ROS commands.
source /opt/ros/humble/setup.bash
Install vision_msgs_package
  1. Install vision msgs package
sudo apt install ros-humble-vision-msgs

Install latest NVIDIA Isaac Sim

Follow the documentation on NVIDIA Isaac Sim Workstation install

  1. Download the Omniverse Launcher
  2. Install Omniverse Launcher
  3. Install Cache from the Omniverse Launcher
  4. Install Nucleus from the Omniverse Launcher

Open Omniverse Launcher

Omniverse launcher

Move to Library and choice "Omniverse Isaac Sim" and download the latest 2023.1.1 version

Omniverse library

Install Husky Demo on your workstation

Clone this repository

git clone https://github.com/NVIDIA-AI-IOT/husky_demo.git
cd husky_demo

Run this script that is also the installer for your workstation on all tools

./husky_demo.sh

Install Husky Demo on NVIDIA Jetson

In this section you connect to your NVIDIA Jetson with a ssh connection, open a terminal an write

ssh <IP or hostname.local>

where IP is the of NVIDIA Jetson or hostname is the hostname of your board.

If you are connected the output from the terminal is:

ssh-terminal-orin.png

Clone this repository

git clone https://github.com/NVIDIA-AI-IOT/husky_demo.git
cd husky_demo

Add docker group to your user

sudo usermod -aG docker $USER && newgrp docker

Set the default nvidia runtime

You're going to be building containers, you need to set Docker's default-runtime to nvidia, so that the NVCC compiler and GPU are available during docker build operations. Add "default-runtime": "nvidia" to your /etc/docker/daemon.json configuration file before attempting to build the containers:

{
    "default-runtime": "nvidia",
    "runtimes": {
        "nvidia": {
            "path": "nvidia-container-runtime",
            "runtimeArgs": []
        }
    }
}

Then restart the Docker service, or reboot your system before proceeding:

sudo systemctl restart docker

Run the installer and run script

./husky_demo.sh

Run demo

Now you can run your Husky demo, but you need to follow the steps below

Run on your workstation

On the second terminal run, like the message appeared

ros2 launch husky_isaac_sim robot_display.launch.py

This script will load husky on Isaac Sim and open rviz on your terminal

husky-isaac-sim

If you want, you can redock manually all viewports and obtain something like that

husky-redock

Script to run on your Jetson Nano

If everthing went well from the installation, you can run the command below

bash src/husky_isaac_sim/scripts/run_in_docker.sh

now you will see husky mapping on your rviz

husky-rviz

Drive Husky

There are several options:

  1. Drive by keyboard
  2. Drive by joystick
  3. Drive with Nav2

Follow below all options

Drive by keyboard

Open a new terminal and run

ros2 run teleop_twist_keyboard teleop_twist_keyboard

if this package is not available, install

sudo apt install ros-humble-teleop-twist-keyboard

Drive by joystick

Open a new terminal and run

ros2 run teleop_twist_joy teleop_twist_joy

if this package is not available, install

sudo apt install ros-humble-teleop-twist-joy

Drive with Nav2

You can simply use rviz2 and press "Goal to pose" to select a new goal for Husky to achieve.

Change Isaac Sim version

If you want to change Isaac Sim version on this demo you can simply do:

  • Open husky_demo.sh file
  • On line 33 change ISAAC_SIM_VERSION variable with your current version and write: isaac_sim-<VERSION>

If you don't know which version you have installed on your workstation open the library on the Isaac Sim page you will find below the button "launch" your current version installed

version Isaac Sim