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

Use average dt values for velocity calculation #60

Merged
merged 1 commit into from
Apr 19, 2021
Merged

Use average dt values for velocity calculation #60

merged 1 commit into from
Apr 19, 2021

Conversation

tim-fan
Copy link
Contributor

@tim-fan tim-fan commented Feb 23, 2021

Fixes #36

Tested on my Create2, running Ubuntu 18.04 on a Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz (Intel NUC).

The underlying issue appears to be that dt values between onData calls do not accurately represent the dt values at which the encoders are sampled. It appears that averaging the onData dt values yields more accurate results.

@jacobperron jacobperron self-requested a review February 23, 2021 00:50
Copy link
Member

@jacobperron jacobperron left a comment

Choose a reason for hiding this comment

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

I tried it out on a Create 1. Before this change, I did observe spikes in the velocity from odometry, but with this change the spike are gone and velocity looks reasonable to me.

Thanks for the patch!

@jacobperron jacobperron merged commit 20ed0b1 into AutonomyLab:master Apr 19, 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.

Odometry velocity too large
2 participants