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

Use actual position when limiting desired position #1988

Conversation

saikishor
Copy link
Member

While integrating the joint limits into the resource manager, I discovered that the current joint_limits implementation doesn't consider the actual position when limiting the desired position. This was the case as in ROS 1 too it doesn't use it, but uses the previous command value. I think it would make sense to consider the actual position as well in this scenario

Copy link

codecov bot commented Jan 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.32%. Comparing base (f4c9dd0) to head (bf41ee1).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1988      +/-   ##
==========================================
- Coverage   89.32%   89.32%   -0.01%     
==========================================
  Files         130      130              
  Lines       14522    14568      +46     
  Branches     1258     1259       +1     
==========================================
+ Hits        12972    13013      +41     
- Misses       1083     1086       +3     
- Partials      467      469       +2     
Flag Coverage Δ
unittests 89.32% <100.00%> (-0.01%) ⬇️

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

Files with missing lines Coverage Δ
...s/include/joint_limits/joint_limiter_interface.hpp 50.79% <ø> (ø)
.../include/joint_limits/joint_saturation_limiter.hpp 100.00% <ø> (ø)
...limits/include/joint_limits/joint_soft_limiter.hpp 92.85% <ø> (ø)
joint_limits/src/joint_limits_helpers.cpp 91.54% <100.00%> (+0.12%) ⬆️
joint_limits/src/joint_range_limiter.cpp 84.61% <100.00%> (+0.24%) ⬆️
joint_limits/src/joint_saturation_limiter.cpp 85.29% <100.00%> (-0.34%) ⬇️
joint_limits/src/joint_soft_limiter.cpp 88.46% <100.00%> (+0.86%) ⬆️
joint_limits/test/test_joint_range_limiter.cpp 100.00% <100.00%> (ø)
joint_limits/test/test_joint_soft_limiter.cpp 99.64% <100.00%> (+0.01%) ⬆️

... and 3 files with indirect coverage changes

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.

I agree, this makes sense

@saikishor
Copy link
Member Author

Resolved conflicts after #1981

@saikishor saikishor requested a review from bmagyar January 12, 2025 21:29
@saikishor
Copy link
Member Author

@bmagyar It would be great to have this PR before releasing ros2_control. That way we will have the final API of joint_limits in the same tag. If that's not a problem at all, anything is fine

@bmagyar bmagyar merged commit e2e599b into ros-controls:master Jan 15, 2025
23 of 25 checks passed
@bmagyar bmagyar deleted the use/actual_position/limiting_position branch January 15, 2025 18:26
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