MAV Link On Raspberry Pi's

Hey every oneI'm working on a project where I am using a Raspberry Pi to take photos when commanded to by the APM2.5. I have this working nicely using the camera shutter pin on the side of the APM2.5 board running to a LLC dropping the 5v down to 3.3v then from the LLC to a GPIO pin on the Pi. The issue that I'm now having is I want to be able to add the GPS coordinates from the APM to the photos, I know that I have to use MAVLink to pull the data from the APM but I cannot get it to work on the Raspberry Pi.I have tried using the ##.deb file with the packet manage on Raspian but i get a "incorrect architecture type 'i386'" error.would some one who has done this be able to point me in the right direction or walk me through it ?ThanksAdam

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

Join diydrones

Email me when people reply –

Replies

  • Hi, you need to now some Linux and some programming to get that to work... probably better to consult someone who knows that well? It is too large a thing for a simple forum how-to.

    Anyway - it is not hard. There is the excellent and original MAVLink project on Github that will generate C and Python code for you (and it runs on ARM too). A C program to extract positions, using the generated C code, could be written with about 100 lines - most of which are for initialising that stupid serial port :)

    As a alternative for avoiding MAVLink, add another GPS to the RPi and read that. NMEA1082 data are not hard to parse.

    Regards

    Soren

    • Hi, Soren!

      Well, I am interested on the same thing as Adam.

      The idea would be integrating Raspberry Pi with an infrared camera + USB Camera.  and have these images  Geo-referenced.

      \Adding a another GPS to RPi would be a solution/shortcut, but  I rather learn how to integrate both - what would allow exploring some other functionalities. If you can give us some other references/advices, I would be very grateful.

      Cheers,


      Gustavo

      • Hi,

        There is not much to receiving MAVLink messages in a C program under Linux. MAVLink can generate C code, and C is the mother language of anything Linux, so that should work.

        I have written a gimbal controller that can understand MAVLink,. It is not for Linux though, but that only changes very little (the single line with get...blahblah where the input interface is queried for more data). You can see the Mavlink branch in https://github.com/dongfang/SorenK_BrushlessGimbal , file Mavlink.cpp how it was done. It can be done a little simpler than this on a PC because you there are some stunts to save memory that you don't need to employ.

        All the code in the mavlink directory is not someting I have written. Rather, I have checked out the official MAVLink github (https://github.com/mavlink/mavlink) and run the code generator; this has output that code. It is described well several places how to do that (easy).

        If you rather like Java I have written a MAVLink parser and serializer generator - ask.

        Regards

        Soren

        dongfang/SorenK_BrushlessGimbal
        Rewrite of Martinez brushless gimbal firmware with various improvements - dongfang/SorenK_BrushlessGimbal
  • bump
This reply was deleted.

Activity