在只有集成显卡的硬件设备中,一键安装后无法使用rviz和gazebo
-
@小鱼 Docker是20.10.17
-
-
@小鱼 是一键安装
echo $DISPLAY返回是:unix:0
-
-
@小鱼 不好意思,用的是Ubuntu20.04.4LTS
-
-
@小鱼 好的,我看一下,设备出了点问题,重启以后打不开了,我先解决一下
-
@小鱼
运行命令xhost +local后显示如下:root@nuc:/home/ji# xhost +local xhost: bad hostname "local"
系统架构信息:
root@nuc:/home/ji# uname -a Linux nuc 5.15.0-41-generic #44~20.04.1-Ubuntu SMP Fri Jun 24 13:27:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
是x86_64
-
-
@小鱼 不好意思,刚接触linux系统,请问这样是在主机中运行吗,运行后显示如下:
ji@nuc:~$ xhost +local: non-network local connections being added to access control list
进入docker运行rviz仍同上报错:
ji@nuc:~$ noetic_doc 请输入指令控制noetic_doc: 重启(r) 进入(e) 启动(s) 关闭(c) 删除(d) 测试(t): e root@c6007510217b:/home/ji# rviz QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root' [ INFO] [1660107576.340199138]: rviz version 1.14.14 [ INFO] [1660107576.340237485]: compiled against Qt version 5.12.8 [ INFO] [1660107576.340252722]: compiled against OGRE version 1.9.0 (Ghadamon) [ INFO] [1660107576.348258794]: Forcing OpenGl version 0. libGL error: MESA-LOADER: failed to retrieve device information libGL error: MESA-LOADER: failed to retrieve device information Segmentation fault (core dumped)
-
@澄 输入docker ps -a看看,现在比较怀疑镜像问题。
-
@小鱼 docker ps -a显示如下:
ji@nuc:~$ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES c6007510217b fishros2/ros:noetic-desktop-full "/bin/bash" 2 days ago Up 39 minutes noetic_doc
-
@澄 我查了下这个错误,目前担心是因为权限等原因都不到显卡相关的配置之类造成的.我挺想远程看看,仔细检查下关于这个容器的配置.
你可以测试下下面的指令(我添加了显示相关的设备)sudo docker run -it --rm -v /tmp/.X11-unix:/tmp/.X11-unix --device /dev/snd --device=/dev/dri/renderD128 -v /dev/dri:/dev/dri -e DISPLAY=unix$DISPLAY fishros2/ros:noetic-desktop-full
-
@小鱼 这个命令运行后显示如下:
ji@nuc:~$ sudo docker run -it --rm -v /tmp/.X11-unix:/tmp/.X11-unix --device /dev/snd --device=/dev/dri/renderD128 -v /dev/dri:/dev/dri -e DISPLAY=unix$DISPLAY fishros2/ros:noetic-desktop-full [sudo] ji 的密码: root@390ca9b7cbf1:/#
-
此回复已被删除! -
@澄 直接在终端里输入rviz看看能不能显示
-
@小鱼
运行后报错如下:ji@nuc:~$ sudo docker run -it --rm -v /tmp/.X11-unix:/tmp/.X11-unix --device /dev/snd --device=/dev/dri/renderD128 -v /dev/dri:/dev/dri -e DISPLAY=unix$DISPLAY fishros2/ros:noetic-desktop-full [sudo] ji 的密码: root@390ca9b7cbf1:/# rviz No protocol specified qt.qpa.xcb: could not connect to display unix:0 qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. 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. Aborted (core dumped) root@390ca9b7cbf1:/# exit exit ji@nuc:~$ rviz Command 'rviz' not found, but can be installed with: sudo apt install rviz
-
@澄 这个错误令人欣喜一些,尝试依次输入以下指令看看
xhost +local: sudo docker run -it --rm -v /tmp/.X11-unix:/tmp/.X11-unix --device /dev/snd --device=/dev/dri/renderD128 -v /dev/dri:/dev/dri -e DISPLAY=unix$DISPLAY fishros2/ros:noetic-desktop-full rviz
-
@小鱼 运行后跳出弹窗如下:
-
@澄 在 在只有集成显卡的硬件设备中,一键安装后无法使用rviz和gazebo 中说:
@小鱼 运行后跳出弹窗如下:
Could not contact ROS master at [http://localhost:11311], retrying.
ji@nuc:~$ xhost +local: non-network local connections being added to access control list ji@nuc:~$ sudo docker run -it --rm -v /tmp/.X11-unix:/tmp/.X11-unix --device /dev/snd --device=/dev/dri/renderD128 -v /dev/dri:/dev/dri -e DISPLAY=unix$DISPLAY fishros2/ros:noetic-desktop-full root@c38e2be79c63:/# rviz QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root' [ INFO] [1660185251.829148524]: rviz version 1.14.14 [ INFO] [1660185251.829199001]: compiled against Qt version 5.12.8 [ INFO] [1660185251.829211805]: compiled against OGRE version 1.9.0 (Ghadamon)