-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[Newton] Adds tests and benchmarks for Articulation Newton #4223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Newton] Adds tests and benchmarks for Articulation Newton #4223
Conversation
Greptile SummaryThis PR adds comprehensive testing and benchmarking infrastructure for the Newton articulation system, along with critical bug fixes and refactoring improvements. Key ChangesTesting Infrastructure (New)
Code Quality & Refactoring
Critical Bug Fixes
Improvements
Issues Found
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Articulation
participant ArticulationData
participant WarpUtils
participant Kernels
participant Newton
Note over User,Newton: Initialization Phase
User->>Articulation: __init__(cfg)
Articulation->>ArticulationData: create data buffers
ArticulationData->>Newton: bind to simulation
Articulation->>Articulation: _create_buffers()
Articulation->>ArticulationData: set is_primed = True
Note over User,Newton: State Write Operations
User->>Articulation: write_root_state_to_sim(state, env_ids)
Articulation->>WarpUtils: make_complete_data_from_torch_single_index()
WarpUtils-->>Articulation: complete warp array
Articulation->>WarpUtils: make_masks_from_torch_ids()
WarpUtils-->>Articulation: warp mask
Articulation->>Kernels: split_state_to_pose_and_velocity()
Kernels-->>Articulation: pose, velocity
Articulation->>Newton: set transforms and velocities
Note over User,Newton: State Read Operations
User->>Articulation: data.root_state_w
Articulation->>ArticulationData: check timestamp
alt timestamp stale
ArticulationData->>Newton: get_root_transforms()
ArticulationData->>Newton: get_root_velocities()
ArticulationData->>Kernels: combine_pose_and_velocity_to_state()
ArticulationData->>ArticulationData: update timestamp
end
ArticulationData-->>User: cached state
Note over User,Newton: Joint Operations
User->>Articulation: write_joint_state_to_sim(pos, vel, env_ids, joint_ids)
Articulation->>WarpUtils: make_complete_data_from_torch_dual_index()
WarpUtils-->>Articulation: complete arrays
Articulation->>WarpUtils: make_masks_from_torch_ids() [2x]
WarpUtils-->>Articulation: env_mask, joint_mask
Articulation->>Kernels: update_array2D_with_array2D_masked()
Kernels->>Newton: write to simulation
Note over User,Newton: Update Cycle
User->>Articulation: update(dt)
Articulation->>ArticulationData: update(dt)
ArticulationData->>ArticulationData: increment timestamp
ArticulationData->>ArticulationData: invalidate cached properties
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (7)
-
source/isaaclab_newton/isaaclab_newton/assets/utils/shared.py, line 61 (link)style: missing newline at end of file
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
-
source/isaaclab/isaaclab/utils/warp/utils.py, line 95-100 (link)syntax: docstring args don't match function parameters - describes
value,first_ids,second_ids,first_mask,second_mask,dtype,devicebut function only hasN,first_ids,first_mask,device -
source/isaaclab_newton/isaaclab_newton/assets/articulation/articulation_data.py, line 109-112 (link)syntax: docstring says "..note::" but should be ".. note::" (missing space after
..) -
source/isaaclab_newton/isaaclab_newton/assets/articulation/articulation_data.py, line 159-162 (link)syntax: copy-paste error in docstring - says "Once this quantity is set to True" but should describe setting the default root pose, not a boolean
-
source/isaaclab_newton/isaaclab_newton/assets/articulation/articulation_data.py, line 185-188 (link)syntax: same docstring issue - says "Once this quantity is set to True" but should describe setting the default root velocity
-
source/isaaclab_newton/isaaclab_newton/assets/articulation/articulation_data.py, line 209-212 (link)syntax: same docstring issue - says "Once this quantity is set to True" for joint positions
-
source/isaaclab_newton/isaaclab_newton/assets/articulation/articulation_data.py, line 233-236 (link)syntax: same docstring issue - says "Once this quantity is set to True" for joint velocities
18 files reviewed, 7 comments
3c3840e to
9767629
Compare
…cess_actuator_cfg. But that should come after the unit tests of the actuators. All this will change with Julia's PR.
9767629 to
e594127
Compare
Description
Test & Benchmark for newton articulation. Requires #4190 to be merged first.
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there