Alternative inputs for Ardupilot

My senior design team is interested in drone-to-drone communication to allow a team of drones to lift an object. We plan on having minimal input (no RC input) and were wondering if it would be practical to add functions like moveLeft(int seconds) and moveUp(int seconds) instead of radio input. I have skimmed the code but I am not sure if this kind of input would be practical with ardupilot.

We have little drone experience but a ton of coding experience. We would like to leave ardupilot in tact as a base for our project and interface to it using functions like the ones described above.

Thank you!

I’m not sure if there is a better way, but I have done what you describe simply by sending RC overrides from a companion computer or ground station. For example, moveUp(x) might increase RC3 (throttle) to 1700 for x seconds. This method is simple and works quite well in Loiter flight mode. It can be tested in sim via Mavproxy rc override commands, e.g. rc 3 1700.

If you try this method, note that weird things start to happen if the TX is disconnected and you issue an RC override on one channel; ArduPilot will (for some reason…) interpret the other channel readings of 0 as valid inputs and flip the drone, so you’ll probably first need to override all channels to 1500 (rc all 1500) and then override individual channels as needed to maneuver. However, this means that you will have to issue RC handback with rc all 0 if you want TX control back.

Another method would be to simply use Guided mode with a ground station or companion computer issuing waypoints.

Both methods are susceptible to GPS imprecision, though; you may need RTK GPS or a different way to maintain drone relative position if your formation tolerance is tighter than a couple meters.

Sounds like Dronekit could be useful to you: http://python.dronekit.io/

Yes, as @james_pattison implies, Guided mode accepts mavlink GLOBAL_POSITION_TARGET messages which can be used to move the vehicle around. AP also supports a velocity control so you could instead send in a request to move in any direction (specified as a 3D vector) at a given speed.

Follow mode may also be interesting if you’re trying to control a set of drones. It’s at least theoretically possible then to just control one drone and have the rest follow… the only downside of this approach may be a bit of lag in the response of the following drones.

You’re after guided in positioning mode; this mavlink message:

https://github.com/ardupilot/ardupilot/blob/pwm-rangefinder/ArduCopter/GCS_Mavlink.cpp#L1115

Your big problem is going to be absolute positioning accuracy.

PLEASE only do what you’re describing (no RC input) with small vehicles
which won’t take someone’s fingers off if they go crazy. Also, at least
to start with you SHOULD use an RC transmitter/receiver - until you get
the hang of things.

Peter

1 Like