Hello Community, I am currently trying hard to get high-rate IMU data from the pixhawk via MAVLINK and I am struggeling with the following problems. I hope that some can help me.
In the following I will distinct between the different firmwares I tried, so I
hope it can point out more exactly what my problems are.
_Pixhawk with ArduRover Firmware 2.45_
How did I install the firmware?
a) APM Planner 2 -> Initial Setup -> install firmware (works)
b) building and flashing "by hand" like described in:
After flashing the firmware, Mavlink Inspector reports the following
In this firmware, it is possible to set the MAVLINK Data stream
(especially gyro, accelerometer and magnetometer) rates to 25 Hz with
pyMavlink using the following command my python code:
mavutil.mavlink.MAV_DATA_STREAM_ALL, rate, 1)/
So far, so good, but here are my two mainproblems with this firmware:
1) It doesnt matter which value > 25 I set for the parameter "rate", 25
Hz seems to be the maximum. Since I read on the internet, that it is
possible to get up to 500 Hz, I would like to know how I can achieve
that. It doesnt even have to be the full 500Hz. 25 Hz would be a nice
start for our projekt, but e.g. 50 Hz would be better.
Question*: Is there a way to change the data rates in the source code of
the firmware? If there is, where do I have to look and which values do I
have to change?
2) Sensors are uncalibrated (e.g. accelerometer reports ~ -11m/s² for
gravity) and it is not possible to perform the sensor calibration,
neither with APM Planner 2 nor with QGroundControl (nothing happens when
pressing the buttons in the GUI).
Question*: Is there a way to set the calibration offsets by hand in the
source code of the firmware? If there is, where do I have to look and
which values do I have to change?
_Pixhawk with Firmware provided by QGroundControl 2.0.1 for__pixhawk _
How did I install the firmware?
Config -> Scan -> Upgrade to latest stable Firmware (works)
Mavlink Inspector reports the following available MAVLINK-Messages:
With this firmware, I can perform the sensors calibration in
QGroundControl, and sensor data is pretty accurate after.
problems with this firmware:
1) Only 5 Mavlink Messages are provided, especially there is only one
IMU message left (HIGHRES_IMU). This message comes at 10Hz and thats far
*Question: *Is there a way to enable the other messages?
2) In this firmware, it is *not *possible to set the MAVLINK Data stream
rates via the command described above.
Question: *How can I manipulate the data stream rates in this firmware?
3) I found a tutorial to retrieve the data directly via a second serial
I tried to follow the tutorial, but I could not manage to get it
working. I even tried to use a custom start script by placing
/etc/rc.txt on the SD card, but with no success.
*Question:* From my point of view it seems to be possible to configure
every app that is running on the pixhawk via rc-scripts. Is there a
documentation available, which app is configured where? I am especially
interested in the configuration of the mavlink app, because that would
probably solve problems 1) and 2).
3) At last, the virtual HUD doesnt respond to movement of the pixhawk,
allthough the VFR_HUD message is provided (at least I think that this
message is needed for it). QGroundControl and APM Planner 2 are both
affected. I think its a bug in the software, but this is not really
important to me, I just felt like to report it.
I am very sorry for the long post and for the inconvenience it may
cause. I tried to explain as exaclty as possible and I hope that you can
I was using this code here https://github.com/mavlink/c_uart_interface_example
and in mission planner I made SR0_PARAMS value larger
This allowed me to get sensor data at ~25Hz. I would also like a much quicker data rate over USB/uart/anything. So any tips would be appreciated.
Hi Steve, i finally found a solution.
I followed these steps and made it work today:
1) connect pixhawk via usb to your system (on my system its /dev/ttyACM0)
2) create a 2nd connection (ftdi) to serial4/5 of the pixhawk as described here: https://pixhawk.org/dev/wiring
3) login to nutshell via the usb connection (i used "screen") : screen /dev/ttyACM0 57600 8N1
4) start the mavlink streaming for serial4/5 (which is ttys5 internally) at max baud rate :
mavlink start -d /dev/ttys5 -b 921600 -x
5) set desired stream data rate, i was interestet in HIGHRES_IMU:
mavlink stream -d /dev/ttyS5 -s HIGHRES_IMU -r 200
6) i used mavros to establish the serial connection to /dev/ttyUSB0 (ftdi) and got 163 hz out of the IMU
Hi, I want to know what's your fireware? is it ardupilot? I found I can only get the Alititude message and heart.