Add custom window size and poly order for SG filter#5489
Add custom window size and poly order for SG filter#5489SteveMacenski merged 5 commits intoros-navigation:mainfrom
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:
|
SteveMacenski
left a comment
There was a problem hiding this comment.
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.
A citation for this equation would be good so I can validate against that & for future readers
There was a problem hiding this comment.
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.
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-*.