-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add custom window size and poly order for SG filter #5489
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
Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
Codecov Report❌ Patch coverage is
... and 6 files with indirect coverage changes 🚀 New features to boost your workflow:
|
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.
It generally looks good to me. Did you verify the output of the coefficients for a few examples of input order and window size & make sure that the changes are outputting the same values?
| calculateCoefficients(); | ||
| } | ||
|
|
||
| void SavitzkyGolaySmoother::calculateCoefficients() |
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.
A citation for this equation would be good so I can validate against that & for future readers
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.
Is citing a blog possible? I think this blog https://www.colmryan.org/posts/savitsky_golay/ explains my approach here
I also added some comments in the latest commit
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.
Yeah, that's OK! Just something someone can later look at and reason about why this was done the way it is in case they think its incorrect or want to learn
I did. For example, in the original code we have window_size 7 and polynomial order of 3 navigation2/nav2_smoother/src/savitzky_golay_smoother.cpp Lines 107 to 114 in 2b8cc4d
I threw a log in my code Another example is mppi's sg filter, we have window size 9 and an order of 2 navigation2/nav2_mppi_controller/include/nav2_mppi_controller/tools/utils.hpp Lines 516 to 519 in 2b8cc4d
I think they are identical |
Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
|
LGTM - just add that blog link please! |
) * Add custom window size and poly order in SG filter Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Fix linting and benchmark tool Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Cmakelist Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Adding comments Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Add blog Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> --------- Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
) * Add custom window size and poly order in SG filter Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Fix linting and benchmark tool Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Cmakelist Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Adding comments Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Add blog Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> --------- Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
) * Add custom window size and poly order in SG filter Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Fix linting and benchmark tool Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Cmakelist Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Adding comments Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Add blog Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> --------- Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> Signed-off-by: Abhishekh Reddy <helloarm@pm.me>
) * Add custom window size and poly order in SG filter Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Fix linting and benchmark tool Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Cmakelist Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Adding comments Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Add blog Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> --------- Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
) * Add custom window size and poly order in SG filter Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Fix linting and benchmark tool Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Cmakelist Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Adding comments Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Add blog Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> --------- Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
Basic Info
Description of contribution in a few bullet points
Description of documentation updates required from your changes
Description of how this change was tested
Tested in real world + sim + benchmark
Future work that may be required in bullet points
For Maintainers:
backport-*.