dart icon indicating copy to clipboard operation
dart copied to clipboard

Fix joint impulse statefulness

Open jslee02 opened this issue 3 weeks ago • 1 comments

Fixes part of #1089 by moving GenericJoint impulse-related members into the joint Aspect State so they are captured/restored by dart::dynamics::Skeleton::getState() / setState().

  • Adds mVelocityChanges, mImpulses, and mConstraintImpulses to dart::dynamics::detail::GenericJointState and updates GenericJoint/FreeJoint to use them.
  • Makes dart::simulation::World::reset() clear constraint impulses so stale constraint forces don't leak across independent runs.
  • Adds regression tests in tests/integration/dynamics/test_SkeletonState.cpp.
  • Updates GitHub CI workflows to pin the pixi install location (avoids intermittent pixi: command not found / exit 127 on some runners).

Related: #1086.

jslee02 avatar Dec 13 '25 16:12 jslee02

Codecov Report

:x: Patch coverage is 90.00000% with 3 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 64.63%. Comparing base (a6b93bf) to head (a598e07). :warning: Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
dart/dynamics/detail/GenericJoint.hpp 86.95% 3 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2308      +/-   ##
==========================================
+ Coverage   64.58%   64.63%   +0.05%     
==========================================
  Files         367      367              
  Lines       33826    33837      +11     
  Branches     4472     4474       +2     
==========================================
+ Hits        21845    21872      +27     
+ Misses      11981    11965      -16     
Flag Coverage Δ
unittests 64.63% <90.00%> (+0.05%) :arrow_up:

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

Files with missing lines Coverage Δ
dart/dynamics/GenericJoint.hpp 100.00% <ø> (ø)
dart/dynamics/detail/GenericJointAspect.hpp 71.42% <100.00%> (+1.27%) :arrow_up:
dart/simulation/World.cpp 79.27% <100.00%> (+1.58%) :arrow_up:
dart/simulation/World.hpp 100.00% <ø> (ø)
dart/dynamics/detail/GenericJoint.hpp 79.56% <86.95%> (+0.36%) :arrow_up:

... and 4 files with indirect coverage changes

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

codecov[bot] avatar Dec 13 '25 16:12 codecov[bot]