本帖最后由 zhihao8013 于 2021-8-2 10:14 编辑
我想通过ROS多机分批启动gazebo,即在ROSmaster主机中只启动gazebo_sim界面,在从机中启动PX4_sitl模块。
我目前尝试了20架的仿真:
主机launch文件如下(启动了gazebo_sim和10架UAV的px4_sitl):
gazebo界面如下:
。
从机的launch文件如下:(我删除了gazebo_sim的配置),px4_sitl模块可以启动,但是在主机gazebo上只显示增加了11号飞机,并不能加载剩余的飞机
请问我是哪里理解错了吗,如何分批启动gazebo的无人机呢,是否支持ROS多机??
xu
我目前在主机端gazebo分批启动uav已经成功,并且uav能够连上mavros,即在主机端依次启动gazebo界面,10架uav,另外10架uav(主机端总共20架已经成功)。
我想继续把规模做大,但是我在尝试:
1)主机gazebo+10架uav的px4_sitl
2) 从机10架uav的px4_sitl时,
发现主机端10架的px4_sitl启动成功,并且成功连上mavros,在gazebo界面中成功显示;
从机端的另外10架的px4_sitl并没有完全启动成功,卡在MAVROS started这里,gazebo中只增加了1架uav,在主机中echo /mavros/states 时,发现前10架都能连上,后面10架都无法连接上; 从机端px4_sitl终端输出如下:
开始时:
ROS_MASTER_URI=[color=var(--color-text-link)]http://192.168.3.112:11311
process[uav11/sitl_11-1]: started with pid [73943]
INFO [px4] Creating symlink /home/lzh/dorca_ws/src/d-orca/Firmware/ROMFS/px4fmu_common -> /home/lzh/.ros/etc
0 WARNING: setRealtimeSched failed (not run as root?)
| ___ \ \ \ / / / |
| |/ / \ V / / /| |
| __/ / \ / /| |
| | / /^\ \ ___ |
_| / / |_/ px4 starting. INFO [px4] Calling startup script: /bin/sh etc/init.d-posix/rcS 11
process[uav11/iris_11_spawn-2]: started with pid [73950]
process[uav11/mavros-3]: started with pid [73961] - MAV_SYS_ID: curr: 5 -> new: 12
INFO [dataman] Unknown restart, data manager file './dataman' size is 11798680 bytes
INFO [simulator] Waiting for simulator to connect on TCP port 4571
process[uav12/sitl_12-4]: started with pid [73989]
INFO [px4] Creating symlink /home/lzh/dorca_ws/src/d-orca/Firmware/ROMFS/px4fmu_common -> /home/lzh/.ros/etc
0 WARNING: setRealtimeSched failed (not run as root?)
==================================================================
结束时(卡在这里不继续运行了):
[ INFO] [1627868505.525849422]: Known MAVLink dialects: common ardupilotmega ASLUAV all autoquad icarous matrixpilot paparazzi standard uAvionix ualberta
[ INFO] [1627868505.525860076]: MAVROS started. MY ID 1.240, TARGET ID 18.1 我检查了ros多机设置是没有问题的,可以在从机中运行规划节点,但是我目前不能把PX4_sitl模块在从机中启动,请问是我哪里理解错了吗?
我知道答案
回答被采纳将会获得 5 阿木币 已有1人回答
|