6.4.2运行launch报错
-
~/chapt6/chapt6_ws$ ros2 launch fishbot_description gazebo_sim.launch.py
[INFO] [launch]: All log files can be found below /home/wink/.ros/log/2026-04-06-01-05-56-596403-wink-Legion-Y7000-2019-PG0-11349
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [robot_state_publisher-1]: process started with pid [11368]
[INFO] [gzserver-2]: process started with pid [11370]
[INFO] [gzclient-3]: process started with pid [11372]
[INFO] [spawn_entity.py-4]: process started with pid [11374]
[robot_state_publisher-1] [INFO] [1775408757.756401857] [robot_state_publisher]: got segment back_caster_link
[robot_state_publisher-1] [INFO] [1775408757.756558656] [robot_state_publisher]: got segment base_footprint
[robot_state_publisher-1] [INFO] [1775408757.756584171] [robot_state_publisher]: got segment base_link
[robot_state_publisher-1] [INFO] [1775408757.756602397] [robot_state_publisher]: got segment camera_link
[robot_state_publisher-1] [INFO] [1775408757.756726885] [robot_state_publisher]: got segment front_caster_link
[robot_state_publisher-1] [INFO] [1775408757.756745093] [robot_state_publisher]: got segment imu_link
[robot_state_publisher-1] [INFO] [1775408757.756756472] [robot_state_publisher]: got segment laser_cylinder_link
[robot_state_publisher-1] [INFO] [1775408757.756767411] [robot_state_publisher]: got segment laser_link
[robot_state_publisher-1] [INFO] [1775408757.756780324] [robot_state_publisher]: got segment left_wheel_link
[robot_state_publisher-1] [INFO] [1775408757.756797716] [robot_state_publisher]: got segment right_wheel_link
[spawn_entity.py-4] [INFO] [1775408758.290271167] [spawn_entity]: Spawn Entity started
[spawn_entity.py-4] [INFO] [1775408758.291134208] [spawn_entity]: Loading entity published on topic /robot_description
[spawn_entity.py-4] [INFO] [1775408758.293577069] [spawn_entity]: Waiting for entity xml on /robot_description
[spawn_entity.py-4] [INFO] [1775408758.305958747] [spawn_entity]: Waiting for service /spawn_entity, timeout = 30
[spawn_entity.py-4] [INFO] [1775408758.306918784] [spawn_entity]: Waiting for service /spawn_entity
[spawn_entity.py-4] [INFO] [1775408759.063906893] [spawn_entity]: Calling service /spawn_entity
[spawn_entity.py-4] [INFO] [1775408759.264652947] [spawn_entity]: Spawn status: SpawnEntity: Successfully spawned entity [fishbot]
[INFO] [spawn_entity.py-4]: process has finished cleanly [pid 11374]
[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 11372, exit code -6, cmd 'gzclient --gui-client-plugin=libgazebo_ros_eol_gui.so'].
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[robot_state_publisher-1] [INFO] [1775408769.782806088] [rclcpp]: signal_handler(SIGINT/SIGTERM)
[INFO] [robot_state_publisher-1]: process has finished cleanly [pid 11368]
[INFO] [gzserver-2]: process has finished cleanly [pid 11370] -
解决了,环境变量的问题