-
Notifications
You must be signed in to change notification settings - Fork 41
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
Added DART feature for setting joint limits dynamically. #260
Conversation
Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz>
…rted once newer DART is out). Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz>
Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz>
Followup ign-gazebo PR: gazebosim/gz-sim#847 . |
Example usage here: osrf/subt#948 . |
I'm in favor of getring the release out before merging this so we can get it in with all the successful tests 👍 |
Codecov Report
@@ Coverage Diff @@
## ign-physics3 #260 +/- ##
================================================
- Coverage 74.63% 74.43% -0.20%
================================================
Files 115 115
Lines 4703 4788 +85
================================================
+ Hits 3510 3564 +54
- Misses 1193 1224 +31
Continue to review full report at Codecov.
|
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.
LGTM! Just a few minor comments.
Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz> Co-authored-by: Addisu Z. Taddese <addisu@gmail.com>
Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz>
Thanks for the review. I addressed all issues. |
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
* Added DART feature for setting joint limits dynamically. Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz> * Make code compatible with older DART release (this commit can be reverted once newer DART is out). Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz> * Updated the number of models for test. Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz> * Apply suggestions from code review Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz> Co-authored-by: Addisu Z. Taddese <addisu@gmail.com> * Fixed issues from review. Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz> * Accomodate DART 6.9 Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> Co-authored-by: Addisu Z. Taddese <addisu@openrobotics.org> Co-authored-by: Addisu Z. Taddese <addisu@gmail.com> Co-authored-by: Steve Peters <scpeters@openrobotics.org>
* Added DART feature for setting joint limits dynamically. Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz> * Make code compatible with older DART release (this commit can be reverted once newer DART is out). Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz> * Updated the number of models for test. Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz> * Apply suggestions from code review Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz> Co-authored-by: Addisu Z. Taddese <addisu@gmail.com> * Fixed issues from review. Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz> * Accomodate DART 6.9 Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> Co-authored-by: Addisu Z. Taddese <addisu@openrobotics.org> Co-authored-by: Addisu Z. Taddese <addisu@gmail.com> Co-authored-by: Steve Peters <scpeters@openrobotics.org>
* Added DART feature for setting joint limits dynamically. Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz> * Make code compatible with older DART release (this commit can be reverted once newer DART is out). Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz> * Updated the number of models for test. Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz> * Apply suggestions from code review Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz> Co-authored-by: Addisu Z. Taddese <addisu@gmail.com> * Fixed issues from review. Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz> * Accomodate DART 6.9 Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> Co-authored-by: Addisu Z. Taddese <addisu@openrobotics.org> Co-authored-by: Addisu Z. Taddese <addisu@gmail.com> Co-authored-by: Steve Peters <scpeters@openrobotics.org>
🎉 New feature
Closes #96
Summary
Added features
SetJointPositionLimitsCommandFeature
,SetJointVelocityLimitsCommandFeature
,SetJointEffortLimitsCommandFeature
which allow runtime changes to joint limits.The only thing that doesn't work as expected is setting a position limit and controlling the joint via velocity commands - the joint will slow down when violating the limit, but not stop. This is a reported DART issue: dartsim/dart#1583 . I at least tried to detect the situations when the bug affects the ign-physics behavior and issue an error that an effort limit should be set for the joint - this is a workaround for the bug (but there is no single thershold that would work for all cases, so I left the setting to the user).
Until gazebo-forks/dart#26 is out, some tests may be failing because limits are not respected. But I'd say this PR is kind of independent and can be merged even before the DART update (maybe temporarily disabling the failing tests). The tests known to fail with older DART and succeed with newer DART are
JointSetVelocityLimitsWithForceControl
andJointSetCombinedLimitsWithForceControl
.Test it
Automated tests were added. See the tests.
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge