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

Misplaced param init in admittance_controller #547

Merged
merged 4 commits into from
Apr 5, 2023

Conversation

guihomework
Copy link
Contributor

admittance_controller was initializing the ParamListener twice in on_init and on_configure. This should not be required.
However, without this, the test failed. The test was calling on_configure when on_init failed (due to a missing param). Now the test ensures on_init fails, and if it does not (because all its params are available), then calls on_configure (which might require other params, as will be the case for future pluginlib-based filter loading).

Copy link
Member

@destogl destogl left a comment

Choose a reason for hiding this comment

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

I think that the test should be adjusted into two tests. I am not sure if this can actually happen, what we are testing.

admittance_controller/test/test_admittance_controller.cpp Outdated Show resolved Hide resolved
@bmagyar
Copy link
Member

bmagyar commented Mar 31, 2023

@guihomework any updates on this sir?

@guihomework
Copy link
Contributor Author

Almost certain I can rework on this on the 3rd of April. Maybe earlier if I find a few minutes. Now still away from office.

@codecov-commenter
Copy link

codecov-commenter commented Apr 3, 2023

Codecov Report

Merging #547 (65fbcf9) into master (e7f9962) will decrease coverage by 3.31%.
The diff coverage is 26.60%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master     #547      +/-   ##
==========================================
- Coverage   35.78%   32.48%   -3.31%     
==========================================
  Files         189        7     -182     
  Lines       17570      665   -16905     
  Branches    11592      357   -11235     
==========================================
- Hits         6287      216    -6071     
+ Misses        994      157     -837     
+ Partials    10289      292    -9997     
Flag Coverage Δ
unittests 32.48% <26.60%> (-3.31%) ⬇️

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

Impacted Files Coverage Δ
...ontroller/test/test_load_diff_drive_controller.cpp 12.50% <0.00%> (ø)
diff_drive_controller/src/odometry.cpp 42.16% <11.11%> (ø)
diff_drive_controller/src/speed_limiter.cpp 46.55% <11.11%> (ø)
...ive_controller/test/test_diff_drive_controller.cpp 17.62% <12.08%> (ø)
...troller/include/diff_drive_controller/odometry.hpp 20.00% <20.00%> (ø)
...iff_drive_controller/src/diff_drive_controller.cpp 39.22% <35.50%> (ø)
...de/diff_drive_controller/diff_drive_controller.hpp 100.00% <100.00%> (ø)

... and 189 files with indirect coverage changes

destogl and others added 4 commits April 4, 2023 19:05
on_configure should not be called if on_init failed
but on_configure might fail for (future) parameter declaration
happening there, so should still be tested against missing parameters
on_configure should not be called if on_init failed.
Currently tested missing params all fail at on_init, so no need to test
on_configure.
@destogl destogl enabled auto-merge (squash) April 5, 2023 13:17
@bmagyar bmagyar disabled auto-merge April 5, 2023 13:40
@bmagyar bmagyar merged commit 0ef3c1b into ros-controls:master Apr 5, 2023
10 of 13 checks passed
christophfroehlich pushed a commit to christophfroehlich/ros2_controllers that referenced this pull request Apr 11, 2023
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.

None yet

4 participants