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

DIY Robocars via Twitter
RT @a1k0n: Did I get rid of hand-tuned parameters? Yes. Am I still hand-tuning more parameters? Also yes. I have a few knobs to address the…
Monday
DIY Robocars via Twitter
RT @a1k0n: I'm not going to spoil it, but (after charging the battery) this works way better than it has any right to. The car is now faste…
Monday
DIY Robocars via Twitter
RT @a1k0n: Decided to just see what happens if I run the sim-trained neural net on the car, with some safety rails around max throttle slew…
Monday
DIY Robocars via Twitter
Saturday
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…
Saturday
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…
Saturday
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…
Friday
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…
Sep 22
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カー https://t.co/1Qq2zOeftG
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 https://t.co/RtLb7TcgIJ
Sep 10
DIY Robocars via Twitter
RT @SmallpixelCar: Practiced at @RAMS_RC_Club today with my new @ARRMARC car https://t.co/AEu2hCx89T
Aug 28
DIY Robocars via Twitter
Aug 24
DIY Robocars via Twitter
RT @gclue_akira: 柏の葉で走行させてるjetracerの中身 #instantNeRF #jetracer https://t.co/giVvuE4hP7
Jul 4
DIY Robocars via Twitter
Cool web-based self-driving simulator. Click save when the AI does the right thing https://github.com/pncsoares/self-driving-car
Jul 4
More…