ArduPilot Mega with ROS onboard

I've been working on this since over a year now and am happy with the results achieved, so why not brag about it :).

The project originated from ArduCopter after I bought one and started playing with it. I've rewritten all of the functional code in an object-oriented fashion. I reused the driver part of ArduCopter code, though. I'm using APM1 as low-level autopilot and iEi PM-PV-D5251 Single Board Computer (SBC) with 2GB RAM and 32GB flash for higher level tasks performed onboard. The SBC runs Linux (Ubuntu 10.04) and Robot Operating System (ROS). I used rosserial for APM<->ROS communication.

I'm planning to release the code I've been using around October as LGPL and was wondering if there is interest for such a project in the community. The platform is aimed at research entities and hobbyists. The platform I'm flying costed less than 1000USD (without laser scanner visible on images below). There is also an option to replace the SBC I'm using with a PandaBoard or BeagleBoard for lower cost (and lower performance, though). Other platforms (like fit-PC without casing) would fit too, of course.

The code is not compatible with ArduCopter any more nor I think there is need for it to be, but I'm open for all good ideas. It only supports APM1, but I think migrating to APM2 shouldn't be very hard.

Any friendly questions invited, I'm curious of your opinion. I'm planning to record a promo-video in one or two months with the quadrotor performing indoor SLAM, just don't have time for it now.




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

Join diydrones

Email me when people reply –


  • hi marcin (and of course everybody else from the diy-community),

    after a little break i decided to go on with this project because its a lot of fun (and also a lot of work of course ;)).

    i asked me how you solved the autonomous flight? you wrote that you did the communication via rosserial. i installed mavlink to connect with ros and it works fine and i get messages from mavlink, but how do i send a command right now? any idea? is there any teleop-stack that could be used for the first time? or any possibility to send a command like "start" and the copter starts and holds position at 3m for example?

    hope to here from you,


  • Hi Marcin,

    I am also very interested in Multicopter with adequate TOF camera like Kinect to be able to implement a simple SLAM system at least capable of reference point establishment, path finding and multipoint navigation.

    From what I have been seeing the PX4 is a far more capable system than the APM and given it's existing application with stereo cameras it should easily have the power to deal with a Kinect like distance image which should be MUCH less computationally intensive than stereo camera image overlay distance image extraction.

    Of course, the other significant news is the Capri by PrimeSense (the same people who make the Kinect) of a much smaller and lighter version of the Kinect's distance image camera.

    I have a Kinect which I have been exploring with Microsoft Robotic Studio and will probably soon get a PX4 to begin experimenting with connecting them.

    From what I can tell, the Capri works the same as the distance camera portion of the Kinect, so when the Capri is available it should be a drop in for a practical multicopter application.

    I hope you are still pursuing this and would very much like to hear about your progress.

  • hi there,

    congratulations to this great work!

    i would be very, very happy for some informations how to communicate between APM and ROS. i have to do a project where i want to equip a 3DR ArduCopter Hexa-B Frame with pandaboard (with ROS) and kinect to do mapping and indoor SLAM, too.

    for that i selled a hexacopter with APM 2.5. i don't have that time of one year, just till end of this year, so i would be very thankfull for some help.

    maybe you can contact me for that?!

  • Moderator

    This looks like an impressive... thanks for sharing!

    Can I ask a simple question, where did you get your blade guards?

  • Developer

    Looking good.  I see you have the hokuyo lidar on there as well.

    I think it's inevitable that people will want to add higher level functions on top of the arducopter/ardupilot so it's very interesting to see that you've already done that although it also looks like you had to rewrite all the lower level stuff as well.

    I think we'd thought that people would use mavlink to handle the communication between the boards so it's interesting to see you use rosserial.  Presumably you think that's a much better or more natural choice?  On the arducopter side we'd tend towards mavlink because that's what we already use for the GS <-> Arducopter comms...but it's probably more important that the "customer" is happy with the protocol.

This reply was deleted.


DIY Robocars via Twitter
18 hours ago
DIY Robocars via Twitter
RT @SmallpixelCar: @a1k0n @diyrobocars I learned from this. This is my speed profile. Looks like I am too conservative on the right side of…
20 hours ago
DIY Robocars via Twitter
RT @a1k0n: @SmallpixelCar @diyrobocars Dot color is speed; brighter is faster. Yeah, it has less room to explore in the tighter part, and t…
20 hours ago
DIY Robocars via Twitter
RT @a1k0n: I'm gonna try to do proper offline reinforcement learning for @diyrobocars and throw away all my manual parameter tuning for the…
DIY Robocars via Twitter
RT @circuitlaunch: DIY Robocars & Brazilian BBQ - Sat 10/1. Our track combines hairpin curves with an intersection for max danger. Take tha…
DIY Robocars via Twitter
RT @SmallpixelCar: Had an great test today on @RAMS_RC_Club track. However the car starts to drift at 40mph. Some experts recommended to ch…
Sep 11
DIY Robocars via Twitter
RT @gclue_akira: 世界最速 チームtamiyaのaiカー
Sep 10
DIY Robocars via Twitter
RT @DanielChiaJH: Always a good time working on my @diyrobocars car at @circuitlaunch. Still got some work to do if I’m to beat @a1k0n howe…
Sep 10
DIY Robocars via Twitter
RT @SmallpixelCar: My new speed profile for @RAMS_RC_Club track
Sep 10
DIY Robocars via Twitter
RT @SmallpixelCar: Practiced at @RAMS_RC_Club today with my new @ARRMARC car
Aug 28
DIY Robocars via Twitter
Aug 24
DIY Robocars via Twitter
RT @gclue_akira: 柏の葉で走行させてるjetracerの中身 #instantNeRF #jetracer
Jul 4
DIY Robocars via Twitter
Cool web-based self-driving simulator. Click save when the AI does the right thing
Jul 4
DIY Robocars via Twitter
RT @donkey_car: Human-scale Donkey Car! Hope this makes it to a @diyrobocars race
Jun 25
DIY Robocars via Twitter
Jun 25
DIY Robocars via Twitter
Jun 16