Home        Store        Docs        Blog

Mavgen.py to translate, but how?


(Kenneth) #1

I am trying to connect to the Pixhawk from the Raspberry Pi, but when i use the command:

sudo -s
mavproxy.py --master=/dev/ttyACM0 --aircraft plane

Then i get a lot of random characters as shown in the picture. I read that you had to use the mavgen.py to use the data of random characters, but how do I do that?


(Patrick José Pereira) #2

You are receiving this random characters because a second process is using the serial port, probably is the companion mavproxy that creates a bridge between /dev/ACM0 to udp:192.168.2.1:14550 for QGC.

If you want to get information from the mavlink protocol, you can use the QGC .tlog files, usually they are in Documents/QGroundControl/Telemetry.
An example of how to use the .tlog files to get an accessible information:

mavlogdump.py 2018-01-02\ 22-48-02.tlog --format csv --types ATTITUDE 

For any further questions check the mavproxy and pymavlink gitter channels.


Read, export and understand Telemetry data: COMPASS degree?
(Kenneth) #3

It is because we want to be able to write commands to the blueROV2 from the command line i raspberry Pi and then write our own controller for the ROV.


(Patrick José Pereira) #4

You can search in our forum a series of related questions about this.

and many others :wink:

Try to search in our forum, probably you’ll be able to find your answer and a lot of interesting information !


(Kenneth) #5

To test it out, i tried this code: Sending MAVProxy messages from a python program?

I saved the file on the Raspberry and run it with the python command, but we get this error.


(Jacob) #6

The error is telling you what the problem is.

This program is designed to run on the surface computer. The ip address that it connects to is not the same as the ip on the Pi, that is the problem.

You need to change it to mavutil.mavlink_connection('/dev/serial/by-id/usb-3D_Robotics_PX4_FMU_v2.x_0-if00'). Remember that you need to disable the existing process that is talking to the pixhawk: screen -XS mavproxy quit.