
使用 MobaXterm 启动 wsl 后,单独运行 rosrun rviz rviz
会提示下面内容
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-lbh18'
[ INFO] [1755249813.619356600]: rviz version 1.13.30
[ INFO] [1755249813.619461500]: compiled against Qt version 5.9.5
[ INFO] [1755249813.619499300]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1755249813.624884600]: Forcing OpenGl version 0.
Segmentation fault
但是使用 xeyes 测试2D图形界面可以正常弹出
使用下面命令打开ur3模型时提示信息如下, 无法弹出 Rviz 主界面
roslaunch ur3 display.launch
提示信息如下
... logging to /home/lbh18/.ros/log/0b0d7f18-79ad-11f0-b02a-00155d1bc47d/roslaunch-exlibh4123-4243.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://exlibh4123:41021/
SUMMARY
========
PARAMETERS
* /robot_description: <...>
* /rosdistro: melodic
* /rosversion: 1.14.13
NODES
/
joint_state_publisher_gui (joint_state_publisher_gui/joint_state_publisher_gui)
robot_state_publisher (robot_state_publisher/robot_state_publisher)
rviz (rviz/rviz)
ROS_MASTER_URI=http://localhost:11311
process[joint_state_publisher_gui-1]: started with pid [4265]
process[robot_state_publisher-2]: started with pid [4266]
process[rviz-3]: started with pid [4267]
[ WARN] [1755249883.997476900]: The root link base_link has an inertia specified in the URDF, but KDL does not support a root link with an inertia. As a workaround, you can add an extra dummy link to your URDF.
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-lbh18'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-lbh18'
[rviz-3] process has died [pid 4267, exit code -11, cmd /opt/ros/melodic/lib/rviz/rviz -d /home/lbh18/catkin_ws/src/ur3/urdf.rviz __name:=rviz __log:=/home/lbh18/.ros/log/0b0d7f18-79ad-11f0-b02a-00155d1bc47d/rviz-3.log].
log file: /home/lbh18/.ros/log/0b0d7f18-79ad-11f0-b02a-00155d1bc47d/rviz-3*.log
^C[robot_state_publisher-2] killing on exit
[joint_state_publisher_gui-1] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done
请问这个问题怎么解决呢? 希望各大家指教!
_# 在 powershell 中运行 wsl ,执行 roslaunch ur3 display.launch 一切正常,可以弹出 Rviz 主窗体, 但是我想使用 Mobaterm _