Developer
The ardupilotmegacomm library is successfully sending/ receiving HIL communication and is sending/receiving the standard ardupilotmega binary protocol. yagcs and dronegcs (several ardupilotmega ground stations) both currently use the library. I updated the apmcomm library to fix some bugs and also added hardware in the loop support. I renamed the project from apmcomm to avoid a bunch of misc. hits on google. I have packaged a linux version using cpack -G DEB, but could use a developer on windows to package the windows version with the nullsoft installer. If you have boost >= 1.40 and cmake >= 2.60 it should only require you to checkout the repository and run cpack -G NSIS
Here is the svn repository checkout line: svn checkout http://ardupilotmegacomm.googlecode.com/svn/trunk/ ardupilotmegacomm-read-only

I have written a semi-detailed wiki page on how to get going with the library. I've included short demos on how to test out the HIL and binary protocol communications with the included test programs. Here is the link to the project on google code: http://code.google.com/p/ardupilotmegacomm/

To fix some upstream problems in the Arducotper APM_BinComm library that haven't been accepted yet, I built a patch system into the CMakeLists.txt file. First svn pulls APM_BinComm from arducopter. Then CMake notices that there is no patch stamp and applies the patch to the APM_BinComm tree. Then the build system creates the patch stamp so no errors are produced during successive builds.

E-mail me when people leave their comments –

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

Join diydrones

Comments

  • Developer
    There was a line in there that set the library build path. It really didn't make since so I just took it out and left it as default, which leaves it in src. If you run make install it will install the libraries to /usr/include/ardupilotmegacomm. I repackaged this change as 0.0.2 so you should just be able to install that package, or run make install after you build the source.
  • Thanks, the last version seems to work for me and yagcs uses it now. Nice that it automatically pulls and patches APM_Bincomm. One minor comment though: it seems that the compiled library ends up in the subdirectory src/1 (that is the number 1) where I would have maybe expected it in lib/ or something like that. Not so important, I was just wondering whether there is a reason for this.
  • Thanks for posting this. I'll work on implementing it shortly in my GCS as well.
  • Developer
    Yes, this library implements the official protocol for APM. What makes it useful is that it depends on the arduino based APM_BinComm library. So as protocols are added to the micro-controller side to fully flesh out the binary protocol as described on the wiki, all we have to do is rebuild the library and the svn external link to APM_BinComm should take care of the rest. It wraps the Arduino code for host-side c++ by defining the Stream class as a Boost Asynchronous Serial port for host-side C++ programs. And boost is cross-platform so the library itself is cross-platform.

    dronegcs is a work in progress by me and my lab mate. It uses qt and osgearth to produce a very visual 3d/ terrain rendering ground station. We also have kept the cpu consumption down by limiting the frame rate for the 3d graphics to around 30 fps. We are working right now on the point and click interface in 3d. Currently we can add, remove waypoints etc. We still are working on click and drap for moving them. It also uses the vehicle attitude and position information to render a 3d vehicle model that can be scaled. The idea is basically to turn the ground station into something with more of the look and feel of a real time strategy game to make multiple vehicle/ formation control an easier task.
    http://oooark.git.sourceforge.net/git/gitweb.cgi?p=oooark/dronegcs;...
  • James, is this the official protocol for APM? Can you post a link to dronegcs as well?
This reply was deleted.