3
$\begingroup$

for a project for a robotic lab, i'd like to build an automous quadcopter able to follow a path and land on its own. I'd like to use an onboard android phone to do the image processing and recognition part, so that I avoid to send the video stream to a control station, process it and send back the commands.

As I need to use it in an indoor environment (so no GPS coordinate), I need the phone to guide the quadcopter giving it relative directions like FORWARD and after 1 sec STOP. This is something a normal pilot would do via the RC radio.

I already have a arducopter APM 2.5 and an arduino mega ADK and I was thinking to connect the phone to the ADK and then the ADK to the APM to guide the copter.

I think I have 2 options: either having the ADK to generate PPM/PWM signals as a RC receiver would do or use the mavlink protocol.

Which is the best/easiest solution?

Other info:

-I have already read checked some UAV related websites, but I couldn't find something close to what I want. In most of them, try to build a new type of controller, or use only ab Android phone + ADK. I'd like to stick to something already tested and known to work (as the APM & arducopter software) and I don't want to use the phone as IMU as i don't trust its sensors

-I already have built the quad (a hexa actually)

-I have already set up the connection and protocol between the phone and the adk so i'm able to send commands like, i.e. forward, turn, hover etc...

-I have already checked the andro-copter project and similar ones.

-I might consider other platforms than the APM 2.5 if there's something easier to use

-It'd be nice to keep the RC receiver in the loop to regain control of the quad if something goes wrong.

$\endgroup$
2
  • $\begingroup$ I'm doing a similar project to yours using a Nexus 5, Seeeduino ADK and APM 2.5. Did you ever get to stabilize your Quad? $\endgroup$ Oct 20, 2014 at 11:51
  • $\begingroup$ Hi, my drone wasn't very stable and I couldn't work well. At the end I bought an iris+ quad from 3d robotics, with a pixhawk controller, which seems very stable. Then I wrote a simple android program to control it (as in telling where to go and get info from the quad, not really the stabilizing loop, which is done by the pixhawk indipendently). The code uses the core libraries of droidplanner application, you can find it on github. The android phone is connected to the quad via a telemetry link which transmits the mavlink commands. $\endgroup$
    – J Mac
    Nov 10, 2014 at 14:11

1 Answer 1

1
$\begingroup$

I have done something similar to this. I used a Samsung Galaxy onboard an APM2.6-based quadcopter. As a starting point, I used DroidPlanner and it was a pretty simple matter to use the same libraries it does. Then I used another Galaxy with a screen-mirroring application over wifi to run the app.

It's good that you realize the importance of keeping RC receiver control available -- this is important for safety. You should set up your code so that it runs in "auto" mode and have switches on your receiver set up so that you can change the flight mode back to stabilize easily.

It's worth noting that APM's mavlink implementation is very incomplete. It simply ignores some of the parameters of some of the commands. For example, when you send a waypoint, it ignores the yaw parameter. Here's a pull request (never got into trunk) I submitted that fixes this and might be useful for you if you want to modify APM's mavlink implementation. Still, I think this is probably a better solution than generating PWM with the ADK.

$\endgroup$
3
  • 1
    $\begingroup$ Thanks for your answer. Eventually, i was able to have the APM talk to the ADK via serial port and Mavlink messages and the ADK connect to an onboard android phone via usb. I'll try to publish a more detailed description and some code as soon as I find it stable enough $\endgroup$
    – J Mac
    Mar 1, 2014 at 12:28
  • $\begingroup$ Cool. By the way, I've been making my own Mavlink messages which turned out to be less of a headache than I expected; let me know if you need any help with that. Also, a gentle reminder that upvoting is a good way to say thank you ;-) $\endgroup$ Mar 2, 2014 at 0:14
  • 1
    $\begingroup$ Hello I'm the main developer of DroidPlanner, if you guys need any help in using DP just mail me. $\endgroup$
    – arthur.b
    Mar 2, 2014 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.