Repository navigation
Conversation
Read position fields directly and preserve independent storage for root positions. Check world-frame values against MuJoCo and retain snapshot behavior across writes and partial resets.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Position-only
EntityDatareads currently evaluate full-pose properties before slicing out the position. Read the MuJoCo position fields directly, avoiding the unused quaternion work and pose concatenation. Root getters retainclone()because integer indexing aliases simulation storage; batched tensor indexing already produces independent storage. The test checks values against an independent MuJoCo model, caller writes, and snapshots across partial root-pose updates. The Upcoming changelog is updated.This follows the discussion in #1275. On RTX 5090 with 1024 Lift environments, complete
env.steptime decreased from 4.530 to 4.020 ms (11.3%). A separate RTX 2080 Ti comparison measured 10.117 ms with the original getters, 8.994 ms changing onlysite_pos_w, 9.778 ms changing the other five, and 8.886 ms with all six. Both use seed 42, zero actions, 50 warmup steps and five 500-step samples; reproduction details and the allocation/aliasing explanation are in #1275. Thanks to @stergiosba for prompting the additional allocation and attribution checks.make test-all, including ty and pyright, passed on Python 3.13: CPU 1113 passed / 13 skipped, CUDA 1126 passed. The original main accessors also pass the new compatibility test. The test was additionally rerun on H200, and the six getters passed bitwise same-state and storage-independence checks on RTX 2080 Ti.