Do you want to build your own NVIDIA Isaac ROS docker for your robot?
This template is made it for you! You only need to fork this repository!
Follow the steps below to be Isaac ROS GEMs dockerized:
- What do you need?
- How to use this template
- Where to edit?
- Build Isaac ROS Docker image
- Run You Isaac ROS docker container
- Debug your container
- Reference
An example to use this template, watch this repository: isaac_ros_realsense_example
You need:
- NVIDIA Jetson
- NVIDIA Jetson AGX Xavier
- NVIDIA Jetson Xavier NX
- NVIDIA Jetson Nano (4Gb or 2Gb)
- NVIDIA Jetpack 4.6.1
If you are looking to build a docker container for x86 machines, please look the NVIDIA Isaac common repository
- Click on Use this template like the image below
- On the next dialog, write a new name for your repository you would like to start and decide if you want all of the branches, or just the latest Isaac ROS distribution.
- Click on Create repository from this template
Github will then create a new repository with the contents of this one in your account. It grabs the latest changes as "initial commit".
- Now you can clone your repo as usual
There are three parts on this template to edit:
Let's move step by step and learn where you need to change
There are mainly 3 stage where you can work:
- Stage 2 (around line 128): "Install dedicate packages for Isaac ROS"
- Stage 4 (around line 161): "Install your ROS2 dependecies"
- Stage 7 (around line 206): "Write your runtime command at startup"
If you are working with a specific Isaac ROS package, maybe you need to add specific dependecies.
Below a dependecies example that you need to install to for Isaac ROS image segmentation:
# Install Tao converter
RUN mkdir -p /opt/nvidia/tao && \
cd /opt/nvidia/tao && \
wget https://developer.nvidia.com/jp46-20210820t231431z-001zip && \
unzip -j jp46-20210820t231431z-001zip -d /opt/nvidia/tao/jp4.6 && \
chmod 755 $(find /opt/nvidia/tao -name "tao-converter") && \
ln -sf $(find /opt/nvidia/tao -name "tao-converter") /opt/nvidia/tao/tao-converter && \
rm jp46-20210820t231431z-001zip
# Add Tao converter to PATH
ENV PATH="${PATH}:/opt/nvidia/tao"
Remember to follow the Docker writlines guidelines to install al you need.
Like the stage 2 write in this stage all dependecies you need to be able to build your ROS2 packages.
Remember to follow the Docker writlines guidelines to install al you need.
In this stage you need to uncomment the last line and write your specific launcher you want to run.
CMD ["ros2", "launch", "your_ros2_pkg", "your_launcher.launch.py"]
This rosinstall file collect all Isaac ROS repository you need to use for your robot.
Do you know how to make a rosinstall file? The full rosinstall documentation is available here!
Briefly you need only to add after Isaac ROS common, 3 lines for each repository like below:
- git:
local-name: <REPOSITORY NAME>
uri: <REPOSITORY URL>
PLEASE, DO NOT DELETE Isaac ROS common! It's always a repository needed in your Isaac ROS rosinstall portfolio
Like above you can add here all your workspaces you want to add in your Dockerfile
bash build_image.bash [PROJECT_NAME]
PROJECT_NAME = Name project build
Options:
- -v - Verbose
- -ci - Build docker without cache
- --push - Push docker image. Before to push, you need to be logged in
- --tag [TAG_NAME] - Tag release (Default tag: latest)
- --pull-base-image - Force to re-pull the base image
This script also check in the beginning if:
- You are running on ARM64 architecture
- Your NVIDIA Jetson have the right requirements
- Your NVIDIA Jetson use the right NVIDIA runtime container and is able to build a certain of Isaac ROS packages
Such as example if you want to build an image isaac_ros_template
you will need to write:
bash build_image.bash isaac_ros_template
where the docker image will be: isaac_ros_template:latest
If you are reading this chapter, you are in the end of the process and you want to try Isaac ROS.
docker run --rm --network host [PROJECT_NAME]:latest
What are means the options above:
- --rm - When you switch off the container will be also deleted
- --network host - This container will share the network with the host. This option is helpful to read all topics from your host or from your laptop.
If you want to leave this container, you need only to press CTRL-D
.
Hint: there are devices that need to be conneted with your container. You can also add the option --device or --privileged.
Another way to use your docker image, is make a docker compose file, if you never hear that, watch the documentation
Write a file called docker-compose.yml
and write like below:
version: "3.9"
services:
isaac_ros_service:
image: [PROJECT_NAME]:latest
network_mode: host
volumes:
# If you are working with a MIPI camera
# you need to uncomment the line below
# - "/tmp/argus_socket:/tmp/argus_socket"
If you want to run this compose, remember to use:
docker compose up
If you have build your image with isaac_ros_template
the command will be like:
docker run --rm --network host isaac_ros_template:latest
A good way to work with your docker image and check works well or is well built, you can use the command below
docker run --rm --network host -it [PROJECT_NAME]:latest bash
This command, will make a new container with a bash attached on your current terminal and you will be able to work on it. If you want to leave this container, you need only to press CTRL-D
.
If you want to test meanwhile the docker is running you can use:
docker exec -it <DOCKER_CONTAINER_NAME> bash
In this case, your terminal will be attached to the your docker Isaac ROS container.
- NVIDIA Isaac
- NVIDIA Isaac ROS GEMs
- NVIDIA Isaac ROS GEMs repositories
- NVIDIA Jetson
- NVIDIA Jetson containers
- NVIDIA Jetpack
Developer blog posts and webinars:
- Integrating Isaac ROS Visual Odometry GEM on Jetson
- Isaac ROS tutorial Many examples to build your own docker for Isaac ROS
- Designing Robots with NVIDIA Isaac GEMs for ROS
Robot example with Isaac ROS:
- nanosaur.ai
- nanosaur architecture
- nanosaur_perception GPU accelerated repository