ros2_controllers icon indicating copy to clipboard operation
ros2_controllers copied to clipboard

Add motion_primitives_from_trajectory_controller with trajectory approximation using PTP/LIN primitives

Open mathias31415 opened this issue 8 months ago • 4 comments

This PR adds the motion_primitives_from_trajectory_controller. To make reviewing easier, another PR #1857 was created first to move shared functionality into a base controller.

This PR replaces PR #1837.

This PR is marked as a draft because PR #1636 and PR #1857 must be merged first.

This PR complements motion_primitives_forward_controller PR #1636 .
Instead of sending hardcoded motion primitives to the motion_primitives_forward_controller, this controller (motion_primitives_from_trajectory_controller) approximates a JointTrajectory using either PTP or LIN motion primitives.

This allows, for example, collision-free paths planned with MoveIt to be executed as motion primitives. The approximation is performed using the Ramer-Douglas-Peucker (RDP) algorithm:

  • For PTP primitives in joint space
  • For LIN primitives in Cartesian space

mathias31415 avatar Aug 13 '25 13:08 mathias31415

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

mergify[bot] avatar Aug 25 '25 06:08 mergify[bot]

Codecov Report

:x: Patch coverage is 0% with 594 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 81.53%. Comparing base (f72f813) to head (7417fd1).

Files with missing lines Patch % Lines
...c/motion_primitives_from_trajectory_controller.cpp 0.00% 309 Missing :warning:
...ves_controllers/src/approx_primitives_with_rdp.cpp 0.00% 159 Missing :warning:
motion_primitives_controllers/src/rdp.cpp 0.00% 92 Missing :warning:
motion_primitives_controllers/src/fk_client.cpp 0.00% 20 Missing :warning:
...s/motion_primitives_from_trajectory_controller.hpp 0.00% 14 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1858      +/-   ##
==========================================
- Coverage   84.79%   81.53%   -3.27%     
==========================================
  Files         151      156       +5     
  Lines       14833    15427     +594     
  Branches     1286     1371      +85     
==========================================
  Hits        12578    12578              
- Misses       1784     2378     +594     
  Partials      471      471              
Flag Coverage Δ
unittests 81.53% <0.00%> (-3.27%) :arrow_down:

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

Files with missing lines Coverage Δ
...s/motion_primitives_from_trajectory_controller.hpp 0.00% <0.00%> (ø)
motion_primitives_controllers/src/fk_client.cpp 0.00% <0.00%> (ø)
motion_primitives_controllers/src/rdp.cpp 0.00% <0.00%> (ø)
...ves_controllers/src/approx_primitives_with_rdp.cpp 0.00% <0.00%> (ø)
...c/motion_primitives_from_trajectory_controller.cpp 0.00% <0.00%> (ø)
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Aug 25 '25 14:08 codecov[bot]

This PR is stale because it has been open for 45 days with no activity. Please tag a maintainer for help on completing this PR, or close it if you think it has become obsolete.

github-actions[bot] avatar Dec 15 '25 12:12 github-actions[bot]

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

mergify[bot] avatar Dec 15 '25 12:12 mergify[bot]

This PR is stale because it has been open for 45 days with no activity. Please tag a maintainer for help on completing this PR, or close it if you think it has become obsolete.

github-actions[bot] avatar Jan 30 '26 13:01 github-actions[bot]