I am new to the site and new to doing some development with the ArduCopter.
I have played around with some DroneKit software for Python and Android. I have a fair understanding of it thus far. What I am trying to do is being able to get a ground station to control multiple UAVs.
What my process was is looking at MAVProxy and read up on it. I can connect to a physical drone Iris+ and a virtual copter by following
I run the instance with this command
sim_vehicle.sh -v ArduCopter -L PLACE --map --console --out <IP_ADDRESS>:14550
It works well and I can connect to it using MavProxy via the following command


mavproxy.py --master=

Now I can connect to the physical as well with

mavproxy.py --master=/dev/USB0

When I try to use with both

mavproxy.py --master= --master=/dev/USB0

It doesn't work and I don't even know if it would work to begin with I was just trying.
All in all what i am trying to do is being able to connect to 2 drones and be able to control them with 1 ground control station.

API: to connect to multiple vehicles

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

Join diydrones

Email me when people reply –


  • Developer

    The direction you're going in will probably work but personally I've done it with 3 real vehicles and an antenna tracker.  I've put together a wiki page on the copter wiki.

    • Interesting I will check it out. The thing I am interested in is being able to communicate with the drones directly through the software itself. Meaning "in the code" rather than using existing software. 

      Nonetheless, I will try it out and get back if any further questions/problems.


    • Developer

      APM Planner 2.0 support multiple drones. You need allocate a unique SYS_ID for each drone. 

      MAV Proxy can handle different SYS_IDs but not multiple drones from the same instance. i.e. you'll need an instance of MAV Proxy for drone. You can use MAVProxy to 'combine streams' I need to look for the runes to make that work

      You should be able to use DroneKit as it knows about SYS_IDs, but i am not sure how it demux's the vehicle, that logic is probably up to the app

    • I am not entirely understanding the process. 

      I have change SYSID_THISMAV to be unique per vehicle. I don't understand the process in which to link them together.

      I did mavproxy.py --master= to link it up with the virtual vehicle and then did link add /dev/ttyUSB0 for the physical vehicle. Not entirely sure if that even worked or not.

      I run the following script ApiConnection to see if 2 vehicles are registered, but always end up getting 1.

      I am confused in the process to getting this. I understand the software mentioned above is able to register multiple vehicles, but I am interested in the process it was done and how they did it. I don't want to use an existing GCS, but rather make one from scratch to do these things.

    • A simple overview what I am after is having a GCS facilitate the missions and distribute them to the drones. Drone 1 finishes a set of missions and the GCS will recognize missions complete and send the next set of missions to Drone 2. 


      Perhaps I am approaching this the wrong way or I am trying to achieve something rather odd.

    • Like this

    • Developer

      I think basically you just need something to intelligently merge the mavlink streams together.  So it needs to take telemetry streams coming out of each vehicle, parse them and interleave them.

      There's a number of ways to do that, I used the antenna tracker which can accept 3 mavlink streams and then outputs a combined stream on it's usb port.  The RFD900 radio can also do it somehow - it allows multiple vehicles to be attached to a single radio on the ground station.

      I guess MAVProxy can merge streams as well but I'm not sure how to do it.  Once the streams are merged I think DroneKit is able to handle controlling multiple vehicles although I've never tried.

      I don't think MAVProxy can control multiple vehicles because it doesn't expose a method to say, "I want these commands to go to vehicle #1"

      Multiple coordinated drones is a totally reasonable thing to attempt, it's just not something that a lot of people have done yet.

      By the way, it's mentioned on the dev wiki but you're also welcome to join us on the python-dronekit gitter.

    • Awesome thank you for the reply. I will continue from there and checkout the gitter as well. Thanks for providing info thus far!

    • So take from the above.


      X-drones -> send stream data over to some radio node -> radio node get X data streams and streams that into 1 output, that being the usb.

      Now, how or where does this output go? 

      In the link explaining multiple copter control: GCS capable of displaying/controlling multiple vehicles (i.e. the Mission Planner).

      How does the GCS actual decipher that? Or unless it is truly as simple as just 

      api = local_connect()
      all_vehicles = api.get_vehicles()

      And all I would need to do is make sure when I ran mavproxy.py is to make sure -master is directed to the correct usb.

This reply was deleted.