Ubuntu24.04一键安装ROS2
参考
https://zhuanlan.zhihu.com/p/30984497406
使用命令进行一键安装,省去了配置环境的麻烦
wget http://fishros.com/install -O fishros && . fishros
主要命令就是这个,然后一步一步进行安装。
然后参考这个博客,进行ROS2的测试
Ubuntu24.04安装ROS2 Jazzy-CSDN博客
从这个地方往下走进行测试
运行这个命令,一切正常
#打开一个新终端,输入命令,发布话题source /opt/ros/jazzy/setup.bash
ros2 run demo_nodes_cpp talker#打开另一个新终端,接收话题source /opt/ros/jazzy/setup.bash
ros2 run demo_nodes_py listener
在进行小海龟测试,运行下面这个命令的时候,出了问题
ros2 run turtlesim turtlesim_node
ros2 run turtlesim turtle_teleop_key
ros2 run turtlesim turtlesim_node
qt.qpa.xcb: could not connect to display
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, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.[ros2run]: Aborted
猜测是因为没有安装图形化程序,所以导致这个小海龟程序不能运行的问题