Ask Your Question
1

amcl_pose echo results explanation

asked 2016-04-13 11:39:03 -0500

murdock gravatar image

updated 2016-05-21 15:57:27 -0500

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 flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2016-04-13 12:34:13 -0500

al-dev gravatar image

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:
# (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis)
float64[36] covariance

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

edit flag offensive delete link more

Comments

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).

murdock gravatar imagemurdock ( 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.

al-dev gravatar imageal-dev ( 2016-04-14 16:17:32 -0500 )edit
1

answered 2016-04-13 12:39:20 -0500

pgigioli gravatar image

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.

edit flag offensive delete link more

Comments

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

murdock gravatar imagemurdock ( 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.

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

Thank you!

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2016-04-13 11:39:03 -0500

Seen: 978 times

Last updated: May 21 '16