Drone swarm development problems

Good morning,

We are creating a swarm of drones. Our first goal is to let fly two copters:
Drone A is flying a mission and B receives the flight data (waypoints) of A over XBee transceivers (uartC).
Both are navigating over GPS.

One of our idea is to manipulate the ‘next’ waypoint of B so, that it flies towards it, but never reaches it.
The other idea is just to tell B it has to fly for example 3 meters to the left or so.

What we’ve accomplished until now:

  • simple communication over XBee from A to B and back on two APM 2.6’s by modifying UserCode.pde
  • we found out, that we can get the next waypoint with wp_nav.get_wp_destination() and the current position with Vector3f pos; pos[0] = current_loc.lat;
  • setting the next waypoint with wp_nav.set_wp_destination(pos);

Now here are our questions:

  • is it possible to overwrite the next waypoint with the above code and is the above code really overwriting the next waypoint?
  • Is there a possibility to tell a copter to fly just 3 meters to the right and 1 meter higher?
  • Should the communication over XBee be implemented with MAVLINK? How?
  • How would you do it? Have you any proposals? Is our concept realizable?

As our programming skills are not high we would be happy for information or tips! :blush:

Thanks very much in advance.

P.S.: We will post this topic in DIYDrones as well.


Your proposed subject is very interesting for me. I already built two APM Quads:
a) a micro HKAPM already tested and flees good in Stabilize, Loiter, RTL, and ALTHOLD. Not yet tested AUTO
b) a HKPilot32 for which I have troubles to take-off.
I should be interested to participate to the different tests. Maybe you should accept to help me to solve these starting troubleshooting. For a not understanding raison I found that two of the motors of my Quad (PX4, X frame) namely motor 2 and motor 3 are super amplified compared to motor 1 and motor 4. The consequence is a strong ROLL deviation of the Quad to the right.
I had some experience in soft programming, even that in the last time it was not a subject for me.


to be honest we have no experience in flying or building quads. At the moment we are trying to steer our ‘drone’ over SITL. That means we are programming methods that allow us to let fly two quads autonomously in a ‘swarm’. ‘swarm’ means for us one at the beginning and one on the right.

We began today with calibrating the 3DR radios and last week we calibrated the compass!
We are at the beginning in this case :wink: I hope we can start our Copter tomorrow for the first time in guided mode.

Next thing will be the test of our simple ‘swarm’ code…

Maybe somebody of the hardware section knows the ocurrable problems of motors better.

The only thing I can say that it seems that two motors are sucking more current in a way.
This can be either in the software (controller thinks that the quad is rolling), or the ESC’s are not all the same (or the motors?). So if for example two are delivering 2A and two 3A and the motors need 3A, then the 2A aren’t receiving enough current and are slower.
But like I said, of these things I don’t know much.

Hope that you find a solution,

Thanks for the answer. I continue to be interested in your project. For the moment I kip the hope to solve my bug and start finally the flight tests.

Yours, Georges

Hi, I found the solution of the bug. It was very probably due to some remaining problems in the 3.2.1 version. I changed to the 3.3.1 version and all is OK.
Yesterday morning in spite of a quite windy day, here, in Rambouillet France, the HKPilot32 Quad flight was good in STABILIZE, ALT HOLD and LOITER mode. Now I have the two operational Quads.

Do you think that I could have the code from you to try it on my Quads?

Yours, Georges