Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix in gazebo_sitl_multiple_run.sh #15392

Closed
wants to merge 4 commits into from
Closed
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Tools/gazebo_sitl_multiple_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function spawn_model() {

pushd "$working_dir" &>/dev/null
echo "starting instance $n in $(pwd)"
export PX4_SIM_MODEL=${MODEL}
../bin/px4 -i $n -d "$src_path/ROMFS/px4fmu_common" -w sitl_${MODEL}_${n} -s etc/init.d-posix/rcS >out.log 2>err.log &
python3 ${src_path}/Tools/sitl_gazebo/scripts/xacro.py ${src_path}/Tools/sitl_gazebo/models/rotors_description/urdf/${MODEL}_base.xacro \
rotors_description_dir:=${src_path}/Tools/sitl_gazebo/models/rotors_description mavlink_udp_port:=$(($mavlink_udp_port+$N)) \
Expand All @@ -52,14 +53,13 @@ do
case "${option}"
in
n) NUM_VEHICLES=${OPTARG};;
m) VEHICLE_MODEL=${OPTARG};;
m) VEHICLE_MODEL=${OPTARG:=iris};;
iwishiwasaneagle marked this conversation as resolved.
Show resolved Hide resolved
w) WORLD=${OPTARG};;
s) SCRIPT=${OPTARG};;
esac
done

num_vehicles=${NUM_VEHICLES:=3}
export PX4_SIM_MODEL=${VEHICLE_MODEL:=iris}
world=${WORLD:=empty}
echo ${SCRIPT}

Expand Down Expand Up @@ -91,7 +91,7 @@ if [ -z ${SCRIPT} ]; then
fi

while [ $n -lt $num_vehicles ]; do
spawn_model ${PX4_SIM_MODEL} $n
spawn_model ${VEHICLE_MODEL} $n
n=$(($n + 1))
done
else
Expand Down