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 Drones via Twitter
20 hours ago
DIY Robocars via Twitter
RT @Heavy02011: @diyrobocars : A Home-brew computer club* for Connected Autonomous Driving on Jan 23rd, 2021 https://www.meetup.com/Connected-Autonomous-Driving/events/275728684/ #Meetu…
20 hours ago
DIY Robocars via Twitter
20 hours ago
David Hori liked Isabella Domi's profile
Wednesday
DIY Robocars via Twitter
RT @Heavy02011: ⁦@diyrobocars⁩ Autonomous Driving Assembly at #rC3. join us at https://rc3.world/rc3/assembly/diyrobocars-f1tenth/ ⁦@f1tenth⁩ ⁦@DAVGtech⁩ ⁦@DWalmroth⁩…
Monday
DIY Robocars via Twitter
RT @chr1sa: New car designs coming for our next @DIYRobocars @donkey_car virtual race on the 23rd. Choose any one you want at race time Le…
Monday
DIY Robocars via Twitter
RT @RoboticMasters: Thanks to @EllerbachMaxime and the Sydney Uni Capstone Students the @donkey_car @diyrobocars simulator is getting a ma…
Monday
DIY Robocars via Twitter
Jan 6
DIY Robocars via Twitter
Dec 28, 2020
DIY Robocars via Twitter
An interesting line-following simulator to use with with your robocars: https://github.com/ron-grant/LFS
Dec 23, 2020
DIY Robocars via Twitter
Dec 23, 2020
DIY Robocars via Twitter
An improved version of the @IntelAIResearch OpenBot: https://diyrobocars.com/2020/12/14/an-improved-version-of-the-intel-openbot/
Dec 14, 2020
DIY Drones via Twitter
An improved version of the Intel OpenBot https://ift.tt/2KkHT8Q
Dec 14, 2020
DIY Robocars via Twitter
Dec 10, 2020
DIY Robocars via Twitter
RT @KN_Richardson: Delivery 📦😬 Early xmas present from @ccbdcdt ! Sims ready, will put h/w together over Christmas break. Didn’t need to mo…
Dec 7, 2020
DIY Robocars via Twitter
RT @RoboticMasters: Did we mention there's new car models in the #donkeycar simulator too? Here is an RB16 from team @redbull @donkey_ca…
Dec 7, 2020
More…