@@ -57,6 +57,20 @@ def assert_collision(self, info: dict):
5757class TestSimEnvsTRPY (TestSimEnvs ):
5858 """This class is for testing TRPY sim env functionalities"""
5959
60+ def test_reset (self , cfg , gripper_cfg , cam_cfg ):
61+ """
62+ Test reset functionality.
63+ """
64+ # TODO:
65+ # - test initial pose after reset.
66+ # - test initial gripper config.
67+ env = fr3_sim_env (
68+ ControlMode .CARTESIAN_TRPY , cfg , gripper_cfg = gripper_cfg , camera_set_cfg = cam_cfg , max_relative_movement = None
69+ )
70+ # Test double reset. Regression test. A lot can go wrong when resetting.
71+ env .reset ()
72+ env .reset ()
73+
6074 def test_zero_action_trpy (self , cfg ):
6175 """
6276 Test that a zero action does not change the state significantly
@@ -169,6 +183,24 @@ def test_collision_guard_trpy(self, cfg, gripper_cfg, cam_cfg):
169183class TestSimEnvsTquart (TestSimEnvs ):
170184 """This class is for testing Tquart sim env functionalities"""
171185
186+ def test_reset (self , cfg , gripper_cfg , cam_cfg ):
187+ """
188+ Test reset functionality.
189+ """
190+ # TODO:
191+ # - test initial pose after reset.
192+ # - test initial gripper config.
193+ env = fr3_sim_env (
194+ ControlMode .CARTESIAN_TQuart ,
195+ cfg ,
196+ gripper_cfg = gripper_cfg ,
197+ camera_set_cfg = cam_cfg ,
198+ max_relative_movement = None ,
199+ )
200+ # Test double reset. Regression test. A lot can go wrong when resetting.
201+ env .reset ()
202+ env .reset ()
203+
172204 def test_non_zero_action_tquart (self , cfg ):
173205 """
174206 Test that a zero action does not change the state significantly in the tquart configuration
@@ -271,6 +303,20 @@ def test_collision_guard_tquart(self, cfg, gripper_cfg, cam_cfg):
271303class TestSimEnvsJoints (TestSimEnvs ):
272304 """This class is for testing Joints sim env functionalities"""
273305
306+ def test_reset (self , cfg , gripper_cfg , cam_cfg ):
307+ """
308+ Test reset functionality.
309+ """
310+ # TODO:
311+ # - test initial pose after reset.
312+ # - test initial gripper config.
313+ env = fr3_sim_env (
314+ ControlMode .JOINTS , cfg , gripper_cfg = gripper_cfg , camera_set_cfg = cam_cfg , max_relative_movement = None
315+ )
316+ # Test double reset. Regression test. A lot can go wrong when resetting.
317+ env .reset ()
318+ env .reset ()
319+
274320 def test_zero_action_joints (self , cfg ):
275321 """
276322 This is for testing that a certain action leads to the expected change in state
0 commit comments