eProsima / Fast-DDS-monitor

eProsima Fast DDS Monitor is a graphical desktop application aimed at monitoring DDS environments deployed using the eProsima Fast DDS library. Looking for commercial support? Contact info@eprosima.com
https://eprosima.com
GNU General Public License v3.0
42 stars 11 forks source link

Fast-DDS Monitor crash on ROS 2 Humble based container (Qt, X11 related) #217

Open ezamoraa opened 9 months ago

ezamoraa commented 9 months ago

Hi,

I am trying to run the FastDDS monitor v2.0.0 on the same Docker container as my ROS 2 application is running. This container is based on the ros:humble-ros-base-jammy official image. The monitor program crashes with the following error (tried two methods):

With the AppImage runner:

The X11 connection broke: No error (code 0)
XIO:  fatal IO error 0 (Success) on X server ":0.0"
      after 428 requests (428 known processed) with 0 events remaining.

With the fastdds_monitor executable installed with the run script installer:

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-ros'
The X11 connection broke: No error (code 0)
X connection to :0.0 broken (explicit kill or server shutdown).

The container was created with the following command:

xhost local:root
docker run -it --privileged -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix ros:humble-ros-base-jammy bash

In the same terminal where the error is seen, I can immediately run graphical applications like rviz with no issue, so the X11 client can communicate correctly in general to run GUI applications.

The FastDDS monitor Docker container does work correctly on this environment, and seems to be based on the same Ubuntu Jammy 22.04 image, so it must be some dependency or configuration issue in the ROS 2 container.

Any pointer is appreciated.

NOTE (context): I first tried running the FastDDS monitor Docker container next to my ROS 2 container, but I only managed to get statistics for a few discovery events that seem to have gone through the Docker network. Since I am relying on shared memory data sharing I guess the /dev/shm from the ROS 2 container must be visible to the monitor, thus I am trying to run the monitor in the same container.