From f748c8d883040d30022354a64a3888e2cc385941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= <beat-kueng@gmx.net> Date: Sat, 4 Aug 2018 15:17:17 +0200 Subject: [PATCH] fix mavros launch scripts & use non-unified startup scripts This is to not lose any existing functionality until we have everything unified. --- launch/mavros_posix_sitl.launch | 2 +- launch/posix_sitl.launch | 5 ++--- launch/single_vehicle_spawn.launch | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/launch/mavros_posix_sitl.launch b/launch/mavros_posix_sitl.launch index 408122c9c8..6590d20a8b 100644 --- a/launch/mavros_posix_sitl.launch +++ b/launch/mavros_posix_sitl.launch @@ -14,7 +14,7 @@ <arg name="vehicle" default="iris"/> <arg name="world" default="$(find mavlink_sitl_gazebo)/worlds/empty.world"/> <arg name="sdf" default="$(find mavlink_sitl_gazebo)/models/$(arg vehicle)/$(arg vehicle).sdf"/> - <arg name="rcS" default="$(find px4)/posix-configs/SITL/init/rcS"/> + <arg name="rcS" default="$(find px4)/posix-configs/SITL/init/$(arg est)/$(arg vehicle)"/> <!-- gazebo configs --> <arg name="gui" default="true"/> diff --git a/launch/posix_sitl.launch b/launch/posix_sitl.launch index 4a8d00ceca..b112a72dec 100644 --- a/launch/posix_sitl.launch +++ b/launch/posix_sitl.launch @@ -14,7 +14,7 @@ <arg name="vehicle" default="iris"/> <arg name="world" default="$(find mavlink_sitl_gazebo)/worlds/empty.world"/> <arg name="sdf" default="$(find mavlink_sitl_gazebo)/models/$(arg vehicle)/$(arg vehicle).sdf"/> - <arg name="rcS" default="$(find px4)/posix-configs/SITL/init/rcS"/> + <arg name="rcS" default="$(find px4)/posix-configs/SITL/init/$(arg est)/$(arg vehicle)"/> <!-- gazebo configs --> <arg name="gui" default="true"/> @@ -28,7 +28,7 @@ <arg unless="$(arg interactive)" name="px4_command_arg1" value="-d"/> <arg if="$(arg interactive)" name="px4_command_arg1" value=""/> <node name="sitl" pkg="px4" type="px4" output="screen" - args="$(arg rootfs) $(arg rcS) $(arg px4_command_arg1)" /> + args="$(find px4)/ROMFS/px4fmu_common -s $(arg rcS) $(arg px4_command_arg1)" required="true"/> <!-- Gazebo sim --> <include file="$(find gazebo_ros)/launch/empty_world.launch"> @@ -41,7 +41,6 @@ </include> <!-- gazebo model --> <node name="$(anon vehicle_spawn)" pkg="gazebo_ros" type="spawn_model" output="screen" args="-sdf -file $(arg sdf) -model $(arg vehicle) -x $(arg x) -y $(arg y) -z $(arg z) -R $(arg R) -P $(arg P) -Y $(arg Y)"/> -</launch> <!-- This will set the environment variable needed to select iris in the startup. --> <machine name="px4" env-loader="iris_env.sh" address="none" /> diff --git a/launch/single_vehicle_spawn.launch b/launch/single_vehicle_spawn.launch index c2f8bc5e39..3dc92ef5f5 100644 --- a/launch/single_vehicle_spawn.launch +++ b/launch/single_vehicle_spawn.launch @@ -23,7 +23,7 @@ <!-- PX4 SITL --> <arg unless="$(arg interactive)" name="px4_command_arg1" value=""/> <arg if="$(arg interactive)" name="px4_command_arg1" value="-d"/> - <node name="sitl_$(arg ID)" pkg="px4" type="px4" output="screen" args="$(find px4) -s $(arg rcS) -i $(arg ID) $(arg px4_command_arg1)"> + <node name="sitl_$(arg ID)" pkg="px4" type="px4" output="screen" args="$(find px4)/ROMFS/px4fmu_common -s $(arg rcS) -i $(arg ID) $(arg px4_command_arg1)"> </node> <!-- spawn vehicle --> <node name="$(arg vehicle)_$(arg ID)_spawn" output="screen" pkg="gazebo_ros" type="spawn_model" args="-urdf -param rotors_description -model $(arg vehicle)_$(arg ID) -package_to_model -x $(arg x) -y $(arg y) -z $(arg z) -R $(arg R) -P $(arg P) -Y $(arg Y)"/> -- GitLab