Skip to content

Commit

Permalink
Update test_transition_rules.py
Browse files Browse the repository at this point in the history
Final changes to the transition test
  • Loading branch information
goldenJester committed Mar 11, 2024
1 parent 5b11605 commit bf3c0c1
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions tests/test_transition_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -1563,17 +1563,17 @@ def test_slicer_volume_sharp_end():


# Let apple settle
for _ in range(50):
for _ in range(100):
og.sim.step()

# knife.keep_still()
knife.set_position_orientation(
position=apple.get_position() + np.array([-0.15, 0.0, 0.2]),
orientation=T.euler2quat([-np.pi / 4, 0, 0]),
orientation=T.euler2quat([-np.pi, 0, 0]),
)

# Step simulation for a bit so that apple is sliced
for i in range(10000):
for i in range(100):
og.sim.step()

# Check if apple is sliced
Expand All @@ -1599,17 +1599,17 @@ def test_slicer_volume_blunt_end():
place_obj_on_floor_plane(knife)

# Let apple settle
for _ in range(50):
for _ in range(100):
og.sim.step()

knife.keep_still()
knife.set_position_orientation(
position=apple.get_position() + np.array([-0.15, 0.0, 0.15]),
orientation=T.euler2quat([np.pi / 2, 0, 0]),
position=apple.get_position() + np.array([-0.15, 0.0, 0.2]),
orientation=T.euler2quat([np.pi, 0, 0]),
)

# Step simulation for a bit so that apple is sliced
for i in range(100):
for i in range(1000):
og.sim.step()


Expand All @@ -1622,4 +1622,5 @@ def test_slicer_volume_blunt_end():
og.sim.remove_object(knife)

if __name__ == "__main__":
test_slicer_volume_blunt_end()
test_slicer_volume_sharp_end()

0 comments on commit bf3c0c1

Please sign in to comment.