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

Renovate load controller tests #569

Merged
merged 7 commits into from
Apr 29, 2023

Conversation

bmagyar
Copy link
Member

@bmagyar bmagyar commented Apr 12, 2023

@codecov-commenter
Copy link

codecov-commenter commented Apr 12, 2023

Codecov Report

Merging #569 (16e73cf) into master (e7f9962) will decrease coverage by 3.36%.
The diff coverage is 26.44%.

📣 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     #569      +/-   ##
==========================================
- Coverage   35.78%   32.43%   -3.36%     
==========================================
  Files         189        7     -182     
  Lines       17570      666   -16904     
  Branches    11592      358   -11234     
==========================================
- Hits         6287      216    -6071     
+ Misses        994      157     -837     
+ Partials    10289      293    -9996     
Flag Coverage Δ
unittests 32.43% <26.44%> (-3.36%) ⬇️

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 11.11% <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

@bmagyar bmagyar changed the title Renove load controller tests Renovate load controller tests Apr 13, 2023
@bmagyar
Copy link
Member Author

bmagyar commented Apr 13, 2023

So what this test renovation uncovered is that the load admittance controller was never going to work with this setup or has been broken for quite a while.

  • A bunch of params that need to be set are not set in the config. It's funny that the config for the loading test even says # contains minimal parameters that need to be set to load controller :D
  • Once using the full test_admittance_controller config for the load test, things still fail as it is now missing the robot description. Is it really necessary to require all these things at load time ? I mean the robot description is an easy ask but grabbing parameters etc are meant to be in configure, not load.

@destogl
Copy link
Member

destogl commented Apr 13, 2023

Once using the full test_admittance_controller config for the load test, things still fail as it is now missing the robot description. Is it really necessary to require all these things at load time ?

Yes, yes and yes, we have caught this few weeks ago, and it should be solved herein #547.

Isn't it?

In #560 @guihomework was updating tests and afaik with fix from #547 things should be fine.

@destogl
Copy link
Member

destogl commented Apr 13, 2023

To clarify the process.

  1. Parameter structures are created in on_init.
  2. Parameters are read / updated in on_configure.

What here may be confusing (but I am not sure about it). generate_parameter_library is potentially expecting all parameters to be available when parameter object is created. I think that then all internal parameters checks are done. Maybe we have to fix this logic there and do parameters check when we update them.

@bmagyar
Copy link
Member Author

bmagyar commented Apr 13, 2023

#547 was merged a week ago and my branch is up to date. It did not fix the issue, maybe only the first part.

@bmagyar
Copy link
Member Author

bmagyar commented Apr 13, 2023 via email

@bmagyar bmagyar merged commit 4037719 into ros-controls:master Apr 29, 2023
@gwalck
Copy link
Contributor

gwalck commented May 16, 2023

To clarify the process.

1. Parameter structures are created in `on_init`.

2. Parameters are read / updated in `on_configure`.

What here may be confusing (but I am not sure about it). generate_parameter_library is potentially expecting all parameters to be available when parameter object is created. I think that then all internal parameters checks are done. Maybe we have to fix this logic there and do parameters check when we update them.

Hi, I am @guihomework with a new account. While working on a new controller generation using RosTeamWorkspace, I faced the issue of a controller not passing the renovated load test due to a mandatory parameter missing.

My opinion on the problem is that the previous ASSERT_NO_THROW did not catch the param loading issues, but it still asserted that the plugin was found and could be loaded, otherwise there is a throw (I just faced pluginlib not finding the lib due a badly set xml lib path). The missing param generates an exception that is caught in the on_init which then fails with a nullptr but does not throw.

I don't think the load test should require the minimum mandatory parameters and additionally succeed the on_init call, since the loading of the plugin is what we want to test there, and on_init is checked in a second test that has the mandatory parameters.

@christophfroehlich
Copy link
Contributor

@bmagyar should this be backported also to humble? #670 has conflicts because of this PR missing in humble.

@bmagyar
Copy link
Member Author

bmagyar commented Jun 17, 2023

let's try!

@bmagyar bmagyar added the backport-humble This label should be used by maintainers only! Label triggers PR backport to ROS2 humble. label Jun 17, 2023
@bmagyar
Copy link
Member Author

bmagyar commented Jun 17, 2023

@Mergifyio backport humble

mergify bot pushed a commit that referenced this pull request Jun 17, 2023
@mergify
Copy link
Contributor

mergify bot commented Jun 17, 2023

backport humble

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Jun 17, 2023
bmagyar added a commit that referenced this pull request Jun 17, 2023
(cherry picked from commit 4037719)

Co-authored-by: Bence Magyar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-humble This label should be used by maintainers only! Label triggers PR backport to ROS2 humble.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test_load_controller tests passing regardless of missing controller plugin
5 participants