Skip to content

Commit 8c7d58f

Browse files
authored
Fix unit tests.
1 parent 1b977ae commit 8c7d58f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_rigid_physics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ def test_link_velocity(gs_sim, tol):
577577
@pytest.mark.parametrize("gs_integrator", [gs.integrator.Euler])
578578
def test_pendulum_links_acc(gs_sim, tol):
579579
pendulum = gs_sim.entities[0]
580-
g = gs_sim.rigid_solver._gravity.to_numpy()[2]
580+
g = gs_sim.rigid_solver._gravity[0][2]
581581

582582
# Make sure that the linear and angular acceleration matches expectation
583583
theta = np.random.rand()
@@ -1589,7 +1589,7 @@ def test_contact_forces(show_viewer, tol):
15891589
)
15901590
scene.build()
15911591

1592-
cube_weight = scene.rigid_solver._gravity.to_numpy()[2] * cube.get_mass()
1592+
cube_weight = scene.rigid_solver._gravity[0][2] * cube.get_mass()
15931593
motors_dof = np.arange(7)
15941594
fingers_dof = np.arange(7, 9)
15951595
qpos = np.array([-1.0124, 1.5559, 1.3662, -1.6878, -1.5799, 1.7757, 1.4602, 0.04, 0.04])

0 commit comments

Comments
 (0)