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

# amcl_pose echo results explanation

Hello,

I have amcl_pose running. After I echoed it, this is what I see. I can see that covariance consists of 36 values, so I guess it is a 6x6 matrix, however position + orientation have 7 different values. What am I misunderstanding here? How do I interpret this?

header:
seq: 81
stamp:
secs: 1839
nsecs: 212000000
frame_id: map

pose:
pose:

position:
x: -7.76006046064
y: -1.15741912051
z: 0.0
orientation:
x: 0.0
y: 0.0
z: 0.841545398193
w: 0.540186396331

covariance: [0.0026612296465486907, -0.0006793180004436294, 0.0, 0.0, 0.0, 0.0, -0.0006793180004454058, 0.003341409476325552, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0012125460173182706]


Thanks!

EDIT: Why are X and Y for orientation equal to 0?

edit retag close merge delete

Sort by ยป oldest newest most voted

The documentation of geometry_msgs/PoseWithCovariance gives some explanation :

# Row-major representation of the 6x6 covariance matrix
# The orientation parameters use a fixed-axis representation.
# In order, the parameters are:
float64[36] covariance


For the conversion from quaternions to fixed-axes, see this question and the links therein.

more

I thought that first (0.0026612296465486907) variable was covariance value of x axis, so if I used sqrt on it, result would be 0.0515, which shows how much robot is certain about its current position (which is ~5cm).

( 2016-04-14 07:18:45 -0500 )edit

covariance[0][0] should be the variance of the linear position x and its square root is the standard deviation, if that is what you are asking.

( 2016-04-14 16:17:32 -0500 )edit

Your orientation is given in quaternion coordinates which has 4 values. The covariance matrix is based on the 3 euler angles roll, pitch, yaw. You can convert between the two coordinate systems. See this post for more details.

more

Hey, do you know why X and Y for orientation are equal to 0?

( 2016-05-21 16:06:44 -0500 )edit
3

@murdock Because mobile robots navigating in a flat 2D workspace do not rotate about the X and Y axis (roll and pitch). They only rotate about the Z axis (yaw). If you convert the quaternion to Euler angles like the answer suggests you'll see that more clearly.

( 2016-05-22 14:51:54 -0500 )edit

Thank you!

( 2016-05-22 15:39:30 -0500 )edit