Hello everyone,
I’m developing on an NVIDIA AGX THOR running Ubuntu 22.04 with ROS 2 Humble. I’m trying to set up a development environment using a dev container, but I’ve run into a few issues.
My main problems are:
-
Network Pass-through: I am using --network=host
to enable network passthrough for inter-container communication, but it’s not working as expected.
-
Running RViz2: I am unable to run RViz2 from within the container. It either fails to launch or displays a blank screen.
I know using --privileged
is a security risk, but it seems to be the only way to get some hardware access working. What is a safer and better alternative to --privileged
for accessing hardware from within a dev container on the AGX THOR?
Also, is there a comprehensive step-by-step guide for setting up a ROS 2 Humble development environment inside a dev container on this specific hardware?
Any advice or guidance would be greatly appreciated. Thank you!
Dear @vincentho322001 ,
Are you using Jetson or DRIVE platform?
You didn’t give much information on how you are doing this; following might help.
Add to your Dockerfile
ENV RMW_IMPLEMENTATION=rmw_fastrtps_cpp #or the rmw_implmentation you intend to use.
RUN apt install ros-humble-rviz2 #and any of these:
ros-humble-rmf-visualization-rviz2-plugins/jammy 2.0.2-1jammy.20250913.225840 arm64
A package containing RViz2 plugins for RMF
ros-humble-rmf-visualization-rviz2-plugins-dbgsym/jammy 2.0.2-1jammy.20250913.225840 arm64
debug symbols for ros-humble-rmf-visualization-rviz2-plugins
ros-humble-rviz-2d-overlay-plugins/jammy 1.3.1-1jammy.20250913.195133 arm64
RViz2 plugin for 2D overlays in the 3D view.
ros-humble-rviz2/jammy,now 11.2.20-1jammy.20250913.230000 arm64 [installed]
3D visualization tool for ROS.
ros-humble-rviz2-dbgsym/jammy 11.2.20-1jammy.20250913.230000 arm64
debug symbols for ros-humble-rviz2
ros-humble-vision-msgs-rviz-plugins/jammy 4.1.1-1jammy.20250913.232459 arm64
RVIZ2 plugins for visualizing vision_msgs`
To allow the container to use your X server, run following on Thor
xhost +si:localuser:root
Here’s a potentially workable docker run command; but use your docker image that you might base on ros:humble-perception
docker run --rm -it \
--runtime nvidia \
--net=host --ipc=host \
-e DISPLAY=$DISPLAY \
-e QT_X11_NO_MITSHM=1 \
-e NVIDIA_DRIVER_CAPABILITIES=graphics,utility,compute \
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
--name ros2-rviz \
ros:humble-perception