Rviz2 does not work with nvidia docker container

Jetson Orin Nano, Kernel 35.3.1, Jetpack 5.1.1

I am running rviz2 in a terminal locally on the jetson connected to the docker container. When I try to launch rviz2 for the example in isaac_ros_visual_slam it fails to launch and gives me this error:

admin@jake-nvidia:/workspaces/isaac_ros-dev$ rviz2 -d src/isaac_ros_visual_slam/isaac_ros_visual_slam/rviz/default.cfg.rviz 
qt.qpa.xcb: could not connect to display 
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Aborted (core dumped)

I’ve followed all of the documentation for setting up the environment, what am I missing?

2 Likes

I have recently experienced the same.

Hi @dakejahl

I suggest updating to the latest version of Isaac ROS 2.0. We’ve made significant updates to our Docker and all Isaac ROS packages, and we also have new documentation: NVIDIA Isaac ROS — isaac_ros_docs documentation.

I suggest updating your Jetson to Jetpack 5.1.2 as it is required for Isaac ROS.
https://nvidia-isaac-ros.github.io/getting_started/index.html#system-requirements

I also bumped into that error.

Check the environment var $DISPLAY (from a container shell). if it is empty/undefined try this:

export DISPLAY=:0

and run rviz2 again.