pymavlink usage on Raspberry Pi

Dear all,

I was hoping someone with some experience with pymavlink could help me out.

I currently have a Raspberry Pi connected to my Pixhawk via the telem2 port and have developed an image processing program to track a target. So far, I am able to use MAVPorxy to connect to the Pixhawk via the command-line and send commands like arm, set params etc. but I can't seem to set up a connection within my python script using pymavlink (The goal is to override channel 4 to provide lateral tracking).

I think it may be something to do with how I have installed pymavlink. I simply cloned the repository to my home directory and ran "sudo setup.py install". Any light that could be shed would be great.

Thanks.

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

Join diydrones

Email me when people reply –

Replies

            • Developer

              "Better Quality" refers to the quality of the explanation within the article about boards effected (RPi2 only) rather that the low quality FUD comment made by you "watch out for those RPis".

              The original article you linked makes claims about the quality of the RPi2 construction. Which is probably not justified, and the more reasonable explanation, as expressed in the guardian article is

              "The components, chips and resistors of the Raspberry Pi are exposed, part of its DIY aesthetic. It seems that the chip with a weakness for flashing is the tiny U16 chip, part of the power supply circuit"

              I assume you have done extensive Xenon Tube flash testing on the ErleBrain. The two baros inside are very sensitive to light. Are you sure your case gives adequate protection for all possible bright light sources entering the case. How did you prove this? 

              If I buy Pixhawk Cape and not case, and the bar are effected by light, do I call the question of the quality of your product into question? Since sunlight will have an adverse effect.

              I only replied to your comment, as I don't like FUD, just keep to the facts. They discovered the RPi2 as a light sensitivity issue on the PSU, please apply simple fix. (And black non-conductive foam on the PXF baros) ;)

  • from pymavlink import mavutil

    conn=mavutil.mavlink_connection(device="udp:127.0.0.1:14550",baud=57600,autoreconnect=True)
    conn.wait_heartbeat()

    From here you can conn.set_mode_auto, etc.

    If you can figure out how to go into GUIDED (or Fly Here) mode, I'd be grateful.

    You should set the IP to the host machine's

    Also, you may need to set an "output add" line from your MAVProxy to your Pi.

    • Not yet, but I found some code that should help me figure it out. I will keep you posted.
    • Did you ever figure out the guided mode?

  • I am doing a similar project. 

    Did you ever figure this out?

    • What are you working on?  I'm trying to make an ATC to make drones reporting in avoid collisions with each other.

      • Interesting project. I am working on a holistic Search and Rescue system for my senior design project. It will be able to compute near optimal paths and report detection results with an on-board computer. 

        More details in my website and Design Document. 

        Website: www.talha-robotics.tk

        Design Document: https://drive.google.com/file/d/0B4O1v0N62OKwdUhpdkVQdGJmVVU/view

        Talha Agcayazi
        Talha Agcayazi
        • I looked at your website.  Nice.  Correct the typo though. ("I my free time")

          I will read your design doc in more depth, so please expect more feedback later.

          For right now, please let me share my prototype:

          http://droneatc.ca

          It can coordinate multiple simulated drones.  I don't dare hook it up to anything real yet.

          I am looking at how to improve it with better ORCA-style collision avoidance.
          I found an academic paper here.
          https://mirror.umd.edu/roswiki/attachments/multi_robot_collision_av...

          If I take a getting back to you on your design doc, it's because I started that first, and it's pretty heady.  ;)

          If you want a proper demo of the site (because I don't often leave the simulators going 24-7) just drop me a message. 

This reply was deleted.

Activity