<launch>
<!-- vim: set ft=xml noet : -->
<!-- example launch script for ArduPilotMega based FCU's -->
<arg name="fcu_url" default="/dev/ttyACM0:57600" /> <!-- Port et baudrate of the connexion with Pixhawk -->
<arg name="gcs_url" default="" /> <!-- Retransmission to a GCS like Mavproxy does -->
<arg name="tgt_system" default="1" /> <!-- MAVLink id of your drone, default is 1 -->
<arg name="tgt_component" default="1" /> <!-- MAVLink component id of your drone, default is 1 -->
<arg name="log_output" default="screen" /> <!-- Where ROS will output its message, screen is your current terminal -->
<include file="$(find mavros)/launch/node.launch"> <!-- This launch file will launch another launch file -->
<arg name="pluginlists_yaml" value="$(find mavros)/launch/apm_pluginlists.yaml" /> <!-- Mavros plugin configuration, we will modify that later -->
<arg name="config_yaml" value="$(find mavros)/launch/apm_config.yaml" /> <!-- Mavros plugin list to use -->
<arg name="fcu_url" value="$(arg fcu_url)" /> <!-- Pass the parameter to the other launch file -->
<arg name="gcs_url" value="$(arg gcs_url)" />
<arg name="tgt_system" value="$(arg tgt_system)" />
<arg name="tgt_component" value="$(arg tgt_component)" />
<arg name="log_output" value="$(arg log_output)" />
</include>
</launch>
To connect to SITL we just need to modify the first line to . save you file and launch it with<arg name="fcu_url" default="udp://127.0.0.1:14551@14555" />
roslaunch apm.launch
You should see some verbose from MAVROS that read its configuration and some line that indicate a connexion: