gazebo打不开
-
输入ros2 launch fishbot_description gazebo_sim.launch.py命令后显示下面错误应该怎么解决
[INFO] [launch]: All log files can be found below /home/fishros/.ros/log/2025-03-17-19-02-39-949923-fishros-linux-101812
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [robot_state_publisher-1]: process started with pid [101817]
[INFO] [gzserver-2]: process started with pid [101819]
[INFO] [gzclient-3]: process started with pid [101821]
[INFO] [spawn_entity.py-4]: process started with pid [101823]
[robot_state_publisher-1] Error: Failed to build tree: child link [left_wheel_wheel_link] of joint [left_wheel_joint] not found
[robot_state_publisher-1] at line 252 in ./urdf_parser/src/model.cpp
[robot_state_publisher-1] Failed to parse robot description using: urdf_xml_parser/URDFXMLParser
[robot_state_publisher-1] terminate called after throwing an instance of 'std::runtime_error'
[robot_state_publisher-1] what(): Unable to initialize urdf::model from robot description
[gzclient-3] Gazebo multi-robot simulator, version 11.10.2
[gzclient-3] Copyright (C) 2012 Open Source Robotics Foundation.
[gzclient-3] Released under the Apache 2 License.
[gzclient-3] http://gazebosim.org
[gzclient-3]
[gzserver-2] Gazebo multi-robot simulator, version 11.10.2
[gzserver-2] Copyright (C) 2012 Open Source Robotics Foundation.
[gzserver-2] Released under the Apache 2 License.
[gzserver-2] http://gazebosim.org
[gzserver-2]
[spawn_entity.py-4] [INFO] [1742209360.542108564] [spawn_entity]: Spawn Entity started
[spawn_entity.py-4] [INFO] [1742209360.542285298] [spawn_entity]: Loading entity published on topic /robot_description
[spawn_entity.py-4] [INFO] [1742209360.543069712] [spawn_entity]: Waiting for entity xml on /robot_description
[gzserver-2] [Wrn] [gazebo_ros_init.cpp:178]
[gzserver-2] # # ####### ####### ### ##### #######
[gzserver-2] ## # # # # # # # #
[gzserver-2] # # # # # # # # #
[gzserver-2] # # # # # # # # #####
[gzserver-2] # # # # # # # # #
[gzserver-2] # ## # # # # # # #
[gzserver-2] # # ####### # ### ##### #######
[gzserver-2]
[gzserver-2] This version of Gazebo, now called Gazebo classic, reaches end-of-life
[gzserver-2] in January 2025. Users are highly encouraged to migrate to the new Gazebo
[gzserver-2] using our migration guides (https://gazebosim.org/docs/latest/gazebo_classic_migration?utm_source=gazebo_ros_pkgs&utm_medium=cli)
[gzserver-2]
[gzserver-2]
[ERROR] [robot_state_publisher-1]: process has died [pid 101817, exit code -6, cmd '/opt/ros/humble/lib/robot_state_publisher/robot_state_publisher --ros-args --params-file /tmp/launch_params_rpe30x_p'].
[gzclient-3] [Msg] Waiting for master.
[gzclient-3] [Msg] Connected to gazebo master @ http://127.0.0.1:11345
[gzclient-3] [Msg] Publicized address: 172.20.10.3
[gzclient-3] [Wrn] [GuiIface.cc:120] QSocketNotifier: Can only be used with threads started with QThread
[gzclient-3] [Wrn] [Event.cc:61] Warning: Deleting a connection right after creation. Make sure to save the ConnectionPtr from a Connect call
[gzclient-3] [Err] [WindowManager.cc:132] Unable to create the rendering window
[gzclient-3] [Err] [WindowManager.cc:132] Unable to create the rendering window
[gzclient-3] [Err] [WindowManager.cc:132] Unable to create the rendering window
[gzclient-3] [Err] [WindowManager.cc:132] Unable to create the rendering window
[gzclient-3] [Err] [WindowManager.cc:132] Unable to create the rendering window
[gzclient-3] [Err] [WindowManager.cc:132] Unable to create the rendering window
[gzclient-3] [Err] [WindowManager.cc:132] Unable to create the rendering window
[gzclient-3] [Err] [WindowManager.cc:132] Unable to create the rendering window
[gzclient-3] [Err] [WindowManager.cc:132] Unable to create the rendering window
[gzclient-3] [Err] [WindowManager.cc:132] Unable to create the rendering window
[gzclient-3] [Err] [WindowManager.cc:139] EXCEPTION: Unable to create the rendering window
[gzclient-3]
[gzclient-3]
[gzclient-3] terminate called after throwing an instance of 'gazebo::common::Exception'
[ERROR] [gzclient-3]: process has died [pid 101821, exit code -6, cmd 'gzclient --gui-client-plugin=libgazebo_ros_eol_gui.so --verbose'].
[gzclient-3]
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[spawn_entity.py-4] Traceback (most recent call last):
[spawn_entity.py-4] File "/opt/ros/humble/lib/gazebo_ros/spawn_entity.py", line 372, in <module>
[spawn_entity.py-4] main()
[spawn_entity.py-4] File "/opt/ros/humble/lib/gazebo_ros/spawn_entity.py", line 367, in main
[spawn_entity.py-4] exit_code = spawn_entity_node.run()
[spawn_entity.py-4] File "/opt/ros/humble/lib/gazebo_ros/spawn_entity.py", line 176, in run
[spawn_entity.py-4] rclpy.spin_once(self)
[spawn_entity.py-4] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/init.py", line 206, in spin_once
[spawn_entity.py-4] executor.spin_once(timeout_sec=timeout_sec)
[spawn_entity.py-4] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 739, in spin_once
[spawn_entity.py-4] self._spin_once_impl(timeout_sec)
[spawn_entity.py-4] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 728, in _spin_once_impl
[spawn_entity.py-4] handler, entity, node = self.wait_for_ready_callbacks(timeout_sec=timeout_sec)
[spawn_entity.py-4] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 711, in wait_for_ready_callbacks
[spawn_entity.py-4] return next(self._cb_iter)
[spawn_entity.py-4] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 608, in _wait_for_ready_callbacks
[spawn_entity.py-4] wait_set.wait(timeout_nsec)
[spawn_entity.py-4] KeyboardInterrupt
[ERROR] [spawn_entity.py-4]: process has died [pid 101823, exit code -2, cmd '/opt/ros/humble/lib/gazebo_ros/spawn_entity.py -topic /robot_description -entity fishbot --ros-args'].
[gzserver-2] [Msg] Waiting for master.
[gzserver-2] [Msg] Connected to gazebo master @ http://127.0.0.1:11345
[gzserver-2] [Msg] Publicized address: 172.20.10.3
[gzserver-2] [Msg] Loading world file [/home/fishros/chapt6/chapt6_ws/install/fishbot_description/share/fishbot_description/world/custom_room.world]
[INFO] [gzserver-2]: process has finished cleanly [pid 101819]
[gzserver-2]
[gzserver-2] -
@2368028649 也许是因为素材库的下载太慢导致的无法启动Gazebo,你可以先下载素材库,可以参考一下这篇博客的解答方法https://blog.csdn.net/m0_71500261/article/details/127653535
希望对你有帮助 -
@Saaadness 谢谢大哥