Skip to content
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

Odometry readjustement #28

Merged
merged 25 commits into from
Feb 7, 2021
Merged

Odometry readjustement #28

merged 25 commits into from
Feb 7, 2021

Conversation

PhileasL
Copy link
Member

@PhileasL PhileasL commented Feb 7, 2021

Idea

The idea is to give to drive the real position of the robot at a given stamp. The goal for drive is to set odom_pose_ with this information.

Problem:

The position given is obviously from the past.

Solution:

  • Store the last 30 transforms from odom to base_link,
  • Retrieve the nearest stored tf from the given TransformStamped (tf_stamped_msg),
  • Getting tf_stamped_msg relative to odom,
  • Getting the last position of base_link relative to the nearest stored tf retrieve previously,
  • Getting the new position of base_link relative to odom which is corrected,
  • Finally set the new odom_pose_ with the new position of base_link.

Observations

The goal of this method isn't to perfectly re-adjust the odometry, but to reduce the error of the odometry between the last re-adjustment and the nearest stored tf from the stamp of the given TransformStamped.
This can re-adjust odometry up to 0.75s from the past.

The idea is to re-adjust odometry considering the stamp of the adjust 
odometry tf given in the callback
In fact there is a little error at each stage that amplifies slowly, but 
we can get rid of it by manipulating troncated double. A precision of 
about a millimeter is still remaining which is acceptable.
@PhileasL PhileasL requested a review from a team February 7, 2021 19:50
@@ -10,6 +10,7 @@
#include <webots/PositionSensor.hpp>
#endif
#include "std_srvs/srv/set_bool.hpp"
#include "std_srvs/srv/trigger.hpp"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, i forget to remove that

Copy link
Member

@3wnbr1 3wnbr1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Well done 👍

@PhileasL PhileasL merged commit a4cc383 into master Feb 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants