Browse Source

Add standard_vtol as supported model for multivehicle sim gazebo

Fix
sbg
JaeyoungLim 5 years ago committed by Lorenz Meier
parent
commit
15835ce7a3
  1. 6
      Tools/gazebo_sitl_multiple_run.sh

6
Tools/gazebo_sitl_multiple_run.sh

@ -29,9 +29,9 @@ done @@ -29,9 +29,9 @@ done
num_vehicles=${NUM_VEHICLES:=3}
export PX4_SIM_MODEL=${VEHICLE_MODEL:=iris}
if [ "$PX4_SIM_MODEL" != "iris" ] & [ "$PX4_SIM_MODEL" != "plane" ]
if [ "$PX4_SIM_MODEL" != "iris" ] && [ "$PX4_SIM_MODEL" != "plane" ] && [ "$PX4_SIM_MODEL" != "standard_vtol" ]
then
echo "Currently only iris and plane vehicle model is supported!"
echo "Currently only the following vehicle models are supported! [iris, plane, standard_vtol]"
exit 1
fi
@ -69,7 +69,7 @@ while [ $n -lt $num_vehicles ]; do @@ -69,7 +69,7 @@ while [ $n -lt $num_vehicles ]; do
gz sdf -p /tmp/${PX4_SIM_MODEL}_${n}.urdf > /tmp/${PX4_SIM_MODEL}_${n}.sdf
echo "Spawning ${PX4_SIM_MODEL}_${n}"
gz model --spawn-file=/tmp/${PX4_SIM_MODEL}_${n}.sdf --model-name=${PX4_SIM_MODEL}_${n} -x 0.0 -y $((2*${n})) -z 0.0
gz model --spawn-file=/tmp/${PX4_SIM_MODEL}_${n}.sdf --model-name=${PX4_SIM_MODEL}_${n} -x 0.0 -y $((3*${n})) -z 0.0
popd &>/dev/null

Loading…
Cancel
Save