rqt could not connect to display
Hello I am using Turtlebot 3 and the installed operating system is foxy. The Ubuntu version is 20.04.6 LTS. When I try to run it using rqt command
could not connect to display
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.
Asked by givebuff on 2023-05-21 04:39:21 UTC
Answers
I will assume you are asking about a real physical robot, not a simulation, and you are not running ros in a Virtual Machine (VM).
"rqt" is a graphical application, so it requires a Graphical Desktop and a mouse/keyboard/screen to use it. You do not run this command on the robot itself. The expectation is that you set up a separate computer with the same version of ros, network the robot and the laptop together, and then run the rqt app on the laptop.
Asked by Mike Scheutzow on 2023-07-30 10:37:05 UTC
Comments
Hi
I also have this error and solved by below step, and hope this can give you a hint to fix your problem.
device: ubuntu 20.04 LTS
without nivida gpu:
xhost local:root XAUTH=/tmp/.docker.xauth docker run --rm -it \ --name=linux_gui \ --env="DISPLAY=$DISPLAY" \ --env="QT_X11_NO_MITSHM=1" \ --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \ --env="XAUTHORITY=$XAUTH" \ --volume="$XAUTH:$XAUTH" \ --net=host \ --privileged \ osrf/ros:humble-desktop-03 \ bash
with nivida gpu: sudo apt-get update sudo apt-get install nvidia-container-runtime sudo apt-get install nvidia-docker2 sudo systemctl daemon-reload sudo systemctl restart docker
xhost local:root XAUTH=/tmp/.docker.xauth docker run --rm -it \ --env="DISPLAY=$DISPLAY" \ --env="QT_X11_NO_MITSHM=1" \ --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \ --env="XAUTHORITY=$XAUTH" \ --volume="$XAUTH:$XAUTH" \ --net=host \ --privileged \ --runtime=nvidia \ osrf/ros:humble-desktop-03 \ bash
Asked by lihuizhou on 2023-08-09 03:47:05 UTC
Comments