ROS-ArduPilotMega Integration

3689408423?profile=originalPer a suggestion from Chris, I'm working on integrating APM with ROS so that APM looks like an ROS node. I'm a newbie with APM and Arduino, but experienced with robotics in general.

I've done the basics, getting the various IDE's running and proving the concept of outputting APM sensor readings as ROS topics.

What I'm seeking now is input from the community as to what we want this integration to provide. Any suggestions and/or requests would be most welcome!
E-mail me when people leave their comments –

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

Join diydrones

Comments

  • Thanks Chris.  I'll try it out.  This helps a lot.  Now, I don't have to keep rebooting my PC.  I'm learning ROS myself, right now, so might use the my APM as the first try at making a first node.

  • 3D Robotics

    Ellison, I'm afraid you're mistaken. QGroundControl is native Linux.

  • Correct me if I'm wrong, but currently there is no ground station software that runs in Linux. So, before any ROS integration is going to be useful, I think we will need a Ground Station software that runs in Linux.  Otherwise we'll need a Windows PC to run a ground station, another one to run Linux/ROS.

  • On the DIYDrone store, I followed the Arduino link because the docs all say things are based on Arduino, you need the Arduino IDE, etc. That link takes you to the Arduino Mega 2560 card - nice blue card, matching the color in the picture of the controller on the newbie's page. Of course, it turns out that the picture is showing the blue IMU card, hiding the *red* controller card, but that only became clear after the fact.

    So basically I wound up confused because of the emphasis on using Arduino IDE + Arduino hardware, the "Ardu" in APM, etc. - and not realizing that APM doesn't use the Arduino hardware after all. I also found some linkage on the Arduino site, where they mention your name and that there is a connection to APM - hence furthering the notion that somehow Arduino hardware and APM are related.

    As a newbie to DIYDrones, it would have helped if the newbie docs and the site overall made it clear that there is a distinction between the Arduino *Pilot* Mega 2560 board and the Arduino Mega 2560 board of the nearly identical name. My impression was that the only difference is that one came with the APM software, and the other didn't....
  • 3D Robotics
    Ralph: I'm confused. Can you tell me what path you took to buying the board? I can't find any description, including the product listing itself, that doesn't make it crystal clear that you need the APM board.
  • Chris: ouch, that was clear as mud. :-(
  • Ralph, don't get discouraged, large chunks of the necessary code are already working and I'd be happy to help answer questions you might have. Though email is easier for me.

     

    Most of what needs to be done is figuring out how all the parts fit together and make it work with the APM. There are parts of the larger problem that I am already committed to working on, however I am not available to work on integrating the APM until I can dequeue my to do list.

     

    MAVLink is really two separate things

      First it is a lightweight communications and marshaling protocol that can run on a microcontroller.

        This is already running on the APM

        and on the ROS side there is a driver that handles generic messages

          http://www.ros.org/wiki/lcm_mavlink_ros

      Second there is a set of commands that can be sent over the protocol to control the MAV

        This is a matter of getting the APM to act on incoming messages

          This should be at least partially done for qground control integration but there is probably

          more work to be done.

          http://qgroundcontrol.org/mavlink/start

        This also requires that ROS is capable of processing and formatting these messages

          AFAIK, this is where most of the work is. You need to figure out how to get the GPS

          position, and etc, from a generic MAVLink message into a properly formatted ROS message.


    Also keep in mind that this is an area of open research and there are quite a few groups working on different parts of the problem. The current version of ROS has some issues with robots that operate in 3D, however it is quickly improving.

     

    I suspect the easiest way to work on this type of project is to start with a task you want to use ROS/APM for and work backwards to add the necessary functionality.

  • 3D Robotics

    Ralph, APM doesn't support the regular Arduino Mega 2560 board. It uses the custom APM 2560 board. They're also sold as complete kit.

  • 3D Robotics
    Ralph, MAVlink is handled by the APM libraries, GCS_MAVlink in particular.
  • I Heart Robotics: appreciate the links. I don't speak Windows, but I'll see what can be done with Mac and Linux. I'm a little leery of taking on a project of such broad scope as you describe, though - may be I should pass on this one, but I'll see if perhaps it can be broken into more manageable chunks.
This reply was deleted.