Skip to content

Add per-DoF mimic actuator mode#2222

Merged
jslee02 merged 19 commits intomainfrom
feature/mimic_axis
Nov 24, 2025
Merged

Add per-DoF mimic actuator mode#2222
jslee02 merged 19 commits intomainfrom
feature/mimic_axis

Conversation

@jslee02
Copy link
Member

@jslee02 jslee02 commented Nov 20, 2025

  • add per-DoF mimic actuator configuration and update mimic constraint handling
  • guard coupler constraints for partial/mixed mimic joints to avoid null derefs; fall back to mimic motors otherwise
  • surface gz-physics FAKE_INSTALL build logs when the nested build fails to ease CI debugging

Closes #1684.

API changes (with example)

Before (joint-wide mimic only):

joint->setActuatorType(dynamics::Joint::MIMIC);
joint->setMimicJoint(reference);
joint->setMimicMultiplier(2.0);
joint->setMimicOffset(0.1);

After (per-DoF mimic configuration):

joint->setActuatorType(1, dynamics::Joint::MIMIC);
dynamics::MimicDofProperties props;
props.mReferenceJoint = reference;
props.mReferenceDofIndex = 0;
props.mMultiplier = 2.0;
props.mOffset = 0.1;
joint->setMimicDofProperties({props});

Coupler constraints now activate only when every DoF is mimic with a valid reference; mixed joints fall back to mimic motors.


Before creating a pull request

  • Run pixi run test-all to lint, build, and test your changes
  • Add unit tests for new functionality
  • Document new methods and classes
  • Add Python bindings (dartpy) if applicable

@codecov
Copy link

codecov bot commented Nov 20, 2025

Codecov Report

❌ Patch coverage is 62.28070% with 86 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.10%. Comparing base (7160371) to head (b38a48b).
⚠️ Report is 266 commits behind head on main.

Files with missing lines Patch % Lines
dart/dynamics/Joint.cpp 44.76% 58 Missing ⚠️
dart/dynamics/detail/GenericJoint.hpp 70.68% 17 Missing ⚠️
dart/dynamics/Skeleton.cpp 53.84% 6 Missing ⚠️
dart/constraint/CouplerConstraint.cpp 80.00% 3 Missing ⚠️
dart/constraint/ConstraintSolver.cpp 91.30% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2222      +/-   ##
==========================================
+ Coverage   61.05%   61.10%   +0.04%     
==========================================
  Files         353      353              
  Lines       32144    32228      +84     
  Branches     4183     4225      +42     
==========================================
+ Hits        19627    19693      +66     
- Misses      12517    12535      +18     
Flag Coverage Δ
unittests 61.10% <62.28%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
dart/constraint/JointConstraint.cpp 79.38% <100.00%> (+0.18%) ⬆️
dart/constraint/MimicMotorConstraint.cpp 81.69% <100.00%> (+4.45%) ⬆️
dart/dynamics/Joint.hpp 100.00% <ø> (ø)
dart/dynamics/detail/JointAspect.hpp 100.00% <ø> (ø)
dart/constraint/ConstraintSolver.cpp 79.92% <91.30%> (+0.45%) ⬆️
dart/constraint/CouplerConstraint.cpp 77.04% <80.00%> (-0.26%) ⬇️
dart/dynamics/Skeleton.cpp 76.48% <53.84%> (-0.06%) ⬇️
dart/dynamics/detail/GenericJoint.hpp 78.98% <70.68%> (+3.28%) ⬆️
dart/dynamics/Joint.cpp 66.95% <44.76%> (-9.64%) ⬇️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jslee02 jslee02 closed this Nov 20, 2025
@jslee02 jslee02 reopened this Nov 21, 2025
@jslee02
Copy link
Member Author

jslee02 commented Nov 21, 2025

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jslee02 jslee02 added the status: blocked Blocked by a dependency or external constraint. label Nov 23, 2025
@jslee02 jslee02 added this to the DART 7.0 milestone Nov 24, 2025
@jslee02 jslee02 removed the status: blocked Blocked by a dependency or external constraint. label Nov 24, 2025
jslee02 and others added 2 commits November 24, 2025 07:44
# Conflicts:
#	CHANGELOG.md
#	dart/constraint/CouplerConstraint.cpp
#	python/dartpy/dynamics/Joint.cpp
#	python/dartpy_docs/dynamics.py
@jslee02
Copy link
Member Author

jslee02 commented Nov 24, 2025

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Chef's kiss.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jslee02 jslee02 merged commit 6678565 into main Nov 24, 2025
27 of 34 checks passed
@jslee02 jslee02 deleted the feature/mimic_axis branch November 24, 2025 20:54
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.

Feature request : Supply axis index when specifying mimic joint.

1 participant