@980372246 不确定和Gazebo之间的关系,可以尝试分步启动,首先启动Gazbeo,之后再加载机器人到Gazebo中。
其中 Gazebo 启动的命令更换一下,使用系统提供的Launch进行启动。代码如下:
# 通过 IncludeLaunchDescription 包含另外一个 launch 文件 launch_gazebo = launch.actions.IncludeLaunchDescription( PythonLaunchDescriptionSource([get_package_share_directory( 'gazebo_ros'), '/launch', '/gazebo.launch.py']), # 传递参数 launch_arguments=[('world', default_world_path), ('verbose', 'true')] )