I want high frequency(around 20Hz) IMU data from pixhawk for my application.
This is all that I have tried
I tried with wireless telemetry radios first but I knew those are not reliable as there is high packet loss.
I tried getting data using Rpi using dronekit library. I increased the baudrate for serial connection to 115200. For message RAW_IMU & SCALED_IMU I changed parameter SR1_RAW_SENS. I tested it with dronekit example create_attribute.py but the frequency seems to be constant at 4Hz no matter what I set SR1_RAW_SENS. I used to set SR1_RAW_SENS using mavproxy & then run my example.
Next thing I tried was downloading dataflash logs by directly connecting to pixhawk using the USB cable as downloading through Mavlink was taking a lot of time. I used QGC to download as in Mission Planner I couldn’t find direct USB download option, only “Download via Mavlink” was available. But still, QGC can’t download most of them as it gives timeout error. The one which downloaded, I used MP to convert .bin to .log. In the log file, I saw that IMU data was being recorded at every 40ms which serves my purpose. But the problem was that the files downloaded have only around 3sec data, not at all useful & most of them are have only 0’s as entry, in fact some .bin files have only 0’s & nothing else. So I’m assuming dataflash logs are not being written properly.
I looked over the net but many of them have a solution like modifying firmware or taking out the SD card & then reading data.
My drone is a third party drone. I can access pixhawk serially or using a USB, but I can’t take out the pixhawk. Also, I can’t put another firmware inside it.
Ardupilot software version is Copter 3.4.6
Please suggest something.