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

CH_YZ's profile - activity

2020-03-02 02:54:09 -0500 received badge  Famous Question (source)
2019-11-09 16:54:49 -0500 received badge  Notable Question (source)
2019-11-05 00:12:30 -0500 received badge  Supporter (source)
2019-10-31 04:36:50 -0500 received badge  Enthusiast
2019-10-17 08:51:46 -0500 received badge  Popular Question (source)
2019-10-17 07:16:10 -0500 marked best answer Rviz crash with exception raised by qt.qpa.screen

It's a really weird problem. When I'm trying to launch my launch file using the terminal embedded in VIsual Studio Code, I got an error called "qt.qpa.screen: QXcbConnection: Could not connect to display Could not connect to any X display." But rviz seems totally OK while using the vanilla terminal.

Part of my launch file is shown below:

<launch>
    <node type="rviz" name="rviz" pkg="rviz" args=" $(find detect_core)/rviz/config.rviz" />
    <node pkg="detect_core" type="detect_core_node" name="detect_core_node" output="screen"/>
</launch>

When I launch this file in VSCode, it shows the following message while all the other processes works normally:

qt.qpa.screen: QXcbConnection: Could not connect to display  Could not connect to any X display.
[rviz-4] process has died [pid 2702, exit code 1, cmd /opt/ros/melodic/lib/rviz/rviz
/home/hcd/ROS_LiDAR/src/LiDAR/detect_core/rviz/config.rviz
__name:=rviz __log:=/home/hcd/.ros/log/053e51c0-f088-11e9-91c8-d0abd582c8c3/rviz-4.log].
log file:
/home/hcd/.ros/log/053e51c0-f088-11e9-91c8-d0abd582c8c3/rviz-4*.log

But when I launch rviz directly from terminal, it works perfectly fine.

(base) <font color="#8AE234"><b>hcd@hcd-PC</b></font>:<font color="#729FCF"><b>~</b></font>$ rviz
[ INFO] [1571281807.940736481]: rviz version 1.13.4
[ INFO] [1571281807.940797989]: compiled against Qt version 5.9.5
[ INFO] [1571281807.940823596]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1571281807.944071605]: Forcing OpenGl version 0.
[ INFO] [1571281808.422031984]: Stereo is NOT SUPPORTED
[ INFO] [1571281808.422139032]: OpenGl version: 4.6 (GLSL 4.6).

Thank you for your help~~

2019-10-17 07:16:10 -0500 received badge  Scholar (source)
2019-10-17 03:58:21 -0500 edited question Rviz crash with exception raised by qt.qpa.screen

Rviz crash with exception raised by qt.qpa.screen It's a really weird problem. When I'm trying to launch my launch file

2019-10-17 03:57:40 -0500 commented question Rviz crash with exception raised by qt.qpa.screen

Yes, I've just solved this problem simply by setting the correct DISPLAY environment variable. Many thanks for your comm

2019-10-16 23:50:09 -0500 asked a question Rviz crash with exception raised by qt.qpa.screen

Rviz crash with exception raised by qt.qpa.screen It's a really weird problem. When I'm trying to launch my launch file