-
Notifications
You must be signed in to change notification settings - Fork 3
Compute twist on publish #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ayrton04 This should be equivalent to the equations from https://github.com/clearpathrobotics/robot_localization/blob/indigo-devel/src/ekf.cpp#L209, but in SE(2) only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Hopefully I'll get around to adding a 2D version of the EKF anyway.
228b683 to
3f844af
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These look good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for confirming it.
|
I'm not an expert on the ros_controller package, but what I see looks correct! Nice work on the very thorough tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ayrton04 This one is actually wrong. I don't want to bias you... can you review it again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My unbiased correction:
J_twist << -cos_yaw * dt, sin_yaw * dt, 0.0,
-sin_yaw * dt, -cos_yaw * dt, 0.0,
0.0, 0.0, 1.0;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure?, I don't see why the sign changes.
The error I found is on the derivative wrt v_yaw, which should be dt instead of 1.0.
I've just updated the PR with that fix. I think the rest it's fine, indeed now the relevant tests are passing 😃
f7a0703 to
6d190f0
Compare
dc1b8a6 to
4c30982
Compare
6d190f0 to
088839f
Compare
This PR is on top of #22
This PR adds:
dtused to compute the twist from the difference between the msgs timestamps.P_1can be computed from the previous poseP_0, the current twistT_1and thedtobtained as the difference between the msgs timestamps, asP_1 = P_0 * T_1 / dt(which is the rigid motion equation in SE(2), in matrix form).P_1as reported in the odometry msg, can be retrieved using the pose covariance ofP_0and the twist covariance ofT_1, using the (analytical) Jacobian of the rigid motion equation shown before (implemented in element-wise form).@ayrton04 @servos @afakihcpr