Skip to content

Keep Unity slide spring references in linear units - #3516

Open
sylvesterkaczmarek wants to merge 1 commit into
google-deepmind:mainfrom
sylvesterkaczmarek:fix/unity-slide-springref-radian-import
Open

Keep Unity slide spring references in linear units#3516
sylvesterkaczmarek wants to merge 1 commit into
google-deepmind:mainfrom
sylvesterkaczmarek:fix/unity-slide-springref-radian-import

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Summary

Fix Unity import of springref for slide joints when the MJCF compiler uses radians.

The shared SpringSettings.FromMjcf path converted every springref from radians to degrees whenever MjSceneImportSettings.AnglesInDegrees was false. That is correct for angular joints, but a slide joint's springref is a linear position and must remain in metres.

This change:

  • makes the shared joint-settings parser distinguish angular from linear spring references
  • keeps the existing angular conversion as the default
  • has MjSlideJoint explicitly request linear spring-reference handling
  • adds regression coverage showing springref="0.25" remains 0.25 in a radian-model import

Validation

The branch is based directly on current main and is one commit ahead. The diff is limited to the shared joint settings, MjSlideJoint, and its existing test file.

The Unity EditMode suite was not executed in this environment, so no local Unity test pass is claimed.

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.

1 participant