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 @chr1sa: You can see this in person in two weeks for our next live event with real cars. It's great fun for adults and kids alike, and…
Sunday
DIY Robocars via Twitter
RT @chr1sa: The final race (1:24) at yesterday's @DIYRobcars virtual event was our best. It's only two minutes long but it has everything,…
Sunday
DIY Robocars via Twitter
RT @chr1sa: The monthly @diyrobocars virtual race is starting now! https://www.twitch.tv/roboticists2
Saturday
Mike Whitney liked Mike Whitney's profile
Jul 19
DIY Robocars via Twitter
Jul 2
DIY Robocars via Twitter
Jun 26
Abdulatif Tlaib liked Ryan's profile
Jun 24
DIY Robocars via Twitter
RT @SmallpixelCar: First time at @wsraceways. After tuning @HokuyoUsa lidar signal and camera sensor on @NVIDIAEmbedded, my car was able to…
Jun 20
DIY Robocars via Twitter
RT @breadcentric: The handy bit about racing with self-driving cars is that one can type while the car is racing. Report from #AWSDeepRacer…
Jun 18
DIY Robocars via Twitter
RT @chr1sa: Our Bay Area @DIYRobocars meetup is now at 2,700 members. Next in-person events (in Oakland) are training day on July 17 and…
Jun 18
DIY Robocars via Twitter
Videos from the ICRA autonomous racing workshop are now available: https://linklab-uva.github.io/icra-autonomous-racing/
Jun 10
DIY Robocars via Twitter
RT @SmallpixelCar: Prepared race track for Warm Spring Raceways @wsraceways and looking forward to test my new car at RAMS RC @ramsaicar fa…
Jun 6
DIY Robocars via Twitter
RT @f1tenth: Trying out some nasty blocking maneuvers 🏎️🤖 #f1tenth #autonomousracing https://t.co/nMTstsaogM
Jun 5
DIY Robocars via Twitter
May 27
DIY Robocars via Twitter
RT @araffin2: I will talk this Saturday from 18:00 to 19:00 Paris time for the @diyrobocars community about learning to race in hours using…
May 27
DIY Robocars via Twitter
RT @a1k0n: Luckily the infeasible hairpin problem was easily reproducible in simulation and I could test the fix before bringing the car ba…
May 26
More…