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