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
RT @knightsautoteam: Hi @diyrobocars, we are Orlando's first Autonomous racing club and would love your support. We are hosting our first K…
Jan 20
DIY Robocars via Twitter
RT @Heavy02011: #VirtualRaceLeague: @DIYRobocars Race #14 - #ParkingLotNerds join us January 15th for #AutonomousRacing #RoboRace ⁦@DAVGtec…
Jan 16
DIY Robocars via Twitter
RT @chr1sa: And after that came our races, 50 in all. This battle between these two Russians was the best we've ever seen -- incredible fig…
Jan 16
DIY Robocars via Twitter
RT @chr1sa: Before our @DIYRobocars virtual race this weekend, we had a presentation from the team that won the Indy Autonomous Challenge i…
Jan 16
DIY Drones via Twitter
Dec 12, 2021
DIY Robocars via Twitter
Dec 12, 2021
DIY Robocars via Twitter
RT @chr1sa: Just a week to go before our next @DIYRobocars race at @circuitlaunch, complete with famous Brazilian BBQ. It's free, fun for k…
Dec 4, 2021
DIY Robocars via Twitter
How to use the new @donkey_car graphical UI to edit driving data for better training https://www.youtube.com/watch?v=J5-zHNeNebQ
Nov 28, 2021
DIY Robocars via Twitter
RT @SmallpixelCar: Wrote a program to find the light positions at @circuitlaunch. Here is the hypothesis of the light locations updating ba…
Nov 26, 2021
DIY Robocars via Twitter
RT @SmallpixelCar: Broke my @HokuyoUsa Lidar today. Luckily the non-cone localization, based on @a1k0n LightSLAM idea, works. It will help…
Nov 25, 2021
DIY Robocars via Twitter
@gclue_akira CC @NVIDIAEmbedded
Nov 23, 2021
DIY Robocars via Twitter
RT @luxonis: OAK-D PoE Autonomous Vehicle (Courtesy of zonyl in our Discord: https://discord.gg/EPsZHkg9Nx) https://t.co/PNDewvJdrb
Nov 23, 2021
DIY Robocars via Twitter
RT @f1tenth: It is getting dark and rainy on the F1TENTH racetrack in the @LGSVLSimulator. Testing out the new flood lights for the racetra…
Nov 23, 2021
DIY Robocars via Twitter
RT @JoeSpeeds: Live Now! Alex of @IndyAChallenge winning @TU_Muenchen team talking about their racing strategy and open source @OpenRobotic…
Nov 20, 2021
DIY Robocars via Twitter
RT @DAVGtech: Live NOW! Alexander Wischnewski of Indy Autonomous Challenge winning TUM team talking racing @diyrobocars @Heavy02011 @Ottawa…
Nov 20, 2021
DIY Robocars via Twitter
Incredible training performance with Donkeycar https://www.youtube.com/watch?v=9yy7ASttw04
Nov 9, 2021
More…