ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

rqt could not connect to display

asked 2023-05-21 04:41:41 -0500

givebuff gravatar image

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.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2023-08-09 03:47:05 -0500

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

edit flag offensive delete link more
0

answered 2023-07-30 10:37:05 -0500

Mike Scheutzow gravatar image

updated 2023-07-30 10:38:01 -0500

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.

edit flag offensive delete link more
0

answered 2023-07-29 07:47:41 -0500

harry23 gravatar image

is there any solution you found?

edit flag offensive delete link more

Question Tools

Stats

Asked: 2023-05-21 04:39:21 -0500

Seen: 673 times

Last updated: Jul 30 '23