Newbie: How to Use Intel Realsense in the ROS2 Foxy Docker Container on Jetson Nano

I am a rookie to RealSense and Docker Containers. I am on a robotics design team and we are using a Jetson Nano running the ROS2 Foxy Docker Container.

I’ve scoured the internet but been unable to put the pieces together so far:
What do I need to do to use the RealSense Cameras in a ROS2 Docker Container? I’ve seen the RealSense SDK, the RealSense ROS2 Wrappers, etc. but I do not know how to connect the RealSense camera feeds to the ROS2 container. Any advice or guidance is appreciated, thanks!

Please check below blog to see if can help:
Accelerating AI Modules for ROS and ROS 2 on NVIDIA Jetson Platform | NVIDIA Developer Blog

1 Like

Hello and thanks! I have looked through this blog, this was my starting place. My main questions are, once I have pulled the docker image, how do I start a docker container from the image? And when I have a container up and running, do I do all of my development inside of it, or do I pass information in and out of the container?

Hi @user71867, you can start the container like this:

sudo docker run -it --rm --net=host --runtime nvidia dustynv/ros:foxy-ros-base-l4t-r32.6.1

(substitute the corresponding tag of the container you wish to start)

It’s recommended to create your own container based off of my ROS2 container using a Dockerfile. In the Dockerfile you will put the commands for building your packages, ect. This way it will be automated whenever you need to rebuild the container (as opposed to doing it by hand).

For an example of this, check out my jetbot_ros Dockerfile, which uses Foxy container as a base:
https://github.com/dusty-nv/jetbot_ros/blob/master/Dockerfile

If you are new to Docker, I recommend checking out some basic tutorials about running containers, making your own containers, ect (it isn’t specific to Jetson, other than the --runtime nvidia flag)

1 Like

Thanks dusty, I will follow the links and continue to study up. Knowing that I need to build my own Dockerfile is key.

Also, I would like to suggest an edit to your docker run command: there is an error in it but I piece together the correct command from the last line in your post. The command then is this:

sudo docker run -it --rm --net=host --runtime nvidia dustynv/ros:foxy-ros-base-l4t-r32.6.1

Ah thanks - sorry for the typo! :) I have fixed it above in my original post.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.