0% found this document useful (0 votes)
22 views3 pages

Mavros IMU Data Integration Guide

Mavros receives IMU sensor data messages from ArduPilot including accelerometer, gyroscope, and compass data and publishes it to ROS topics. This data includes linear acceleration and angular velocity on /mavros/imu/data and /mavros/imu/data_raw and compass data on /mavros/imu/mag. Mavros can also be used to change the data transmission rate between ArduPilot and ROS.

Uploaded by

Nisse
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views3 pages

Mavros IMU Data Integration Guide

Mavros receives IMU sensor data messages from ArduPilot including accelerometer, gyroscope, and compass data and publishes it to ROS topics. This data includes linear acceleration and angular velocity on /mavros/imu/data and /mavros/imu/data_raw and compass data on /mavros/imu/mag. Mavros can also be used to change the data transmission rate between ArduPilot and ROS.

Uploaded by

Nisse
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Data from AP to ROS

Mavros consumes MAVLink sensor data messages from ArduPilot and places the data within the
/mavros/ topic

IMU data
ArduPilot sends accelerometer, gyro and compass (aka “mag”) data to ROS/mavros using MAVLink’s
RAW_IMU message.

mavros consumes this data and places it within the following topics:

• /mavros/imu/data and /mavros/imu/data_raw hold the accelerometer (called


“linear_accelera!on”) and gyro (called “angular_velocity) data
• /mavros/imu/mag holds the compass data. This may be all zero if AP’s COMPASS_USE
parameters have been set to zero

Checking and setting the data rate


Run the following command to view the accelerometer and gyro data and update rate on the
companion computer running ROS

rostopic echo /mavros/imu/data <-- to see the data itself


rostopic hz /mavros/imu/data <-- to view the update rate

mavros can be used to send a command to ArduPilot to change the rate of the data as shown
below

rosrun mavros mavsys rate --all 10 <-- to set the data rate for all data to 10hz
rosrun mavros mavsys rate --extra1 10 <-- to set the data rate for IMU_RAW to 10hz
rosrun mavros mavsys rate --help <-- to see help on this command

From within ArduPilot the default update rate of the IMU data sent to ROS/mavros can be set by
changing the SRx_EXTRA1 parameter (where “x” is normally the serial port number on the flight
controller)

! Warning

Users of APSync may no!ce that APWeb resets the data stream rates to 4hz every 10 seconds.
This is a known issue that can be worked around by edi!ng the /etc/[Link] file and
commen!ng out the line that starts APWeb.

! Note

If you no!ce AP is sending data at a higher rate than requested it may be because of this issue

You might also like