@@ -47,7 +47,8 @@ class UiAgentTest(absltest.TestCase):
4747 def test_stepping_on_agent_side (self ):
4848 """Test an alternative way of stepping the physics, on the agent side."""
4949 model_path = (
50- pathlib .Path (__file__ ).parent .parent .parent / "mjpc/tasks/cartpole/task.xml"
50+ pathlib .Path (__file__ ).parent .parent .parent
51+ / "build/mjpc/tasks/cartpole/task.xml"
5152 )
5253 model = mujoco .MjModel .from_xml_path (str (model_path ))
5354 data = mujoco .MjData (model )
@@ -66,7 +67,9 @@ def test_stepping_on_agent_side(self):
6667 data .qvel = state .qvel
6768 data .act = state .act
6869 data .mocap_pos = np .array (state .mocap_pos ).reshape (data .mocap_pos .shape )
69- data .mocap_quat = np .array (state .mocap_quat ).reshape (data .mocap_quat .shape )
70+ data .mocap_quat = np .array (state .mocap_quat ).reshape (
71+ data .mocap_quat .shape
72+ )
7073 data .userdata = np .array (state .userdata ).reshape (data .userdata .shape )
7174 observations .append (get_observation (model , data ))
7275
@@ -77,7 +80,8 @@ def test_stepping_on_agent_side(self):
7780
7881 def test_set_cost_weights (self ):
7982 model_path = (
80- pathlib .Path (__file__ ).parent .parent .parent / "mjpc/tasks/cartpole/task.xml"
83+ pathlib .Path (__file__ ).parent .parent .parent
84+ / "build/mjpc/tasks/cartpole/task.xml"
8185 )
8286 model = mujoco .MjModel .from_xml_path (str (model_path ))
8387
@@ -106,7 +110,8 @@ def test_set_cost_weights(self):
106110
107111 def test_get_cost_weights (self ):
108112 model_path = (
109- pathlib .Path (__file__ ).parent .parent .parent / "mjpc/tasks/cartpole/task.xml"
113+ pathlib .Path (__file__ ).parent .parent .parent
114+ / "build/mjpc/tasks/cartpole/task.xml"
110115 )
111116 model = mujoco .MjModel .from_xml_path (str (model_path ))
112117
@@ -137,7 +142,7 @@ def test_get_cost_weights(self):
137142 def test_set_state_with_lists (self ):
138143 model_path = (
139144 pathlib .Path (__file__ ).parent .parent .parent
140- / "mjpc/tasks/particle/task_timevarying.xml"
145+ / "build/ mjpc/tasks/particle/task_timevarying.xml"
141146 )
142147 model = mujoco .MjModel .from_xml_path (str (model_path ))
143148 data = mujoco .MjData (model )
@@ -156,7 +161,8 @@ def test_set_state_with_lists(self):
156161
157162 def test_set_get_mode (self ):
158163 model_path = (
159- pathlib .Path (__file__ ).parent .parent .parent / "mjpc/tasks/cartpole/task.xml"
164+ pathlib .Path (__file__ ).parent .parent .parent
165+ / "build/mjpc/tasks/cartpole/task.xml"
160166 )
161167 model = mujoco .MjModel .from_xml_path (str (model_path ))
162168 with self .get_agent (task_id = "Cartpole" , model = model ) as agent :
@@ -167,7 +173,7 @@ def test_set_get_mode(self):
167173 def test_get_set_mode (self ):
168174 model_path = (
169175 pathlib .Path (__file__ ).parent .parent .parent
170- / "mjpc/tasks/quadruped/task_flat.xml"
176+ / "build/ mjpc/tasks/quadruped/task_flat.xml"
171177 )
172178 model = mujoco .MjModel .from_xml_path (str (model_path ))
173179 with self .get_agent (task_id = "Quadruped Flat" , model = model ) as agent :
@@ -178,7 +184,7 @@ def test_get_set_mode(self):
178184 def test_set_mode_error (self ):
179185 model_path = (
180186 pathlib .Path (__file__ ).parent .parent .parent
181- / "mjpc/tasks/quadruped/task_flat.xml"
187+ / "build/ mjpc/tasks/quadruped/task_flat.xml"
182188 )
183189 model = mujoco .MjModel .from_xml_path (str (model_path ))
184190 with self .get_agent (task_id = "Quadruped Flat" , model = model ) as agent :
0 commit comments