@小鱼 感谢鱼哥,目前问题已经解决,但又有新的问题,gazebo显示不了画面,黑屏,然后强制退出,这是终端显示的信息
[INFO] [launch]: All log files can be found below /home/leolanqin/.ros/log/2024-12-26-15-44-58-483062-leolanqin-virtual-machine-223612 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [gzserver-1]: process started with pid [223654] [INFO] [gzclient-2]: process started with pid [223656] [INFO] [robot_state_publisher-3]: process started with pid [223658] [INFO] [spawn_entity.py-4]: process started with pid [223660] [robot_state_publisher-3] [INFO] [1735199099.598223513] [robot_state_publisher]: got segment ball_wheel_link [robot_state_publisher-3] [INFO] [1735199099.601007247] [robot_state_publisher]: got segment base_camera_link [robot_state_publisher-3] [INFO] [1735199099.601024540] [robot_state_publisher]: got segment base_footprint [robot_state_publisher-3] [INFO] [1735199099.601035621] [robot_state_publisher]: got segment base_laser_link [robot_state_publisher-3] [INFO] [1735199099.601044859] [robot_state_publisher]: got segment base_link [robot_state_publisher-3] [INFO] [1735199099.601054096] [robot_state_publisher]: got segment imu [robot_state_publisher-3] [INFO] [1735199099.601062893] [robot_state_publisher]: got segment left_wheel_link [robot_state_publisher-3] [INFO] [1735199099.601071599] [robot_state_publisher]: got segment right_wheel_link [gzserver-1] Gazebo multi-robot simulator, version 11.10.2 [gzserver-1] Copyright (C) 2012 Open Source Robotics Foundation. [gzserver-1] Released under the Apache 2 License. [gzserver-1] http://gazebosim.org [gzserver-1] [gzclient-2] Gazebo multi-robot simulator, version 11.10.2 [gzclient-2] Copyright (C) 2012 Open Source Robotics Foundation. [gzclient-2] Released under the Apache 2 License. [gzclient-2] http://gazebosim.org [gzclient-2] [spawn_entity.py-4] [INFO] [1735199100.414174211] [spawn_entity]: Spawn Entity started [spawn_entity.py-4] [INFO] [1735199100.414795862] [spawn_entity]: Loading entity published on topic /robot_description [spawn_entity.py-4] /opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/qos.py:307: UserWarning: DurabilityPolicy.RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL is deprecated. Use DurabilityPolicy.TRANSIENT_LOCAL instead. [spawn_entity.py-4] warnings.warn( [spawn_entity.py-4] [INFO] [1735199100.421157459] [spawn_entity]: Waiting for entity xml on /robot_description [gzclient-2] [Msg] Waiting for master. [gzclient-2] [Msg] Connected to gazebo master @ http://127.0.0.1:11345 [gzclient-2] [Msg] Publicized address: 192.168.112.128 [gzclient-2] [Wrn] [GuiIface.cc:120] Could not find the Qt platform plugin "wayland" in "" [gzclient-2] [Wrn] [Event.cc:61] Warning: Deleting a connection right after creation. Make sure to save the ConnectionPtr from a Connect call [gzclient-2] context mismatch in svga_surface_destroy [gzclient-2] context mismatch in svga_surface_destroy [spawn_entity.py-4] [INFO] [1735199103.238434255] [spawn_entity]: Waiting for service /spawn_entity, timeout = 30 [spawn_entity.py-4] [INFO] [1735199103.239025176] [spawn_entity]: Waiting for service /spawn_entity [spawn_entity.py-4] [INFO] [1735199103.253505089] [spawn_entity]: Calling service /spawn_entity [gzserver-1] [Msg] Waiting for master. [gzserver-1] [Msg] Connected to gazebo master @ http://127.0.0.1:11345 [gzserver-1] [Msg] Publicized address: 192.168.112.128 [gzserver-1] [Msg] Loading world file [/home/leolanqin/catkin_ws_ros2/install/robot_description/share/robot_description/world/empty.world] [gzserver-1] [Wrn] [ModelDatabase.cc:340] Getting models from[http://models.gazebosim.org/]. This may take a few seconds. [spawn_entity.py-4] [INFO] [1735199103.404412044] [spawn_entity]: Spawn status: SpawnEntity: Successfully spawned entity [Fu_robot] [INFO] [spawn_entity.py-4]: process has finished cleanly [pid 223660] [ERROR] [gzclient-2]: process has died [pid 223656, exit code -9, cmd 'gzclient --verbose']. [gzclient-2] ^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT) [robot_state_publisher-3] [INFO] [1735199163.933715409] [rclcpp]: signal_handler(signum=2) [INFO] [robot_state_publisher-3]: process has finished cleanly [pid 223658] [ERROR] [gzserver-1]: process[gzserver-1] failed to terminate '5' seconds after receiving 'SIGINT', escalating to 'SIGTERM' [INFO] [gzserver-1]: sending signal 'SIGTERM' to process[gzserver-1] [gzserver-1] [INFO] [1735199168.941641236] [rclcpp]: signal_handler(signum=15) [ERROR] [gzserver-1]: process[gzserver-1] failed to terminate '10.0' seconds after receiving 'SIGTERM', escalating to 'SIGKILL' [INFO] [gzserver-1]: sending signal 'SIGKILL' to process[gzserver-1] [ERROR] [gzserver-1]: process has died [pid 223654, exit code -9, cmd 'gzserver /home/leolanqin/catkin_ws_ros2/install/robot_description/share/robot_description/world/empty.world --verbose -slibgazebo_ros_init.so -slibgazebo_ros_factory.so -slibgazebo_ros_force_system.so']. [gzserver-1] leolanqin@leolanqin-virtual-machine:~/catkin_ws_ros2$ colcon build Starting >>> robot_description Starting >>> robot_navigation Finished <<< robot_navigation [0.15s] Finished <<< robot_description [0.21s] Summary: 2 packages finished [0.66s] leolanqin@leolanqin-virtual-machine:~/catkin_ws_ros2$ ros2 launch robot_description gazebo_world.launch.py [INFO] [launch]: All log files can be found below /home/leolanqin/.ros/log/2024-12-26-15-49-41-798423-leolanqin-virtual-machine-224566 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [gzserver-1]: process started with pid [224578] [INFO] [gzclient-2]: process started with pid [224580] [INFO] [robot_state_publisher-3]: process started with pid [224582] [INFO] [spawn_entity.py-4]: process started with pid [224584] [robot_state_publisher-3] [INFO] [1735199382.861567495] [robot_state_publisher]: got segment ball_wheel_link [robot_state_publisher-3] [INFO] [1735199382.864334578] [robot_state_publisher]: got segment base_camera_link [robot_state_publisher-3] [INFO] [1735199382.864369314] [robot_state_publisher]: got segment base_footprint [robot_state_publisher-3] [INFO] [1735199382.864380766] [robot_state_publisher]: got segment base_laser_link [robot_state_publisher-3] [INFO] [1735199382.864390304] [robot_state_publisher]: got segment base_link [robot_state_publisher-3] [INFO] [1735199382.864398930] [robot_state_publisher]: got segment imu [robot_state_publisher-3] [INFO] [1735199382.864407637] [robot_state_publisher]: got segment left_wheel_link [robot_state_publisher-3] [INFO] [1735199382.864416413] [robot_state_publisher]: got segment right_wheel_link [gzserver-1] Gazebo multi-robot simulator, version 11.10.2 [gzserver-1] Copyright (C) 2012 Open Source Robotics Foundation. [gzserver-1] Released under the Apache 2 License. [gzserver-1] http://gazebosim.org [gzserver-1] [gzclient-2] Gazebo multi-robot simulator, version 11.10.2 [gzclient-2] Copyright (C) 2012 Open Source Robotics Foundation. [gzclient-2] Released under the Apache 2 License. [gzclient-2] http://gazebosim.org [gzclient-2] [spawn_entity.py-4] [INFO] [1735199383.674311030] [spawn_entity]: Spawn Entity started [spawn_entity.py-4] [INFO] [1735199383.674829424] [spawn_entity]: Loading entity published on topic /robot_description [spawn_entity.py-4] /opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/qos.py:307: UserWarning: DurabilityPolicy.RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL is deprecated. Use DurabilityPolicy.TRANSIENT_LOCAL instead. [spawn_entity.py-4] warnings.warn( [spawn_entity.py-4] [INFO] [1735199384.016267056] [spawn_entity]: Waiting for entity xml on /robot_description [spawn_entity.py-4] [INFO] [1735199384.027940196] [spawn_entity]: Waiting for service /spawn_entity, timeout = 30 [spawn_entity.py-4] [INFO] [1735199384.028571054] [spawn_entity]: Waiting for service /spawn_entity [spawn_entity.py-4] [INFO] [1735199384.544525994] [spawn_entity]: Calling service /spawn_entity [gzserver-1] [Msg] Waiting for master. [gzserver-1] [Msg] Connected to gazebo master @ http://127.0.0.1:11345 [gzserver-1] [Msg] Publicized address: 192.168.112.128 [gzserver-1] [Msg] Loading world file [/home/leolanqin/catkin_ws_ros2/install/robot_description/share/robot_description/world/empty.world] [gzserver-1] [Wrn] [ModelDatabase.cc:340] Getting models from[http://models.gazebosim.org/]. This may take a few seconds. [spawn_entity.py-4] [INFO] [1735199384.730048498] [spawn_entity]: Spawn status: SpawnEntity: Successfully spawned entity [Fu_robot] [gzclient-2] [Msg] Waiting for master. [gzclient-2] [Msg] Connected to gazebo master @ http://127.0.0.1:11345 [gzclient-2] [Msg] Publicized address: 192.168.112.128 [gzclient-2] [Wrn] [GuiIface.cc:120] Could not find the Qt platform plugin "wayland" in "" [INFO] [spawn_entity.py-4]: process has finished cleanly [pid 224584] [gzclient-2] [Wrn] [Event.cc:61] Warning: Deleting a connection right after creation. Make sure to save the ConnectionPtr from a Connect call由于我是在虚拟机上运行的Ubuntu,我想可能和这个原因有关系,希望鱼哥给点建议