Skip to content

Feature request : Supply axis index when specifying mimic joint. #1684

@adityapande-1995

Description

@adityapande-1995

Is your feature request related to a problem? Please describe.
When specifying mimic joint (https://dartsim.github.io/dart/main/d6/d5b/classdart_1_1dynamics_1_1Joint.html#ae65b6209299935e602b675f84091c499)

 void dart::dynamics::Joint::setMimicJoint( 
        const Joint* _mimicJoint, double _mimicMultiplier, double _mimicOffset)

Only the joint pointer, multiplier, and offset are supplied to the method. The section here : (

assert(joint->getNumDofs() == mimicJoint->getNumDofs());
) dictates that the degrees of freedom for both axes should be the same.

This does not allow mimicking individual axes of a multi-axis joint, such as enabling a revolute joint to mimic one axis of an universal joint, or have an universal joint mimic only one axis of another universal joint. In such cases, it should be permitted to specify the axis index to be mimicked for each joint, and expand the implementation of the mimic joint to accommodate this situation.

Describe the solution you'd like
For instance, the new method could look like :

 void dart::dynamics::Joint::setMimicJoint( const Joint* _mimicJoint, std::size_t _index  , double _mimicMultiplier, double _mimicOffset)

Additional context
Originally came up here : gazebosim/gz-physics#431

cc @scpeters

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions