Skip to content

Adding coupled joints urdf modification#46

Merged
Nicogene merged 5 commits intomesh-iit:masterfrom
GabrieleGandolfi:master
Mar 19, 2026
Merged

Adding coupled joints urdf modification#46
Nicogene merged 5 commits intomesh-iit:masterfrom
GabrieleGandolfi:master

Conversation

@GabrieleGandolfi
Copy link
Copy Markdown
Contributor

The purpose of this PR is to add the possibility of adding joints coupling as a modification of an original urdf file.
The implementation leverages JointMimic from urchin and, given the joint to be coupled (the follower), requires the actuated joint from which the follower depends (the leader), the coupling coefficient, and an offset.
This can be particularly useful in urdf models of hands, where joint coupling between the phalanges is common in both human and robotic hands.

Example using a config file

In this example, in the case of a human-like hand, I would like to add this coupling instance:

Active coupling rules (1 follower(s)):
    [ON] Mid PIP→DIP
         jRightMiddle2_rotx                  → jRightMiddle3_rotx   nominal=1.1232  offset=0.0000

Translated in a config file, this becomes:

[jRightMiddle3_rotx]
mimic_joint_leader = jRightMiddle2_rotx
mimic_multiplier = 1.123200
mimic_offset = 0.000000

The 'mimic' tag will be added to the target joint with those information.

<joint name="jRightMiddle3_rotx" type="revolute">
    <dynamics damping="0.1" friction="0.0"/>
    <limit effort="0.2018" velocity="13.57866158" lower="-0.4697" upper="1.5702"/>
    <!-- NEW LINE WITH THE MODIFICATION -->
    <mimic joint="jRightMiddle2_rotx" multiplier="1.1232" offset="0.0"/>
    <parent link="RightMiddle2"/>
    <child link="RightMiddle3"/>
    <axis xyz="1. 0. 0."/>
    <origin xyz="0.0 -0.04199321999991909 -4.40535569095582e-08" rpy="0.0 0.0 0.0"/>
  </joint>

The result is displayed visually here:

joints-coupling-modification.mp4

@Nicogene Nicogene self-requested a review March 18, 2026 11:16
@Nicogene Nicogene removed their assignment Mar 18, 2026
Copy link
Copy Markdown
Member

@Nicogene Nicogene left a comment

Choose a reason for hiding this comment

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

Thanks @GabrieleGandolfi !

Maybe we could add this new feature to the README?

I knew that mimic was a proposal:

Has been integrated in the sdf format?

cc @traversaro

@traversaro
Copy link
Copy Markdown
Contributor

I knew that mimic was a proposal:

* https://sdformat.org/tutorials/pose_semantics_docs/mimic_proposal/

Has been integrated in the sdf format?

I am not sure if it was integrated in the sdf format, but I guess this PR is relate to URDF, right?

@GabrieleGandolfi
Copy link
Copy Markdown
Contributor Author

I am not sure if it was integrated in the sdf format, but I guess this PR is relate to URDF, right?

Yes! it's URDF related.

@traversaro
Copy link
Copy Markdown
Contributor

traversaro commented Mar 18, 2026

Great! In that case mimic is an "official" part of the URDF standard (see https://wiki.ros.org/urdf/XML/joint), even if its actual adoptions across software that support URDF is not universal.

@Nicogene Nicogene merged commit 40d4a8c into mesh-iit:master Mar 19, 2026
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