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 @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
DIY Robocars via Twitter
RT @donkey_car: Human-scale Donkey Car! Hope this makes it to a @diyrobocars race https://www.youtube.com/watch?v=ZMaf031U8jg
Jun 25
DIY Robocars via Twitter
Jun 25
DIY Robocars via Twitter
Jun 16
DIY Robocars via Twitter
RT @GrantEMoe: I won my first @diyrobocars @donkey_car virtual race! Many thanks to @chr1sa @EllerbachMaxime @tawnkramer and everyone who m…
Jun 13
DIY Robocars via Twitter
RT @gclue_akira: JetRacerで自動走行したコースを、InstantNeRFで再構築。データセットは別々に収集 #jetracer #instantNeRT https://t.co/T8zjg3MFyO
Jun 13
DIY Robocars via Twitter
RT @SmallpixelCar: SPC 3.0 Now the motor also works. This car is doable. I just need to design a deck to mount my compute and sensors. http…
Jun 13
DIY Robocars via Twitter
RT @SmallpixelCar: My new car SPC 3.0. https://t.co/CKtkZOxeNQ
Jun 7
DIY Robocars via Twitter
RT @SmallpixelCar: High speed at @diyrobocars thanks @EdwardM26321707 for sharing the video https://t.co/o4317Y2U1S
Jun 7
DIY Robocars via Twitter
RT @SmallpixelCar: Today at @RAMS_RC_Club for @diyrobocars. Used @emlid RTK GPS and @adafruit @BoschGlobal IMU. Lap time 28s https://t.co/R…
May 28
DIY Robocars via Twitter
May 15
DIY Robocars via Twitter
May 14
DIY Robocars via Twitter
May 13
DIY Robocars via Twitter
RT @f1tenth: Say hi to our newest #F1TENTH creation for @ieee_ras_icra next week in Philly. It’s going to be huge! 😎 🔥 @AutowareFdn @PennEn…
May 13
DIY Robocars via Twitter
May 11
More…