SITL Multi-vehicle Swarm Simulator

Hi,

I'm trying to setup a simulation environment for a multi-vehicle system using ArduCopter SITL. Right now I have a script that starts multiple ArduCopter instances but I need to change the ID of the UAV in order to be able to distinguish between them.

I can do "param set SYSID_THISMAV 2" for the second UAV but the changes only take place once I restart the ArduCopter instance. 

I tried modifying sim_vehicle.sh and adding "--cmd= param set SYSID_THISMAV 2" when initialising mavproxy but I get the following output: "Unable to find parameter 'SYSID_THISMAV'. The result is that the ID doesn't change. 

I'm able to start an instance, change the ID manually and restart but the process is tedious and it would be very useful to set it up from the start. 

Any help is highly appreciated!

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Hi! I'm trying to simulate multiple UAVs in PX4 SITL. I am trying to start two instances of jmavsim , but I am kinda stuck. How did you configure udp ports for different instances?

    Pere Molins Ayuso said:

    Hi,

    What I ended up doing is creating multiple folders with the ArduCopter code. Each corresponds to one UAV with its own configuration and SYSID. (ardupilot/ArduCopter1 , ardupilot/ArduCopter2, ...)

    Then I start a terminal with the different instances from each folder:

    gnome-terminal \
    --tab -t ArduCopter1 -e "bash -c \"cd ~/ardupilot/ArduCopter;sim_vehicle.sh -v ArduCopter -I 1 -L LOC1; exec bash\"" \
    --tab -t ArduCopter2 -e "bash -c \"sleep 2; cd ~/ardupilot/ArduCopter2;sim_vehicle.sh -v ArduCopter -I 2 -L LOC2;exec bash\"" \
    --tab -t ArduCopter3 -e "bash -c \"sleep 5; cd ~/ardupilot/ArduCopter3;sim_vehicle.sh -v ArduCopter -I 3 -L LOC3;exec bash\"" \

    I'm sure there are other (probably cleaner) ways to do it but this works for me.

  • Hello i am very much interested in a similar setup for my research . How did you go about changing the port for each Arducopter instance.. cause i think it uses port 14550 by default right??..and if this is not changed it leads to a lot of conflict.

    thanks  for any help .

  • Could you please share the script that starts multiple ArduCopter instances and the way how you manage to do it? Thanks.

    • Hi,

      What I ended up doing is creating multiple folders with the ArduCopter code. Each corresponds to one UAV with its own configuration and SYSID. (ardupilot/ArduCopter1 , ardupilot/ArduCopter2, ...)

      Then I start a terminal with the different instances from each folder:

      gnome-terminal \
      --tab -t ArduCopter1 -e "bash -c \"cd ~/ardupilot/ArduCopter;sim_vehicle.sh -v ArduCopter -I 1 -L LOC1; exec bash\"" \
      --tab -t ArduCopter2 -e "bash -c \"sleep 2; cd ~/ardupilot/ArduCopter2;sim_vehicle.sh -v ArduCopter -I 2 -L LOC2;exec bash\"" \
      --tab -t ArduCopter3 -e "bash -c \"sleep 5; cd ~/ardupilot/ArduCopter3;sim_vehicle.sh -v ArduCopter -I 3 -L LOC3;exec bash\"" \

      I'm sure there are other (probably cleaner) ways to do it but this works for me.

This reply was deleted.

Activity

DIY Robocars via Twitter
Friday
DIY Robocars via Twitter
RT @_JonMyer: 🏎 We need your help in naming my #AWS DeepRacer Underground Track 🏎 @davidfsmith's track is going to be referred to as 𝗔𝗪𝗦 𝗗…
Thursday
DIY Robocars via Twitter
RT @gclue_akira: 仕事もおわったし、電脳化にとらい #マリオカートハック https://t.co/4IU90hCLgm
Thursday
DIY Robocars via Twitter
This is the hashtag to follow all the people in Japan who are hacking the new Nintendo Mario Kart with the real AR… https://twitter.com/i/web/status/1319281354664677376
Thursday
DIY Robocars via Twitter
RT @gclue_akira: @chr1sa @diyrobocars jupyter mario https://t.co/P0oHdjlCRq
Thursday
DIY Robocars via Twitter
RT @_JonMyer: 🚨Our 1st AWS DeepRacer Community Race is Underway on http://twitch.tv/aws 🚨 Join us to find out which member of your commu…
Tuesday
DIY Robocars via Twitter
Oct 19
DIY Robocars via Twitter
RT @BackyardRobotcs: After an admittedly long wait, the new Tinymovr R3.3 motor controller is now available https://tinymovr.com 🥳
Oct 19
DIY Robocars via Twitter
RT @_JonMyer: 🏎 1 hr left before the #AWS #DeepRacer Community 🏎 Top 5 Race tomorrow LIVE on Twitch 1st Place = $50 Amazon GC or AWS Credit…
Oct 19
DIY Robocars via Twitter
Oct 16
DIY Robocars via Twitter
Oct 15
DIY Robocars via Twitter
Oct 14
DIY Robocars via Twitter
RT @davidfsmith: Race virtually with The AWS DeepRacer Community Race and then join us on the track to see how your times compare on the ph…
Oct 14
DIY Robocars via Twitter
Oct 14
Hiroki Tanaka liked Hiroki Tanaka's profile
Oct 13
DIY Robocars via Twitter
RT @breadcentric: It's now!
Oct 13
More…