-
Notifications
You must be signed in to change notification settings - Fork 276
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
Apply mimic constraint to joints #1838
Conversation
Signed-off-by: Aditya <[email protected]>
Signed-off-by: Aditya <[email protected]>
Signed-off-by: Steve Peters <[email protected]>
Signed-off-by: Steve Peters <[email protected]>
After finally testing this pull request, I've noticed that dartsim's MimicMotorConstraint is not behaving the same way as the Gearbox joint in gazebo-classic. While the gearbox joint creates a bilateral constraint that applies equal and opposite impulses on the connected joints, the Mimic constraint appears to be unilateral, in that it only applies impulses to the follower joint and does not affect the leader joint. This can be seen in the following animation from the In this example world, there are three pairs of pendulums. Each pair of pendulums have different lengths, and thus different oscillation frequencies. The middle pair of pendulums are uncoupled, so you can see how they oscillate at different frequencies, and their motions diverge over time. On the left side, the large pendulum mimics the small pendulum with a mimic_pendulum.mp4The behavior of dartsim's |
I've opened a feature request in dartsim/dart#1756 to add support for a bilateral linear constraint between joints |
Based on changes made in gz-physics test world. Signed-off-by: Steve Peters <[email protected]>
Signed-off-by: Steve Peters <[email protected]>
Signed-off-by: Steve Peters <[email protected]>
Signed-off-by: Steve Peters <[email protected]>
23c64da
to
1678861
Compare
Signed-off-by: Steve Peters <[email protected]>
Signed-off-by: Steve Peters <[email protected]>
I think this is ready for review |
Signed-off-by: Steve Peters <[email protected]>
retargeted to harmonic / |
Codecov Report
@@ Coverage Diff @@
## main #1838 +/- ##
==========================================
- Coverage 65.32% 65.28% -0.04%
==========================================
Files 321 321
Lines 30303 30326 +23
==========================================
+ Hits 19795 19799 +4
- Misses 10508 10527 +19
|
Signed-off-by: Steve Peters <[email protected]>
Signed-off-by: Steve Peters <[email protected]>
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.
Works for me! Just one minor comment
@@ -0,0 +1,655 @@ | |||
<?xml version="1.0" ?> | |||
<!-- | |||
Gazebo Mimic constraint demo |
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.
Since this currently only works with bullet-featherstone, can you provide the command to run here?
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.
I added the example command in e9b22fc
I noticed that lots of our other example worlds are using command-line strings with --
inside XML comment blocks, which is invalid XML, so I put the example command inside a CDATA block. Now xmllint
is happy with the file, and I believe it still works.
Put example command in CDATA block because -- is not allowed in <!-- --> comment blocks. Put the CDATA and comment block just inside the <sdf> tag. Signed-off-by: Steve Peters <[email protected]>
I just merged with |
I think we still need #2100 to land |
Yup |
🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸
🎉 New feature
Summary
This PR picks up the mimic joint tag from sdf::JointAxis, and aplies it to the relevant gz::physics joint.
Work in progress !
Test it
Test with the example world included in this PR:
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸