ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

What do x, y, and z denote in mavros topic /mavros/imu/data_raw

asked 2015-11-02 23:57:27 -0600

pinocchio gravatar image

updated 2015-11-04 00:50:07 -0600

Akif gravatar image

hi, I am using mavros to read the signals from the APM2.5. However I am not sure what x, y, z denote.

For example, in angular_velocity, I think the signals should be pitch, roll, and yaw in rad. How do x, y, and z correspond to them. Also, in linear_acceleration, what is the coordinates for x, y, and z, and are they in meter? Many thanks.

$ rostopic type /mavros/imu/data_raw
$ rosmsg show sensor_msgs/Imu
std_msgs/Header header
  uint32 seq
  time stamp
  string frame_id
geometry_msgs/Quaternion orientation
  float64 x
  float64 y
  float64 z
  float64 w
float64[9] orientation_covariance
geometry_msgs/Vector3 angular_velocity
  float64 x
  float64 y
  float64 z
float64[9] angular_velocity_covariance
geometry_msgs/Vector3 linear_acceleration
  float64 x
  float64 y
  float64 z
float64[9] linear_acceleration_covariance
edit retag flag offensive close merge delete


Also, how can I know the frequency of the signals. Many thanks.

pinocchio gravatar image pinocchio  ( 2015-11-03 00:36:47 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-11-03 06:21:34 -0600

Akif gravatar image

updated 2015-11-03 06:22:37 -0600

In IMU message, x,y and z values under angular_velocity correspond to roll rate, pitch rate and yaw rate respectively. Because, roll is rotation around x axis, pitch is around y and yaw is around z. Angles are represented as quaternion under orientation . They are not Euler angles directly. You should convert them from Quaternion to Euler angles. Check Wikipedia for description about Quaternions: .

linear_acceleration values should be represented as m/s^2 unless otherwise stated. You should check REP-103 ( ) for dimension and coordinate standards in ROS.

For publish frequency of a topic you can use, rostopic hz /mavros/imu/data_raw

edit flag offensive delete link more


Hi @Akif, thanks for your answer. I am confused about the quaternion representation for angular_velocity. I mean if the angular_velocity are under quaternion, there should be four values, namely x, y, z, and w, similar to the representation of orientation. Any hints on it?

pinocchio gravatar image pinocchio  ( 2015-11-03 10:02:39 -0600 )edit

Only orientation is represented as quaternion, angular velocity is not. Its message type is geometry_msgs/Vector3 and consists of x, y and z only.

Akif gravatar image Akif  ( 2015-11-03 10:32:37 -0600 )edit

Thx @Akif. That helps a lot.

pinocchio gravatar image pinocchio  ( 2015-11-03 16:12:10 -0600 )edit

@Akif, BTW, what is the output of a APM2.5 connected GPS. Is it a global NED position or a local position? Many thanks.

pinocchio gravatar image pinocchio  ( 2015-11-03 17:44:11 -0600 )edit

Question Tools

1 follower


Asked: 2015-11-02 23:57:27 -0600

Seen: 3,548 times

Last updated: Nov 03 '15