Hi All,

I've been working on a system for running an APM 2.5 as a sensor and I/O board for a plane with another on-board computer.  I couldn't find existing code for this (although perhaps it does exist and I missed it), so I built my own.

This is close to what I'm doing, although I do not use ROS (it would be easy to add though): http://www.diydrones.com/forum/topics/ardupilot-mega-with-ros-onboard?page=2&commentId=705844%3AComment%3A1203701&x=1#705844Comment1203701

The APM communicates with the on-board computer via USB, to which it publishes sensor readings, and reads messages that contain the servo values.  It also does mux-ing between autonomous and manual modes based on a radio channel input.

I'm using the MAVLINK protocol to go up and down, so it should be relatively compatible with existing code in that regard.  I did have to define a new message or two, but that shouldn't be too bad for anyone else to use.

The system is working pretty well now, and if anyone is interested, I'm happy to provide the code.  I wasn't quite sure what to call it, so it's currently named "ArduRead".  Some of the code is hacked together, but I'm happy with most of it.

Some approximate stats from the last time I turned it on:

IMU message rate: 160Hz

Barometric altitude rate: 70-80Hz

Pitot tube rate: 70-80Hz

GPS rate: 10Hz (although might be duplicated, depending on your GPS)

Battery read rate: should be 10Hz, putting this in this week




Andrew Barry
Ph.D. Candidate in Electrical Engineering & Computer Science
Robot Locomotion Group
Computer Science and Artificial Intelligence Laboratory
Massachusetts Institute of Technology
Stata Center, 32-380
32 Vassar St.
Cambridge, MA 02139

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

Join diydrones

Email me when people reply –


  • just trying to make sure, you are controlling a UAV with Ardupilot from a computer wirelessly, right ? I Or is it the computer also flying with the UAV ? 

    I want to control a quadrotoror or any type of UAV  with Ardupilot from a computer wirelessly. Yes, without a remote control . Where can i look for the help ? I would be very thankful. : ) 

  • Hi Andy;

    I was trying to compile and load your code on Apm but there are so many errors. I couldn't handle them I am using modified arduino for ardupilot to compile the code. I am really appreciate if you could help. I couldn't put errors because so many I guess I am doing wrong some basic stuff. But I coudn't find

    Thank you


  • Update: I put all of my new code in the "arduread" branch here: https://github.com/andybarry/ardupilot/tree/arduread

    It would need some cleanup to get merged into the main branch, which I'm happy to do if there's interest.

    Contribute to andybarry/ardupilot development by creating an account on GitHub.
This reply was deleted.


DIY Robocars via Twitter
How to use the new @donkey_car graphical UI to edit driving data for better training https://www.youtube.com/watch?v=J5-zHNeNebQ
DIY Robocars via Twitter
RT @SmallpixelCar: Wrote a program to find the light positions at @circuitlaunch. Here is the hypothesis of the light locations updating ba…
DIY Robocars via Twitter
RT @SmallpixelCar: Broke my @HokuyoUsa Lidar today. Luckily the non-cone localization, based on @a1k0n LightSLAM idea, works. It will help…
Nov 25
DIY Robocars via Twitter
@gclue_akira CC @NVIDIAEmbedded
Nov 23
DIY Robocars via Twitter
RT @luxonis: OAK-D PoE Autonomous Vehicle (Courtesy of zonyl in our Discord: https://discord.gg/EPsZHkg9Nx) https://t.co/PNDewvJdrb
Nov 23
DIY Robocars via Twitter
RT @f1tenth: It is getting dark and rainy on the F1TENTH racetrack in the @LGSVLSimulator. Testing out the new flood lights for the racetra…
Nov 23
DIY Robocars via Twitter
RT @JoeSpeeds: Live Now! Alex of @IndyAChallenge winning @TU_Muenchen team talking about their racing strategy and open source @OpenRobotic…
Nov 20
DIY Robocars via Twitter
RT @DAVGtech: Live NOW! Alexander Wischnewski of Indy Autonomous Challenge winning TUM team talking racing @diyrobocars @Heavy02011 @Ottawa…
Nov 20
DIY Robocars via Twitter
Incredible training performance with Donkeycar https://www.youtube.com/watch?v=9yy7ASttw04
Nov 9
DIY Robocars via Twitter
RT @JoeSpeeds: Sat Nov 6 Virtual DonkeyCar (and other cars, too) Race. So bring any car? @diyrobocars @IndyAChallenge https://t.co/nZQTff5…
Oct 31
DIY Robocars via Twitter
RT @JoeSpeeds: @chr1sa awesomely scary to see in person as our $1M robot almost clipped the walls as it spun at 140mph. But it was also awe…
Oct 29
DIY Robocars via Twitter
RT @chr1sa: Hey, @a1k0n's amazing "localize by the ceiling lights" @diyrobocars made @hackaday! It's consistently been the fastest in our…
Oct 25
DIY Robocars via Twitter
RT @IMS: It’s only fitting that @BostonDynamics Spot is waving the green flag for today’s @IndyAChallenge! Watch LIVE 👉 https://t.co/NtKnO…
Oct 23
DIY Robocars via Twitter
RT @IndyAChallenge: Congratulations to @TU_Muenchen the winners of the historic @IndyAChallenge and $1M. The first autonomous racecar comp…
Oct 23
DIY Robocars via Twitter
RT @JoeSpeeds: 🏎@TU_Muenchen #ROS 2 @EclipseCyclone #DDS #Zenoh 137mph. Saturday 10am EDT @IndyAChallenge @Twitch http://indyautonomouschallenge.com/stream
Oct 23
DIY Robocars via Twitter
RT @DAVGtech: Another incident: https://t.co/G1pTxQug6B
Oct 23