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

Chris Anderson liked Zara Mae Pickering's profile
May 21
Azjeg liked Azjeg's profile
Apr 27
DIY Robocars via Twitter
RT @chr1sa: Donkeycar 4.4 released with tons of new features, including path learning (useful with GPS outdoors), better Web and Lidar supp…
Nov 27, 2022
DIY Robocars via Twitter
RT @NXP: We are already biting our nails in anticipation of the #NXPCupEMEA challenge! 😉 Did you know there are great cash prizes to be won…
Nov 24, 2022
DIY Robocars via Twitter
RT @gclue_akira: レースまであと3日。今回のコースは激ムズかも。あと一歩 #jetracer https://t.co/GKcEjImQ3t
Nov 24, 2022
DIY Robocars via Twitter
UC Berkeley's DIY robocar program https://roar.berkeley.edu/
Nov 24, 2022
DIY Robocars via Twitter
RT @chr1sa: The next @DIYRobocars autonomous car race at @circuitlaunch will be on Sat, Dec 10. Thrills, spills and a Brazilian BBQ. Fun…
Nov 24, 2022
DIY Robocars via Twitter
RT @arthiak_tc: Donkey car platform ... Still training uses behavioral cloning #TCXpo #diyrobocar @OttawaAVGroup https://t.co/PHBYwlFlnE
Nov 20, 2022
DIY Robocars via Twitter
RT @emurmur77: Points for style. @donkeycar racing in @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/Y2hMyj1…
Nov 20, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Going to @diyrobocars race at @UCSDJacobs https://t.co/Rrf9vDJ8TJ
Nov 8, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Race @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/kK686Hb9Ej
Nov 8, 2022
DIY Robocars via Twitter
RT @PiWarsRobotics: Presenting: the Hacky Racers Robotic Racing Series in collaboration with #PiWars. Find out more and register your inter…
Oct 23, 2022
DIY Robocars via Twitter
RT @Hacky_Racers: There will be three classes at this event: A4, A2, and Hacky Racer! A4 and A2 are based around UK paper sizing and existi…
Oct 23, 2022
DIY Robocars via Twitter
Oct 23, 2022
DIY Robocars via Twitter
Oct 19, 2022
DIY Robocars via Twitter
Oct 18, 2022
More…