Skip to content

Commit 084f478

Browse files
committed
Fix articulation wrench response assertion
1 parent 7f54fff commit 084f478

6 files changed

Lines changed: 6 additions & 6 deletions

File tree

source/isaaclab_newton/changelog.d/fix-articulation-wrench-response.skip

Whitespace-only changes.

source/isaaclab_newton/test/assets/test_articulation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2591,8 +2591,8 @@ def test_external_force_on_multiple_bodies_at_position(sim, num_articulations, d
25912591
articulation.update(sim.cfg.dt)
25922592
# check condition
25932593
for i in range(num_articulations):
2594-
# since there is a moment applied on the articulation, the articulation should rotate
2595-
assert torch.abs(articulation.data.root_ang_vel_w.torch[i, 2]).item() > 0.1
2594+
# the response axis depends on the link frames, so check that the articulation rotates
2595+
assert torch.linalg.vector_norm(articulation.data.root_ang_vel_w.torch[i]).item() > 0.1
25962596

25972597

25982598
@pytest.mark.parametrize("num_articulations", [2])

source/isaaclab_ov/changelog.d/fix-articulation-wrench-response.skip

Whitespace-only changes.

source/isaaclab_ov/test/assets/test_articulation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2344,8 +2344,8 @@ def test_external_force_on_multiple_bodies_at_position(sim, num_articulations, d
23442344
articulation.update(sim.cfg.dt)
23452345
# check condition
23462346
for i in range(num_articulations):
2347-
# since there is a moment applied on the articulation, the articulation should rotate
2348-
assert torch.abs(articulation.data.root_ang_vel_w.torch[i, 2]).item() > 0.1
2347+
# the response axis depends on the link frames, so check that the articulation rotates
2348+
assert torch.linalg.vector_norm(articulation.data.root_ang_vel_w.torch[i]).item() > 0.1
23492349

23502350

23512351
@pytest.mark.parametrize("num_articulations", [1, 2])

source/isaaclab_physx/changelog.d/fix-articulation-wrench-response.skip

Whitespace-only changes.

source/isaaclab_physx/test/assets/test_articulation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1630,8 +1630,8 @@ def test_external_force_on_multiple_bodies_at_position(sim, num_articulations, d
16301630
articulation.update(sim.cfg.dt)
16311631
# check condition
16321632
for i in range(num_articulations):
1633-
# since there is a moment applied on the articulation, the articulation should rotate
1634-
assert torch.abs(articulation.data.root_ang_vel_w.torch[i, 2]).item() > 0.1
1633+
# the response axis depends on the link frames, so check that the articulation rotates
1634+
assert torch.linalg.vector_norm(articulation.data.root_ang_vel_w.torch[i]).item() > 0.1
16351635

16361636

16371637
@pytest.mark.parametrize("num_articulations", [1, 2])

0 commit comments

Comments
 (0)