Skip to content

Commit

Permalink
Add test for attrs, verify it fails
Browse files Browse the repository at this point in the history
  • Loading branch information
thisjustin123 committed Dec 11, 2024
1 parent e521073 commit 67c8d2e
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions tests/test_bathing_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,37 @@ def test_instance_camera(bathing_env: BathingEnv):
print(rgb.shape)
assert(rgb.shape[0] > 0)

def test_access_attrs(bathing_env: BathingEnv):
"""
Test that all of the following can be gotten without error:
# _gripper_id: int = 2215820
# _robot_id: int = 221582
# _camera_id: int = 654321
# _sponge_id: int = 91846
# _bed_id: int = 758554
# _drawer_id: int = 758666
# _person_id: int = 573920
# _randomizer_id: int = 777
"""

gripper = bathing_env.get_gripper()
robot = bathing_env.get_robot()
camera = bathing_env.get_camera()
sponge = bathing_env.get_sponge()
bed = bathing_env.GetAttr(758554)
drawer = bathing_env.GetAttr(758666)
person = bathing_env.GetAttr(573920)
person_randomizer = bathing_env.get_person_randomizer()

assert gripper
assert robot
assert camera
assert sponge
assert bed
assert drawer
assert person
assert person_randomizer

def test_sponge_force():
"""
Test for the sponge force. Teleports the sponge to the right thigh and reads the force.
Expand Down

0 comments on commit 67c8d2e

Please sign in to comment.