课程6.5.2 Gazebo Classic 启动失败
-
虚拟机使用VM,系统乌班图22.04
ub@ub-virtual-machine:~/chapt6/chapt6_ws$ ros2 launch fishbot_description gazebo_sim.launch.py
[INFO] [launch]: All log files can be found below /home/ub/.ros/log/2025-07-16-20-10-55-594522-ub-virtual-machine-4590
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [robot_state_publisher-1]: process started with pid [4595]
[INFO] [gzserver-2]: process started with pid [4597]
[INFO] [gzclient-3]: process started with pid [4599]
[INFO] [spawn_entity.py-4]: process started with pid [4601]
[robot_state_publisher-1] [INFO] [1752667856.267970093] [robot_state_publisher]: got segment back_caster_link
[robot_state_publisher-1] [INFO] [1752667856.268156632] [robot_state_publisher]: got segment base_footprint
[robot_state_publisher-1] [INFO] [1752667856.268172869] [robot_state_publisher]: got segment base_link
[robot_state_publisher-1] [INFO] [1752667856.268181356] [robot_state_publisher]: got segment camera_link
[robot_state_publisher-1] [INFO] [1752667856.268188438] [robot_state_publisher]: got segment camera_optical_link
[robot_state_publisher-1] [INFO] [1752667856.268195597] [robot_state_publisher]: got segment front_caster_link
[robot_state_publisher-1] [INFO] [1752667856.268202887] [robot_state_publisher]: got segment imu_link
[robot_state_publisher-1] [INFO] [1752667856.268209962] [robot_state_publisher]: got segment laser_cylinder_link
[robot_state_publisher-1] [INFO] [1752667856.268216871] [robot_state_publisher]: got segment laser_link
[robot_state_publisher-1] [INFO] [1752667856.268223440] [robot_state_publisher]: got segment left_wheel_link
[robot_state_publisher-1] [INFO] [1752667856.268230619] [robot_state_publisher]: got segment right_wheel_link
[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] [1752667856.804856341] [spawn_entity]: Spawn Entity started
[spawn_entity.py-4] [INFO] [1752667856.805229257] [spawn_entity]: Loading entity published on topic /robot_description
[spawn_entity.py-4] [INFO] [1752667856.807024211] [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]
[spawn_entity.py-4] [INFO] [1752667856.911160252] [spawn_entity]: Waiting for service /spawn_entity, timeout = 30
[spawn_entity.py-4] [INFO] [1752667856.911831738] [spawn_entity]: Waiting for service /spawn_entity
[gzserver-2] [Msg] Waiting for master.
[gzserver-2] [Msg] Connected to gazebo master @ http://127.0.0.1:11345
[gzserver-2] [Msg] Publicized address: 192.168.28.130
[gzserver-2] [Err] [RTShaderSystem.cc:480] Unable to find shader lib. Shader generating will fail. Your GAZEBO_RESOURCE_PATH is probably improperly set. Have you sourced <prefix>/share/gazebo/setup.bash?
[gzclient-3] [Msg] Waiting for master.
[gzclient-3] [Msg] Connected to gazebo master @ http://127.0.0.1:11345
[gzclient-3] [Msg] Publicized address: 192.168.28.130
[gzclient-3] [Err] [RTShaderSystem.cc:480] Unable to find shader lib. Shader generating will fail. Your GAZEBO_RESOURCE_PATH is probably improperly set. Have you sourced <prefix>/share/gazebo/setup.bash?
[gzclient-3] [Wrn] [GuiIface.cc:120] Could not find the Qt platform plugin "wayland" in ""
[spawn_entity.py-4] [INFO] [1752667857.956423711] [spawn_entity]: Calling service /spawn_entity
[gzserver-2] [Msg] Loading world file [/home/ub/chapt6/chapt6_ws/install/fishbot_description/share/fishbot_description/world/custom_room.world]
[gzserver-2] [Err] [RenderEngine.cc:197] Failed to initialize scene
[gzserver-2] gzserver: /usr/include/boost/smart_ptr/shared_ptr.hpp:728: typename boost::detail::sp_member_access<T>::type boost::shared_ptr<T>::operator->() const [with T = gazebo::rendering::Scene; typename boost::detail::sp_member_access<T>::type = gazebo::rendering::Scene*]: Assertion `px != 0' failed.
[ERROR] [gzserver-2]: process has died [pid 4597, exit code -6, cmd 'gzserver /home/ub/chapt6/chapt6_ws/install/fishbot_description/share/fishbot_description/world/custom_room.world --verbose -slibgazebo_ros_init.so -slibgazebo_ros_factory.so -slibgazebo_ros_force_system.so'].
[gzserver-2]
[gzclient-3] [Err] [Scene.cc:227] Service call[/shadow_caster_material_name] timed out
[gzclient-3] [Err] [Scene.cc:249] Service call[/shadow_caster_render_back_faces] timed out
[gzclient-3] [Err] [RenderEngine.cc:197] Failed to initialize scene
[gzclient-3] [Err] [GLWidget.cc:177] GLWidget could not create a scene. This will likely result in a blank screen.
[gzclient-3] gzclient: /usr/include/boost/smart_ptr/shared_ptr.hpp:728: typename boost::detail::sp_member_access<T>::type boost::shared_ptr<T>::operator->() const [with T = gazebo::rendering::Camera; typename boost::detail::sp_member_access<T>::type = gazebo::rendering::Camera*]: 断言 "px != 0" 失败。
[ERROR] [gzclient-3]: process has died [pid 4599, 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)
[robot_state_publisher-1] [INFO] [1752667879.936981925] [rclcpp]: signal_handler(signum=2)
[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 228, in run
[spawn_entity.py-4] success = self._spawn_entity(entity_xml, initial_pose, spawn_service_timeout)
[spawn_entity.py-4] File "/opt/ros/humble/lib/gazebo_ros/spawn_entity.py", line 290, in _spawn_entity
[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 751, 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 740, 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 723, 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 620, 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 4601, exit code -2, cmd '/opt/ros/humble/lib/gazebo_ros/spawn_entity.py -topic /robot_description -entity fishbot --ros-args'].
[INFO] [robot_state_publisher-1]: process has finished cleanly [pid 4595]