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] sitl_multiple_run for gazebo-classic starts with wrong mav_sys_id #23480

Open
av-jeroen opened this issue Aug 1, 2024 · 2 comments · May be fixed by #23529
Open

[Bug] sitl_multiple_run for gazebo-classic starts with wrong mav_sys_id #23480

av-jeroen opened this issue Aug 1, 2024 · 2 comments · May be fixed by #23529

Comments

@av-jeroen
Copy link

av-jeroen commented Aug 1, 2024

Describe the bug

When executing the SITL multiple drones bash script for gazebo-classic multiple drones are being deployed. The Mavlink system Ids should start at 1 and increase for every drone. Instead it starts at 2.

Before 1.14 this was the way it worked, and I belief this is the way people will expect it to work.

To Reproduce

The bug is visible when running with one drone:

./Tools/simulation/gazebo-classic/sitl_multiple_run.sh

But also with multiple

./Tools/simulation/gazebo-classic/sitl_multiple_run.sh -n 3

Expected behavior

Expected: The MAV_SYS_ID of the first drone should be 1.
Actual: The MAV_SYS_ID of the first drone is 2.

Software Version

1.14.0 and up

Flight controller

SITL

Vehicle type

Multicopter

@av-jeroen
Copy link
Author

Solved by changing the following in ./Tools/simulation/gazebo-classic/sitl_multiple_run.sh

spawn_model ${vehicle_model} $(($n + 1))

into

spawn_model ${vehicle_model} $n

Not sure if this was intended behaviour, maybe certain developers want to run this next to a SIH setup?

I'll close it for now.

@Jaeyoung-Lim
Copy link
Member

@av-jeroen Please consider creating a PR if you think this is a modification needed to improve the repository.

@av-jeroen av-jeroen reopened this Aug 9, 2024
@github-actions github-actions bot added the stale label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants