Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
### Fixed

- Fix MJCF, URDF, and USD imports rendering collision-only bodies as visuals when the asset authors visual geometry elsewhere. (#3291)
- Fix `SchemaResolverPhysx` reading every D6 translational limit gain from the `linear` instance instead of its `transX`, `transY`, or `transZ` instance.
- Fix `ViewerUSD` texture consumers observing partially written PNGs by publishing generated textures atomically (#3288)
- Fix builder merging (`ModelBuilder.add_builder()`, `add_world()`, `replicate()`) offsetting negative reference sentinels in custom attribute values stored as NumPy or Warp integer scalars.
- Fix `ModelBuilder.add_usd()` requiring the optional `mujoco` package when handling `MjcActuator` prims, including during default MJC equality conversion.
Expand Down
13 changes: 6 additions & 7 deletions newton/_src/usd/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,13 +346,12 @@ class SchemaResolverPhysx(SchemaResolver):
PrimType.JOINT: {
"armature": SchemaAttribute("physxJoint:armature", 0.0),
"velocity_limit": SchemaAttribute("physxJoint:maxJointVelocity", None),
# Per-axis linear limit aliases
"limit_transX_ke": SchemaAttribute("physxLimit:linear:stiffness", 0.0),
"limit_transY_ke": SchemaAttribute("physxLimit:linear:stiffness", 0.0),
"limit_transZ_ke": SchemaAttribute("physxLimit:linear:stiffness", 0.0),
"limit_transX_kd": SchemaAttribute("physxLimit:linear:damping", 0.0),
"limit_transY_kd": SchemaAttribute("physxLimit:linear:damping", 0.0),
"limit_transZ_kd": SchemaAttribute("physxLimit:linear:damping", 0.0),
"limit_transX_ke": SchemaAttribute("physxLimit:transX:stiffness", 0.0),
"limit_transY_ke": SchemaAttribute("physxLimit:transY:stiffness", 0.0),
"limit_transZ_ke": SchemaAttribute("physxLimit:transZ:stiffness", 0.0),
"limit_transX_kd": SchemaAttribute("physxLimit:transX:damping", 0.0),
"limit_transY_kd": SchemaAttribute("physxLimit:transY:damping", 0.0),
"limit_transZ_kd": SchemaAttribute("physxLimit:transZ:damping", 0.0),
"limit_linear_ke": SchemaAttribute("physxLimit:linear:stiffness", 0.0),
"limit_angular_ke": SchemaAttribute("physxLimit:angular:stiffness", 0.0),
"limit_rotX_ke": SchemaAttribute("physxLimit:rotX:stiffness", 0.0),
Expand Down
14 changes: 14 additions & 0 deletions newton/tests/test_schema_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,20 @@ def test_physx_joint_velocity_limit(self):
for vel_limit in velocity_limits_found:
self.assertAlmostEqual(vel_limit, expected_velocity_limit, places=3)

def test_physx_d6_translational_limit_instances(self):
stage = Usd.Stage.CreateInMemory()
joint = stage.DefinePrim("/joint", "PhysicsJoint")
resolver = SchemaResolverPhysx()

for gain, property_name in (("ke", "stiffness"), ("kd", "damping")):
joint.CreateAttribute(f"physxLimit:linear:{property_name}", Sdf.ValueTypeNames.Float).Set(99.0)
for index, axis in enumerate(("transX", "transY", "transZ"), start=1):
expected = float(index + (3 if gain == "kd" else 0))
joint.CreateAttribute(f"physxLimit:{axis}:{property_name}", Sdf.ValueTypeNames.Float).Set(expected)

with self.subTest(axis=axis, gain=gain):
self.assertEqual(resolver.get_value(joint, PrimType.JOINT, f"limit_{axis}_{gain}"), expected)

def test_schema_attrs_collection(self):
"""
Test solver-specific attribute collection from USD files.
Expand Down
Loading