ROS Answers: Open Source Q&A Forum - RSS feedhttps://answers.ros.org/questions/Open source question and answer forum written in Python and DjangoenROS Answers is licensed under Creative Commons Attribution 3.0Sun, 22 May 2016 15:39:30 -0500amcl_pose echo results explanationhttps://answers.ros.org/question/231846/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? Wed, 13 Apr 2016 11:39:03 -0500https://answers.ros.org/question/231846/amcl_pose-echo-results-explanation/Answer by al-dev for <p>Hello, </p>
<p>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? </p>
<pre><code>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]
</code></pre>
<p>Thanks!</p>
<p><strong>EDIT:</strong> Why are X and Y for orientation equal to 0? </p>
https://answers.ros.org/question/231846/amcl_pose-echo-results-explanation/?answer=231858#post-id-231858The documentation of [geometry_msgs/PoseWithCovariance](http://docs.ros.org/api/geometry_msgs/html/msg/PoseWithCovariance.html) 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](http://answers.ros.org/question/138541/what-is-the-proper-way-to-obtain-the-fixed-axis-covariance-matrix-from-quaternions/) and the links therein.Wed, 13 Apr 2016 12:34:13 -0500https://answers.ros.org/question/231846/amcl_pose-echo-results-explanation/?answer=231858#post-id-231858Comment by murdock for <p>The documentation of <a href="http://docs.ros.org/api/geometry_msgs/html/msg/PoseWithCovariance.html">geometry_msgs/PoseWithCovariance</a> gives some explanation :</p>
<pre><code># 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
</code></pre>
<p>For the conversion from quaternions to fixed-axes, see <a href="http://answers.ros.org/question/138541/what-is-the-proper-way-to-obtain-the-fixed-axis-covariance-matrix-from-quaternions/">this question</a> and the links therein.</p>
https://answers.ros.org/question/231846/amcl_pose-echo-results-explanation/?comment=231907#post-id-231907I 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).Thu, 14 Apr 2016 07:18:45 -0500https://answers.ros.org/question/231846/amcl_pose-echo-results-explanation/?comment=231907#post-id-231907Comment by al-dev for <p>The documentation of <a href="http://docs.ros.org/api/geometry_msgs/html/msg/PoseWithCovariance.html">geometry_msgs/PoseWithCovariance</a> gives some explanation :</p>
<pre><code># 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
</code></pre>
<p>For the conversion from quaternions to fixed-axes, see <a href="http://answers.ros.org/question/138541/what-is-the-proper-way-to-obtain-the-fixed-axis-covariance-matrix-from-quaternions/">this question</a> and the links therein.</p>
https://answers.ros.org/question/231846/amcl_pose-echo-results-explanation/?comment=231951#post-id-231951`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.Thu, 14 Apr 2016 16:17:32 -0500https://answers.ros.org/question/231846/amcl_pose-echo-results-explanation/?comment=231951#post-id-231951Answer by pgigioli for <p>Hello, </p>
<p>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? </p>
<pre><code>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]
</code></pre>
<p>Thanks!</p>
<p><strong>EDIT:</strong> Why are X and Y for orientation equal to 0? </p>
https://answers.ros.org/question/231846/amcl_pose-echo-results-explanation/?answer=231859#post-id-231859Your 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](http://answers.ros.org/question/36848/covariance-matrix-for-the-posewithcovariance-in-odometrymsg/) post for more details. Wed, 13 Apr 2016 12:39:20 -0500https://answers.ros.org/question/231846/amcl_pose-echo-results-explanation/?answer=231859#post-id-231859Comment by murdock for <p>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 <a href="http://answers.ros.org/question/36848/covariance-matrix-for-the-posewithcovariance-in-odometrymsg/">this</a> post for more details. </p>
https://answers.ros.org/question/231846/amcl_pose-echo-results-explanation/?comment=234936#post-id-234936Thank you!Sun, 22 May 2016 15:39:30 -0500https://answers.ros.org/question/231846/amcl_pose-echo-results-explanation/?comment=234936#post-id-234936Comment by murdock for <p>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 <a href="http://answers.ros.org/question/36848/covariance-matrix-for-the-posewithcovariance-in-odometrymsg/">this</a> post for more details. </p>
https://answers.ros.org/question/231846/amcl_pose-echo-results-explanation/?comment=234894#post-id-234894Hey, do you know why X and Y for orientation are equal to 0?Sat, 21 May 2016 16:06:44 -0500https://answers.ros.org/question/231846/amcl_pose-echo-results-explanation/?comment=234894#post-id-234894Comment by spmaniato for <p>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 <a href="http://answers.ros.org/question/36848/covariance-matrix-for-the-posewithcovariance-in-odometrymsg/">this</a> post for more details. </p>
https://answers.ros.org/question/231846/amcl_pose-echo-results-explanation/?comment=234932#post-id-234932@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.Sun, 22 May 2016 14:51:54 -0500https://answers.ros.org/question/231846/amcl_pose-echo-results-explanation/?comment=234932#post-id-234932