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

Add joint limiter interface plugins to enforce limits defined in the URDF #1526

Open
wants to merge 65 commits into
base: master
Choose a base branch
from

Conversation

saikishor
Copy link
Member

This PR includes the changes of the PR from @destogl #971, and on top of that it extends the proposed methods to be able to integrate and be able to provide an interface that will allow enforcing the joint limits in position, velocity, effort, acceleration, etc. The proposed interface can accept different types of data in the enforce methods with the help of templating and this can be helpful to extend to different applications in the future.

This PR is done as a part of #1466 to be able to integrate the limiters within the ResourceManager

Closes #971

Copy link

codecov bot commented May 7, 2024

Codecov Report

Attention: Patch coverage is 94.98787% with 62 lines in your changes missing coverage. Please review.

Project coverage is 88.08%. Comparing base (ce5c35a) to head (51a69af).

Files with missing lines Patch % Lines
...s/include/joint_limits/joint_limiter_interface.hpp 32.50% 23 Missing and 4 partials ⚠️
joint_limits/src/joint_soft_limiter.cpp 86.50% 12 Missing and 5 partials ⚠️
joint_limits/src/joint_range_limiter.cpp 84.12% 5 Missing and 5 partials ⚠️
joint_limits/src/joint_limits_helpers.cpp 91.30% 2 Missing and 4 partials ⚠️
...limits/include/joint_limits/joint_soft_limiter.hpp 92.85% 1 Missing ⚠️
joint_limits/test/test_joint_limiter.hpp 98.18% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1526      +/-   ##
==========================================
+ Coverage   87.19%   88.08%   +0.89%     
==========================================
  Files         118      126       +8     
  Lines       11369    12539    +1170     
  Branches     1049     1098      +49     
==========================================
+ Hits         9913    11045    +1132     
- Misses       1094     1119      +25     
- Partials      362      375      +13     
Flag Coverage Δ
unittests 88.08% <94.98%> (+0.89%) ⬆️

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

Files with missing lines Coverage Δ
...mits/include/joint_limits/joint_limiter_struct.hpp 100.00% <100.00%> (ø)
joint_limits/include/joint_limits/joint_limits.hpp 97.22% <100.00%> (-2.78%) ⬇️
.../include/joint_limits/joint_saturation_limiter.hpp 100.00% <100.00%> (ø)
joint_limits/src/joint_saturation_limiter.cpp 85.63% <100.00%> (+0.13%) ⬆️
joint_limits/test/test_joint_range_limiter.cpp 100.00% <100.00%> (ø)
...oint_limits/test/test_joint_saturation_limiter.cpp 91.23% <ø> (+0.28%) ⬆️
...oint_limits/test/test_joint_saturation_limiter.hpp 96.55% <100.00%> (ø)
joint_limits/test/test_joint_soft_limiter.cpp 100.00% <100.00%> (ø)
...limits/include/joint_limits/joint_soft_limiter.hpp 92.85% <92.85%> (ø)
joint_limits/test/test_joint_limiter.hpp 98.18% <98.18%> (ø)
... and 4 more

Copy link
Contributor

mergify bot commented May 11, 2024

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

Copy link
Contributor

mergify bot commented Jul 4, 2024

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

* @param dt The time step.
* @return The position limits.
*/
std::pair<double, double> compute_position_limits(
Copy link
Contributor

@mateusmenezes95 mateusmenezes95 Jul 19, 2024

Choose a reason for hiding this comment

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

I have a suggestion from a code reader's point of view. What do you think about creating a struct with the min and max members instead? Using std::pair results later in the use of first and second accessors, which does not describe the purpose of the variable.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hello!

As these are helper methods alone. I want to keep them simple. Making a new struct and passing them around is something I wanted to avoid. That's the main reason I avoided using such new structs

Copy link
Contributor

mergify bot commented Jul 21, 2024

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

saikishor and others added 29 commits September 28, 2024 10:14
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.

4 participants