2018-02-09 14:40:38 -04:00
|
|
|
<?xml version="1.0"?>
|
2017-05-13 16:51:46 -03:00
|
|
|
<launch>
|
|
|
|
<!-- MAVROS posix SITL environment launch script -->
|
2018-02-09 14:40:38 -04:00
|
|
|
<!-- launches Gazebo environment and 2x: MAVROS, PX4 SITL, and spawns vehicle -->
|
|
|
|
<!-- vehicle model and world -->
|
2017-05-13 16:51:46 -03:00
|
|
|
<arg name="est" default="ekf2"/>
|
|
|
|
<arg name="vehicle" default="iris"/>
|
|
|
|
<arg name="world" default="$(find mavlink_sitl_gazebo)/worlds/empty.world"/>
|
2018-02-09 14:40:38 -04:00
|
|
|
<!-- gazebo configs -->
|
2017-05-13 16:51:46 -03:00
|
|
|
<arg name="gui" default="true"/>
|
2018-02-09 14:40:38 -04:00
|
|
|
<arg name="debug" default="false"/>
|
|
|
|
<arg name="verbose" default="false"/>
|
|
|
|
<arg name="paused" default="false"/>
|
|
|
|
<!-- Gazebo sim -->
|
2017-05-13 16:51:46 -03:00
|
|
|
<include file="$(find gazebo_ros)/launch/empty_world.launch">
|
|
|
|
<arg name="gui" value="$(arg gui)"/>
|
2018-02-09 14:40:38 -04:00
|
|
|
<arg name="world_name" value="$(arg world)"/>
|
|
|
|
<arg name="debug" value="$(arg debug)"/>
|
|
|
|
<arg name="verbose" value="$(arg verbose)"/>
|
|
|
|
<arg name="paused" value="$(arg paused)"/>
|
2017-05-13 16:51:46 -03:00
|
|
|
</include>
|
2019-05-13 05:35:09 -03:00
|
|
|
<!-- UAV0 -->
|
|
|
|
<group ns="uav0">
|
2018-12-12 16:07:05 -04:00
|
|
|
<!-- MAVROS and vehicle configs -->
|
2019-05-13 05:35:09 -03:00
|
|
|
<arg name="ID" value="0"/>
|
|
|
|
<arg name="fcu_url" default="udp://:14540@localhost:14580"/>
|
2018-02-09 14:40:38 -04:00
|
|
|
<!-- PX4 SITL and vehicle spawn -->
|
|
|
|
<include file="$(find px4)/launch/single_vehicle_spawn.launch">
|
2017-05-13 16:51:46 -03:00
|
|
|
<arg name="x" value="0"/>
|
|
|
|
<arg name="y" value="0"/>
|
|
|
|
<arg name="z" value="0"/>
|
|
|
|
<arg name="R" value="0"/>
|
|
|
|
<arg name="P" value="0"/>
|
|
|
|
<arg name="Y" value="0"/>
|
|
|
|
<arg name="vehicle" value="$(arg vehicle)"/>
|
2019-05-13 05:35:09 -03:00
|
|
|
<arg name="mavlink_udp_port" value="14560"/>
|
|
|
|
<arg name="mavlink_tcp_port" value="4560"/>
|
2017-05-13 16:51:46 -03:00
|
|
|
<arg name="ID" value="$(arg ID)"/>
|
2021-01-08 14:29:47 -04:00
|
|
|
<arg name="gst_udp_port" value="$(eval 5600 + arg('ID'))"/>
|
|
|
|
<arg name="video_uri" value="$(eval 5600 + arg('ID'))"/>
|
|
|
|
<arg name="mavlink_cam_udp_port" value="$(eval 14530 + arg('ID'))"/>
|
2017-05-13 16:51:46 -03:00
|
|
|
</include>
|
2018-02-09 14:40:38 -04:00
|
|
|
<!-- MAVROS -->
|
|
|
|
<include file="$(find mavros)/launch/px4.launch">
|
|
|
|
<arg name="fcu_url" value="$(arg fcu_url)"/>
|
|
|
|
<arg name="gcs_url" value=""/>
|
2019-07-04 09:58:43 -03:00
|
|
|
<arg name="tgt_system" value="$(eval 1 + arg('ID'))"/>
|
2018-02-09 14:40:38 -04:00
|
|
|
<arg name="tgt_component" value="1"/>
|
2017-05-13 16:51:46 -03:00
|
|
|
</include>
|
|
|
|
</group>
|
2019-05-13 05:35:09 -03:00
|
|
|
<!-- UAV1 -->
|
|
|
|
<group ns="uav1">
|
2018-02-09 14:40:38 -04:00
|
|
|
<!-- MAVROS and vehicle configs -->
|
2019-05-13 05:35:09 -03:00
|
|
|
<arg name="ID" value="1"/>
|
|
|
|
<arg name="fcu_url" default="udp://:14541@localhost:14581"/>
|
2018-02-09 14:40:38 -04:00
|
|
|
<!-- PX4 SITL and vehicle spawn -->
|
|
|
|
<include file="$(find px4)/launch/single_vehicle_spawn.launch">
|
2017-05-13 16:51:46 -03:00
|
|
|
<arg name="x" value="1"/>
|
|
|
|
<arg name="y" value="0"/>
|
|
|
|
<arg name="z" value="0"/>
|
|
|
|
<arg name="R" value="0"/>
|
|
|
|
<arg name="P" value="0"/>
|
|
|
|
<arg name="Y" value="0"/>
|
|
|
|
<arg name="vehicle" value="$(arg vehicle)"/>
|
2019-05-13 05:35:09 -03:00
|
|
|
<arg name="mavlink_udp_port" value="14561"/>
|
|
|
|
<arg name="mavlink_tcp_port" value="4561"/>
|
2017-05-13 16:51:46 -03:00
|
|
|
<arg name="ID" value="$(arg ID)"/>
|
2021-01-08 14:29:47 -04:00
|
|
|
<arg name="gst_udp_port" value="$(eval 5600 + arg('ID'))"/>
|
|
|
|
<arg name="video_uri" value="$(eval 5600 + arg('ID'))"/>
|
|
|
|
<arg name="mavlink_cam_udp_port" value="$(eval 14530 + arg('ID'))"/>
|
2017-05-13 16:51:46 -03:00
|
|
|
</include>
|
2018-02-09 14:40:38 -04:00
|
|
|
<!-- MAVROS -->
|
|
|
|
<include file="$(find mavros)/launch/px4.launch">
|
|
|
|
<arg name="fcu_url" value="$(arg fcu_url)"/>
|
|
|
|
<arg name="gcs_url" value=""/>
|
2018-09-10 17:05:02 -03:00
|
|
|
<arg name="tgt_system" value="$(eval 1 + arg('ID'))"/>
|
|
|
|
<arg name="tgt_component" value="1"/>
|
|
|
|
</include>
|
|
|
|
</group>
|
2019-05-13 05:35:09 -03:00
|
|
|
<!-- UAV2 -->
|
|
|
|
<group ns="uav2">
|
2018-09-10 17:05:02 -03:00
|
|
|
<!-- MAVROS and vehicle configs -->
|
2019-05-13 05:35:09 -03:00
|
|
|
<arg name="ID" value="2"/>
|
|
|
|
<arg name="fcu_url" default="udp://:14542@localhost:14582"/>
|
2018-09-10 17:05:02 -03:00
|
|
|
<!-- PX4 SITL and vehicle spawn -->
|
|
|
|
<include file="$(find px4)/launch/single_vehicle_spawn.launch">
|
|
|
|
<arg name="x" value="0"/>
|
|
|
|
<arg name="y" value="1"/>
|
|
|
|
<arg name="z" value="0"/>
|
|
|
|
<arg name="R" value="0"/>
|
|
|
|
<arg name="P" value="0"/>
|
|
|
|
<arg name="Y" value="0"/>
|
|
|
|
<arg name="vehicle" value="$(arg vehicle)"/>
|
2019-05-13 05:35:09 -03:00
|
|
|
<arg name="mavlink_udp_port" value="14562"/>
|
|
|
|
<arg name="mavlink_tcp_port" value="4562"/>
|
2018-09-10 17:05:02 -03:00
|
|
|
<arg name="ID" value="$(arg ID)"/>
|
2021-01-08 14:29:47 -04:00
|
|
|
<arg name="gst_udp_port" value="$(eval 5600 + arg('ID'))"/>
|
|
|
|
<arg name="video_uri" value="$(eval 5600 + arg('ID'))"/>
|
|
|
|
<arg name="mavlink_cam_udp_port" value="$(eval 14530 + arg('ID'))"/>
|
2018-09-10 17:05:02 -03:00
|
|
|
</include>
|
|
|
|
<!-- MAVROS -->
|
|
|
|
<include file="$(find mavros)/launch/px4.launch">
|
|
|
|
<arg name="fcu_url" value="$(arg fcu_url)"/>
|
|
|
|
<arg name="gcs_url" value=""/>
|
|
|
|
<arg name="tgt_system" value="$(eval 1 + arg('ID'))"/>
|
2018-02-09 14:40:38 -04:00
|
|
|
<arg name="tgt_component" value="1"/>
|
2017-05-13 16:51:46 -03:00
|
|
|
</include>
|
|
|
|
</group>
|
|
|
|
</launch>
|
2018-09-10 17:05:02 -03:00
|
|
|
<!-- to add more UAVs (up to 10):
|
|
|
|
Increase the id
|
|
|
|
Change the name space
|
|
|
|
Set the FCU to default="udp://:14540+id@localhost:14550+id"
|
|
|
|
Set the malink_udp_port to 14560+id) -->
|