I am using ROS Melodic on Ubuntu 18.04 with gazebo9 and Xlaunch. I have been able to launch an empty workspace of gazebo but for some reason when I run rosrun rviz rviz
, I get this error message:
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
qt.qpa.screen: QXcbConnection: Could not connect to display
Could not connect to any X display.
I have roscore running with no errors, so I dont believe its that which is causing the problem This is the full script:
Gazebo
root@DESKTOP-GFT05HU:/mnt/c/Users/Frank# export GAZEBO_IP=127.0.0.1
root@DESKTOP-GFT05HU:/mnt/c/Users/Frank# export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0
root@DESKTOP-GFT05HU:/mnt/c/Users/Frank# export LIBGL_ALWAYS_INDIRECT=0
root@DESKTOP-GFT05HU:/mnt/c/Users/Frank# gazebo
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function
snd_func_card_driver returned error: No such file or
directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function
snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function
snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory
[Err] [REST.cc:205] Error in REST request
libcurl: (51) SSL: no alternative certificate subject name matches target host name 'api.ignitionfuel.org'
Rviz:
root@DESKTOP-GFT05HU:/mnt/c/Users/Frank# rosrun rviz rviz
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
qt.qpa.screen: QXcbConnection: Could not connect to display
Could not connect to any X display.