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

Time independet ema for path planning smoothing #444

Merged
merged 8 commits into from May 16, 2024

Conversation

Flova
Copy link
Member

@Flova Flova commented May 6, 2024

Summary

Currently, the path planning exponential smoothing is dependent on the update frequency of the path planning. But this can be formulated in a time independent discrete way by using the time constant tau (see https://en.wikipedia.org/wiki/Exponential_smoothing#Time_constant). It described the amount of time a unit impulse takes to decay to 1 - 1/e which is roughly 63%. Using this, we can calculate a smoothing factor alpha for arbitrary time deltas instead of using a fixed one. This accounts for changed rates as well as fluctuations in the timers rate.

Here you can see two impulse responses with different discretization, but same tau (= 0.39):
image

Note: k and alpha are used as synonyms here for legacy reasons.

Proposed changes

  • Fix typo
  • Add flexible time delta
  • Use tau instead of k/alpha
  • Use ROS 1 parameter value for smoothing. ROS 1 used a slower update frequency for the controller, but with this we can translate the smoothing parameter to the new 20Hz update rate (we need to check that on the real robot!)

Checklist

  • Run colcon build
  • Write documentation
  • Test on your machine
  • Test on the robot
  • Create issues for future work
  • Triage this PR and label it

Idea: We can add this also to the IMU filter!

Copy link
Member

@SammyRamone SammyRamone left a comment

Choose a reason for hiding this comment

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

lgtm

@Flova
Copy link
Member Author

Flova commented May 7, 2024

We did some parameter tuning, but further testing is required

@jaagut jaagut merged commit c999542 into main May 16, 2024
1 of 2 checks passed
@jaagut jaagut deleted the feature/time_independet_ema branch May 16, 2024 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request navigation
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants