You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unify physics randomization events across PhysX and Newton (#5098)
# Description
Asset APIs added:
- PhysX: set_material_properties_index / set_material_properties_mask on
Articulation, RigidObject, and RigidObjectCollection for vectorized
material property writes.
- Newton: set_friction_index / set_friction_mask, set_restitution_index
/ set_restitution_mask, and num_shapes property on all three asset
types. Newton uses a single friction coefficient (mu), so friction and
restitution are separate APIs.
Event terms updated:
- randomize_rigid_body_material — auto-detects backend at init; PhysX
uses 3-tuple materials via set_material_properties_index, Newton uses
separate set_friction_index / set_restitution_index.
- randomize_rigid_body_collider_offsets — converted from duplicated
PhysX/Newton branches to a single __call__ using writer lambdas set at
init. PhysX writes rest/contact offsets; Newton maps to shape_margin /
shape_gap and notifies solver.
- randomize_rigid_body_com — passes body_ids through to set_coms_index
and handles Newton's position-only (vec3) vs PhysX's full pose (pos +
quat). NOTE: This is only implemented for completion but there seem to
be an bug in mujoco warp in handing change of this value.
- randomize_rigid_body_inertia — new event term for randomizing body
inertia tensors.
## Type of change
<!-- As you go through the list, delete the ones that are not
applicable. -->
- New feature (non-breaking change which adds functionality)
## Screenshots
Please attach before and after screenshots of the change if applicable.
<!--
Example:
| Before | After |
| ------ | ----- |
| _gif/png before_ | _gif/png after_ |
To upload images to a PR -- simply drag and drop an image while in edit
mode and it should upload the image directly. You can then paste that
source into the above before/after sections.
-->
## Checklist
- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it
For example,
- [x] I have done this task
- [ ] I have not done this task
-->
---------
Co-authored-by: Antoine Richard <antoiner@nvidia.com>
0 commit comments