control_toolbox icon indicating copy to clipboard operation
control_toolbox copied to clipboard

Add standalone version of LPF (#164)

Open roncapat opened this issue 1 year ago • 5 comments

Closes #164. Test passes locally.

The old LowPassFilter class is now LowPassFilterRos. API-breaking since with this patch LowPassFilter is a parent class without ROS parameters.

@christophfroehlich at least for now I wanted to reflect the same difference of Pid and PidROS. But we need to devise a different naming strategy, or this patch will break a lot of perfectly fine code (will require people to swap LowPassFilter with LowPassFilterRos in their projects).

roncapat avatar Mar 02 '24 20:03 roncapat

Codecov Report

Attention: Patch coverage is 67.34694% with 16 lines in your changes are missing coverage. Please review.

Project coverage is 50.38%. Comparing base (759d954) to head (e3fde82).

Additional details and impacted files
@@               Coverage Diff               @@
##           ros2-master     #192      +/-   ##
===============================================
+ Coverage        50.10%   50.38%   +0.28%     
===============================================
  Files               10       11       +1     
  Lines              497      518      +21     
  Branches           166      170       +4     
===============================================
+ Hits               249      261      +12     
- Misses             217      225       +8     
- Partials            31       32       +1     
Flag Coverage Δ
unittests 50.38% <67.34%> (+0.28%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
include/control_filters/low_pass_filter.hpp 80.43% <100.00%> (+5.05%) :arrow_up:
src/control_filters/low_pass_filter.cpp 100.00% <100.00%> (ø)
include/control_filters/low_pass_filter_ros.hpp 60.00% <60.00%> (ø)

codecov-commenter avatar Mar 02 '24 20:03 codecov-commenter

Sorry for the late reply. I see two options:

  • Use a consistent nomenclature and break API with Jazzy (we would have to branch this repo then)
  • Deprecate the old LowPassFilter with the hint to replace it with LowPassFilterRos and call the base filter LowPassFilterBase or similar. This could be then rewritten in a future release to converge back to the consistent nomenclature.

What do you think?

christophfroehlich avatar Apr 04 '24 19:04 christophfroehlich

Sorry for the late reply. I see two options:

  • Use a consistent nomenclature and break API with Jazzy (we would have to branch this repo then)
  • Deprecate the old LowPassFilter with the hint to replace it with LowPassFilterRos and call the base filter LowPassFilterBase or similar. This could be then rewritten in a future release to converge back to the consistent nomenclature.

What do you think?

Yeah I believe we should slowly make nomenclature consistent, I like better solution 2.

BTW, why are there no 'humble', 'iron', 'rolling' branches and so on in this repo?

roncapat avatar Apr 04 '24 20:04 roncapat

I will update the PR as soon as possible implementing what you proposed as option 2.

roncapat avatar Apr 04 '24 20:04 roncapat

BTW, why are there no 'humble', 'iron', 'rolling' branches and so on in this repo?

because the ros2-master branch is released to all distros, there was no need for branching yet

christophfroehlich avatar Apr 04 '24 20:04 christophfroehlich