ardupilot_gazebo仿真(四)
标签(空格分隔): 未分类
Multi-MAV simulation
参考官网给出的multi-vehicle-simulation的方法
在每次打开sim_vehicle.py仿真时加入后缀-Ii
其中i为第几架飞机。
For the multi-vehicle connection, port number is increased by 10 In SITL launch argument (sim_vehicle.py)
-I 0 has FDM in/out ports of 9002/9003 / GCS connection UDP:14550
-I 1 has FDM in/out ports of 9012/9013 / GCS connection UDP:14560
-I 2 has FDM in/out ports of 9022/9023 / GCS connection UDP:14570
其中FDM对应model中的
<plugin name="arducopter_plugin" filename="libArduPilotPlugin.so">
<fdm_addr>127.0.0.1</fdm_addr>
<fdm_port_in>9002</fdm_port_in>
<fdm_port_out>9003</fdm_port_out>
按照每架飞机的FDM修改model中的对应参数,即可实现多机飞行。
如果需要把每架飞机都用MAVROS控制,还需要修改MAVROS中的UDP参数。