-
Notifications
You must be signed in to change notification settings - Fork 285
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
Allow specifying mimic joint properties per DoF (#1684) #1752
Conversation
The member variables of MimicDofProperties will be renamed to follow the convention for DART 6.x to: struct MimicDofProperties
{
const Joint* mReferenceJoint;
std::size_t mReferenceDofIndex = 0;
double mMultiplier = 1.0;
double mOffset = 0.0;
}; |
206a838
to
8cf47eb
Compare
8cf47eb
to
4d9aa28
Compare
@scpeters @adityapande-1995 I'm going to proceed with merging this for the time being. If you have any concerns or feedback regarding this change, please let me know! |
Sorry I didn't have a chance to review this yet. I'll try testing it and let you know how it goes |
I started writing a test with a multi-axis joint for which only one of its axes would use the mimic actuator type, but I noticed that I noticed it when I got to the following line in the current test: |
Are you suggesting that there could be a scenario where a joint contains both mimic degrees of freedom (DOFs) and non-mimic DOFs? I did not consider this situation in this PR. Addressing such a case might require additional refactoring, enabling us to set the actuator type for individual DOFs rather than the entire joint. |
Yes, this would provide maximum modeling flexibility, and while I could write an integration test for this functionality, I don't have a real-world use case in mind that motivates this feature.
Yes I think it would require more refactoring |
Understood. Indeed, fully supporting various actuator types for each degree of freedom (DOF) would necessitate extensive refactoring and might not be feasible for certain joint types, particularly those with non-Euclidean joint spaces such as BallJoint. As an alternative, we could consider a compromise by allowing different actuator types within the same category, such as kinematic (e.g., VELOCITY, LOCK) or dynamic (e.g., TORQUE, SERVO, MIMIC), given that the underlying forward dynamics algorithms might support this. However, I have concerns about adding a new feature in the absence of a clear use case. For clarity, can the current version fulfill the requirements specified in issue #1684? If a real-world use case emerges, we could then reassess the possibility of supporting different actuator types per DOF. |
This PR supports specifying mimic joint properties per DOF, as requested in issue #1684.
Previously, DART allowed specifying mimic joints with the constraint that the dependent and reference joint must have the same DOF, and the whole DOF would be mimicked rather than individual DOFs.
This PR removes these constraints, allowing a mimic joint to mimic individual DOFs with different reference joints, DOF indices, offsets, and multipliers. The following functions have been added:
where
Note that this change breaks API and ABI (by removing some public members) even though it's targeting 6.14. Please let us know if this is problematic for Gazebo to adopt this change.
Resolves #1684
CC: @adityapande-1995
Before creating a pull request
make format
-DDART_TREAT_WARNINGS_AS_ERRORS=ON
and resolve all the compile warningsBefore merging a pull request
CHANGELOG.md