Increase IMU datarate - Pixhawk/APM/ MAVros ?

574 views
Skip to first unread message

tlde...@ucsc.edu

unread,
Jul 15, 2016, 10:32:53 PM7/15/16
to drones-discuss
I'm running APM ArduCopter on a Pixhawk, using 915MHz telemetry to communicate from my ground station to the quad. I'm running ROS (MAVROS) and when I call 'rostopic echo hz' after launching, I can see that I'm only receiving telemetry at an average rate of 2.5Hz. Is this reported rate the actual speed that messages are being received?

I've been wading through the Mavlink and ArduCopter firmware to try to understand why this might be the case. I'm specifically concerned that if I try to write code to run on my ground computer (autonomy of some sort), the IMU data being collected by the Pixhawk isn't making it to the GCS fast enough to run a control loop at a reasonable speed. Ideally I'd like to speed up the IMU/attitude datarate, but it would also be helpful to know if this is impossible and I should just get an onboard computer to process via a hardware connection.

I see that the scheduler (in ArduCopter.cpp) is set up to grab AHRS IMU at 400Hz and to call gcs_data_stream_send() every 50Hz. gcs_data_stream_send() eventually calls send_message on MSG_RAW_IMU1/2/3 and MSG_ATTITUDE if stream_trigger() returns true (in /libraries/GCS_MAVLink/GCS_Common.cpp). It's unclear to me what results in stream_trigger() returning true - if the entire stream is sent message by message (if this is an accurate understanding of how the stream is set up) every 50Hz, can I know how often each message is actually sent? Is it possible to increase the rate? Will upping the baudrate make a difference/ be possible?

Any advice/understanding gleaned appreciated
- Trieste

Tom Pittenger

unread,
Jul 15, 2016, 10:39:23 PM7/15/16
to drones-discuss
Take a look at the stream rate params. SR1_xxxx is for telem 1, SR2_xxx is for telem2 and so on. MSG_ATTITUDE is in the Extra1 group.

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages