-
Notifications
You must be signed in to change notification settings - Fork 333
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
test: ✅ improve speed of joint_trajectory_controller tests #464
Conversation
- make updateController not require sleeps
This pull request is in conflict. Could you fix it @jaron-l? |
Codecov Report
@@ Coverage Diff @@
## master #464 +/- ##
==========================================
- Coverage 35.78% 29.74% -6.04%
==========================================
Files 189 7 -182
Lines 17570 743 -16827
Branches 11592 428 -11164
==========================================
- Hits 6287 221 -6066
+ Misses 994 162 -832
+ Partials 10289 360 -9929
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Lookg good! Thanks!
joint_trajectory_controller/test/test_trajectory_controller_utils.hpp
Outdated
Show resolved
Hide resolved
This will likely need something like ros-controls/realtime_tools#73 as I believe the tests are failing now because the realtime loop fails at trylock. Will move to draft for now. |
This pull request is in conflict. Could you fix it @jaron-l? |
I'd say the update method was changed similarly with #858: But I made it updating with a fixed update rate instead of calling update() only twice as proposed here. The part with the wait_set might be an improvement, but currently there isn't any problem with the subscriber. I'll keep that in mind if any problem arises. |
Summary:
This PR mainly focuses on changing
joint_trajectory_controller/test/test_trajectory_controller_utils.hpp:updateController
to be synchronous for reliability which has the added benefit of making them run faster. On my system, this change brings thejoint_trajectory_controller
tests from 26.3s to 5.24s.Specific points of interest and requests for feedback:
joint_trajectory_controller/src/joint_trajectory_controller.cpp::publish_state
state_update_rate
parameter not rate limit when set to 0. This is a breaking change for that parameter if someone uses it to disable the controller. My argument for this change is that other controllers behave that way and that is a user wants to disable the controller, they can do that through the lifecycle functionality and not through the update rate limiter. This was done because it makes the tests easier to work with if you don't have to arbitrarily wait for the filter to allow updates.joint_trajectory_controller/test/test_trajectory_controller.cpp::TrajectoryControllertestParameterized.zero_state_publish_rate
joint_trajectory_controller/test/test_trajectory_controller.cpp::TrajectoryControllertestParameterized.test_state_publish_rate
Additional notes: