Repository navigation
Conversation
The device-resident branch of SceneTensorReadPlan._read_packet fetched one tracked-body view for the first packet field's aggregate axis and published every body field from that same view. When fields declare different body axes (e.g. a pose-only floor entity is absent from the velocity fields), the published width no longer matched the compiled per-field axes and refresh failed with a shape mismatch. Host-bridge plans compile per-field widths and were unaffected. Select each body field's columns from the shared view by public body name through the existing _packet_body_indices cache; fields whose axes match the first field keep the previous fast path. Found while bringing the G1 navigation raycast task up on the mjwarp backend; host-bridge (mujoco) behavior is unchanged. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
The device-resident branch of
SceneTensorReadPlan._read_packetfetched one tracked-body view for the first packet field's aggregate axis and published every body packet field from that same view. When fields declare different body axes — e.g. a pose-only floor entity appears inbody_pos_w/body_quat_wbut not inbody_lin_vel_w/body_ang_vel_w— the published width no longer matched the compiled per-field axes and every refresh failed with a shape mismatch:Host-bridge plans compile per-field widths and were unaffected, so this only surfaces on device-resident backends (mjwarp today, newton/genesis paths too).
Fix
Select each body field's columns from the shared tracked-body view by public body name through the existing
_packet_body_indicescache. Fields whose axes match the first field's axis keep the previous fast path (no extra indexing on the hot loop).Verification
794c0bbd(current main lock of the consumer project).Made with Cursor