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

Support large number of vehicles for mutlivehicle SITL #14178

Merged
merged 2 commits into from Feb 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion ROMFS/px4fmu_common/init.d-posix/rcS
Expand Up @@ -109,7 +109,9 @@ param set MAV_SYS_ID $((px4_instance+1))
simulator_tcp_port=$((4560+px4_instance))
udp_offboard_port_local=$((14580+px4_instance))
udp_offboard_port_remote=$((14540+px4_instance))
udp_gcs_port_local=$((14570+px4_instance))
[ $px4_instance -gt 9 ] && udp_offboard_port_remote=14549 # use the same ports for more than 10 instances to avoid port overlaps
udp_gcs_port_local=$((18570+px4_instance))


if [ $AUTOCNF = yes ]
then
Expand Down
6 changes: 6 additions & 0 deletions Tools/gazebo_sitl_multiple_run.sh
Expand Up @@ -35,6 +35,12 @@ then
exit 1
fi

if [ $num_vehicles -gt 255 ]
then
echo "Tried spawning $num_vehicles vehicles. The maximum number of supported vehicles is 255"
exit 1
fi

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
src_path="$SCRIPT_DIR/.."

Expand Down