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.0Thu, 28 Jun 2018 12:03:41 -0500are the turtlebot covariance matrices right?https://answers.ros.org/question/106061/are-the-turtlebot-covariance-matrices-right/I am settting up covariance matrices and don't understand some of the entries used for turtlebot.
from:
/opt/ros/groovy/stacks/turtlebot_create/create_node/src/create_node/covariances.py
first, we have :
> ODOM_POSE_COVARIANCE = [1e-3, 0, 0, 0, 0, 0,
> 0, 1e-3, 0, 0, 0, 0,
> 0, 0, 1e6, 0, 0, 0,
> 0, 0, 0, 1e6, 0, 0,
> 0, 0, 0, 0, 1e6, 0,
> 0, 0, 0, 0, 0, 1e3]
Why is the covariance on z axis (last row) rotation = 1e3? This is large considering the gyro accuracy. Seems like it should be more like 1e-3.
next, we have the covariance used when the robot is stopped, so we know some parameters much more accurately:
ODOM_POSE_COVARIANCE2 = [1e-9, 0, 0, 0, 0, 0,
0, 1e-3, 1e-9, 0, 0, 0,
0, 0, 1e6, 0, 0, 0,
0, 0, 0, 1e6, 0, 0,
0, 0, 0, 0, 1e6, 0,
0, 0, 0, 0, 0, 1e-9]
I don't understand the entries here for covariance y (second row). Seems like the diagonal entry should be the same as x (1e-9 instead of 1e-3) and I don't understand why there is an off-diagonal nonzero (but close, at 1e-9) entry for y-z. Are those axes coupled somehow?
Next, we have the twist ones:
ODOM_TWIST_COVARIANCE = [1e-3, 0, 0, 0, 0, 0,
0, 1e-3, 0, 0, 0, 0,
0, 0, 1e6, 0, 0, 0,
0, 0, 0, 1e6, 0, 0,
0, 0, 0, 0, 1e6, 0,
0, 0, 0, 0, 0, 1e3]
Since odom twist is reported in the child (robot, typically base_footprint) frame, for a turtlebot, there is no y or z velocity, only x. So why does the y velocity covariance (second row) = 1e-3 instead of 1e6? And again, why is the z rotation (last row) covariance (1e3) so large?
Finally, for twist when stopped:
ODOM_TWIST_COVARIANCE2 = [1e-9, 0, 0, 0, 0, 0,
0, 1e-3, 1e-9, 0, 0, 0,
0, 0, 1e6, 0, 0, 0,
0, 0, 0, 1e6, 0, 0,
0, 0, 0, 0, 1e6, 0,
0, 0, 0, 0, 0, 1e-9]
Again, I don't understand why the y twist covariance (2nd row) is 1e-3 instead of 1e6 and also why there is an off-diagonal entry (1e-9) y-z coupling instead of just 0 there.
Sat, 30 Nov 2013 12:06:47 -0600https://answers.ros.org/question/106061/are-the-turtlebot-covariance-matrices-right/Answer by Mark Rose for <p>I am settting up covariance matrices and don't understand some of the entries used for turtlebot.
from:
/opt/ros/groovy/stacks/turtlebot_create/create_node/src/create_node/covariances.py</p>
<p>first, we have :</p>
<pre><code>> ODOM_POSE_COVARIANCE = [1e-3, 0, 0, 0, 0, 0,
> 0, 1e-3, 0, 0, 0, 0,
> 0, 0, 1e6, 0, 0, 0,
> 0, 0, 0, 1e6, 0, 0,
> 0, 0, 0, 0, 1e6, 0,
> 0, 0, 0, 0, 0, 1e3]
</code></pre>
<p>Why is the covariance on z axis (last row) rotation = 1e3? This is large considering the gyro accuracy. Seems like it should be more like 1e-3.</p>
<p>next, we have the covariance used when the robot is stopped, so we know some parameters much more accurately:</p>
<pre><code>ODOM_POSE_COVARIANCE2 = [1e-9, 0, 0, 0, 0, 0,
0, 1e-3, 1e-9, 0, 0, 0,
0, 0, 1e6, 0, 0, 0,
0, 0, 0, 1e6, 0, 0,
0, 0, 0, 0, 1e6, 0,
0, 0, 0, 0, 0, 1e-9]
</code></pre>
<p>I don't understand the entries here for covariance y (second row). Seems like the diagonal entry should be the same as x (1e-9 instead of 1e-3) and I don't understand why there is an off-diagonal nonzero (but close, at 1e-9) entry for y-z. Are those axes coupled somehow?</p>
<p>Next, we have the twist ones:</p>
<pre><code>ODOM_TWIST_COVARIANCE = [1e-3, 0, 0, 0, 0, 0,
0, 1e-3, 0, 0, 0, 0,
0, 0, 1e6, 0, 0, 0,
0, 0, 0, 1e6, 0, 0,
0, 0, 0, 0, 1e6, 0,
0, 0, 0, 0, 0, 1e3]
</code></pre>
<p>Since odom twist is reported in the child (robot, typically base_footprint) frame, for a turtlebot, there is no y or z velocity, only x. So why does the y velocity covariance (second row) = 1e-3 instead of 1e6? And again, why is the z rotation (last row) covariance (1e3) so large?</p>
<p>Finally, for twist when stopped:</p>
<pre><code>ODOM_TWIST_COVARIANCE2 = [1e-9, 0, 0, 0, 0, 0,
0, 1e-3, 1e-9, 0, 0, 0,
0, 0, 1e6, 0, 0, 0,
0, 0, 0, 1e6, 0, 0,
0, 0, 0, 0, 1e6, 0,
0, 0, 0, 0, 0, 1e-9]
</code></pre>
<p>Again, I don't understand why the y twist covariance (2nd row) is 1e-3 instead of 1e6 and also why there is an off-diagonal entry (1e-9) y-z coupling instead of just 0 there.</p>
https://answers.ros.org/question/106061/are-the-turtlebot-covariance-matrices-right/?answer=295644#post-id-295644Hmmm... I don't know enough about the Turtlebot to know whether those variances make sense, but last matrix is definitely screwy for two reasons:
1. The matrix should be symmetric (A = A'): if there is an upper-diagonal, non-zero value, it should have an equal counterpart in the lower diagonal.
2. It seems strange that the Y variance – the diagonal entries are variances, not covariances – would be larger than the X variance when turning in place.
My guess is that the `ODOM_TWIST_COVARANCE2` matrix is corrupted, and the Y variance should be 1e-9 to match the X variance, with no non-zero, off-diagonal entries.Thu, 28 Jun 2018 12:03:41 -0500https://answers.ros.org/question/106061/are-the-turtlebot-covariance-matrices-right/?answer=295644#post-id-295644