Skip to content

Conversation

mathias31415
Copy link
Contributor

@mathias31415 mathias31415 commented Aug 13, 2025

This pull request supports PR #1858 . Shared functionality of the motion_primitives forward and from_trajectory controllers has been moved to a common base controller. To make reviewing easier, this first PR only extracts the functionality of the forward controller. In a subsequent PR, the from_trajectory controller will then be added.

This PR is marked as a draft because it depends on PR #1636 , which has not yet been merged.

mathias31415 and others added 30 commits April 8, 2025 14:35
…time --> added gitignore, to not push it to github --> remove it after everything is done
… the hardware interface can receive a new motion primitive — replaces the previous, more complex handling via execution_status
…ls according to other controllers in the repo
… rtw template to fit the controller implementation
…tation from rtw template to fit the controller implementation
Copy link
Contributor

mergify bot commented Aug 25, 2025

This pull request is in conflict. Could you fix it @mathias31415?

@mathias31415 mathias31415 marked this pull request as ready for review August 25, 2025 06:05
Copy link

codecov bot commented Aug 25, 2025

Codecov Report

❌ Patch coverage is 68.62745% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.10%. Comparing base (5ed4fa5) to head (531734e).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
...trollers/src/motion_primitives_base_controller.cpp 65.59% 27 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1857      +/-   ##
==========================================
- Coverage   85.12%   85.10%   -0.03%     
==========================================
  Files         138      140       +2     
  Lines       13547    13559      +12     
  Branches     1188     1187       -1     
==========================================
+ Hits        11532    11539       +7     
- Misses       1620     1626       +6     
+ Partials      395      394       -1     
Flag Coverage Δ
unittests 85.10% <68.62%> (-0.03%) ⬇️

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

Files with missing lines Coverage Δ
..._controllers/motion_primitives_base_controller.hpp 100.00% <ø> (ø)
...ntrollers/motion_primitives_forward_controller.hpp 100.00% <100.00%> (ø)
...llers/src/motion_primitives_forward_controller.cpp 32.25% <100.00%> (ø)
...test_load_motion_primitives_forward_controller.cpp 100.00% <100.00%> (ø)
...test/test_motion_primitives_forward_controller.cpp 97.36% <100.00%> (ø)
...test/test_motion_primitives_forward_controller.hpp 89.06% <100.00%> (ø)
...trollers/src/motion_primitives_base_controller.cpp 65.59% <65.59%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

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

Overall LGTM, but I have some minor comments

@@ -159,7 +98,7 @@ controller_interface::return_type MotionPrimitivesForwardController::update(
{
case ExecutionState::IDLE:
print_error_once_ = true;
was_executing_ = false;
// was_executing_ = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The action was sometimes not properly finished with SUCCESSFUL, because was_executing_ was reset too early.
When transitioning from EXECUTING → SUCCESS, the action should end with SUCCESSFUL, which is why the flag was_executing_ is checked here.
The flag should only be reset if the action is canceled (STOPPED) or in case of an error (ERROR).

However, I should remove this completely and not just comment it out.

@christophfroehlich
Copy link
Contributor

I merge this without another review as it does not change the behavior but only refactors some stuff.

@christophfroehlich christophfroehlich merged commit dc2ee70 into ros-controls:master Aug 29, 2025
26 of 27 checks passed
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.

3 participants