ros2--gazebo--launch
如何在launch中启动gazebo,配置gazebo的参数?
配置过程
1,加载gz_sim的launch文件
pkg_ros_gz_sim = get_package_share_directory('ros_gz_sim')gazebo = IncludeLaunchDescription(PythonLaunchDescriptionSource(os.path.join(pkg_ros_gz_sim, 'launch', 'gz_sim.launch.py')),launch_arguments={'gz_args': '-r ' + world_file}.items(),)
IncludeLaunchDescription和PythonLaunchDescriptionSource;
gz sim启动参数配置
gz sim的参数可以通过以下指令查看:
gz sim --help
-r
-r Run simulation on start.
启动后立即运行仿真(不暂停)。
世界文件
链接