Repository navigation
Fixes assets write to sim - #4799
Merged
kellyguo11 merged 2 commits intoMar 3, 2026
Merged
Conversation
Contributor
Greptile SummaryThis PR fixes a data-staleness bug across both the PhysX and Newton simulation backends where Key changes:
Confidence Score: 4/5
Sequence DiagramsequenceDiagram
participant TL as Training Loop
participant Asset as Asset (write_*_to_sim)
participant DataProp as DataClass Property Getter
participant Buf as TimestampedBuffer
participant Phys as Physics Engine
Note over TL,Phys: OLD (buggy) behaviour
TL->>Asset: write_joint_vel_to_sim(env_ids, values)
Asset->>Buf: outputs=[_joint_vel.data] (bypass getter)
Phys-->>Buf: kernel writes commanded values
Asset->>Buf: _joint_vel.timestamp = _sim_timestamp (marks "current")
TL->>DataProp: read joint_vel
DataProp->>Buf: timestamp == _sim_timestamp → SKIP re-fetch
Buf-->>TL: returns commanded (pre-physics) values ❌
Note over TL,Phys: NEW (fixed) behaviour
TL->>Asset: write_joint_vel_to_sim(env_ids, values)
Asset->>DataProp: outputs=[self.data.joint_vel] (calls getter)
DataProp->>Phys: fetch current state (if stale)
Phys-->>Buf: data assigned, timestamp updated
DataProp-->>Asset: returns buffer reference
Phys-->>Buf: kernel writes commanded values into buffer
Note over Buf: No manual timestamp update
TL->>Asset: physics step → _sim_timestamp advances
TL->>DataProp: read joint_vel
DataProp->>Buf: timestamp < _sim_timestamp → re-fetch
DataProp->>Phys: get actual post-step state
Phys-->>Buf: actual simulation state written
Buf-->>TL: returns actual physics values ✅
Last reviewed commit: 5ed568d |
kellyguo11
approved these changes
Mar 3, 2026
kellyguo11
added a commit
to kellyguo11/IsaacLab-public
that referenced
this pull request
Mar 4, 2026
…aac-sim#4803) Conflict in parse_cfg.py: kept HEAD's hydra-import-free PresetCfg resolution (_is_preset_cfg / _resolve_presets_to_default) to avoid the circular-import that would arise from importing resolve_preset_defaults from hydra.py (which itself imports load_cfg_from_registry from parse_cfg). Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
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.
Description
Fixes training issues seen in some environments. This came from potentially using outdated data when writing root / joint propertis.
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there