-
Notifications
You must be signed in to change notification settings - Fork 287
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 support for mimic joints #1178
Conversation
dart/dynamics/detail/JointAspect.hpp
Outdated
ActuatorType _actuatorType = DefaultActuatorType, | ||
Joint* _mimicJoint = nullptr, | ||
double _multiplier = 1.0, | ||
double _offset = 0.0); |
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.
double _offset = 0.0); | |
double _mimicMultiplier = 1.0, | |
double _mimicOffset = 0.0); |
nitpick: To make it clear that these are properties specifically related to the mimic joint actuator type, it would be good to decorate the variable names with mimic
.
Codecov Report
@@ Coverage Diff @@
## release-6.7 #1178 +/- ##
==============================================
Coverage ? 56.51%
==============================================
Files ? 345
Lines ? 25654
Branches ? 0
==============================================
Hits ? 14498
Misses ? 11156
Partials ? 0
|
@jslee02 your changes seem great! Integrated them and I updated the changelog.. |
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.
Looks great to me! @mxgrey Please let me know if you plan to review this PR further. 😄
Is there any reason that you are not merging this one? Thanks! |
I was waiting for a second review. Let me merge this now. |
This PR adds support for mimic joints (see #733). It does so by creating a new actuator type (MIMIC) and inserting one constraint for each mimic joint. In short:
JointProperties
struct now holds three additional variables:mMimicJoint
(pointer to "master" joint),mMultiplier
andmOffset
(these are only used in mimic joints and ignored for all other types of joints)skel
files (I know that insdf
there's no such thing)?This is working for me nicely so far..
Let me know what you think and then I can proceed in cleaning the code (add a few more warnings and check it a bit more).
Do you think it will be good to add a unit-test?I also added 2 unit tests (one for DartLoader and one for the mimic constraint)..