File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ def put_model(mjm: mujoco.MjModel) -> types.Model:
64
64
65
65
# TODO(team): remove after solver._update_gradient for Newton solver utilizes tile operations for islands
66
66
nv_max = 60
67
- if mjm .nv > nv_max and ( not mjm .opt .jacobian == mujoco .mjtJacobian .mjJAC_SPARSE ) :
67
+ if mjm .nv > nv_max and mjm .opt .jacobian == mujoco .mjtJacobian .mjJAC_DENSE :
68
68
raise ValueError (f"Dense is unsupported for nv > { nv_max } (nv = { mjm .nv } )." )
69
69
70
70
# calculate some fields that cannot be easily computed inline
Original file line number Diff line number Diff line change @@ -89,11 +89,6 @@ def test_geom_type(self):
89
89
with self .assertRaises (NotImplementedError ):
90
90
mjwarp .put_model (mjm )
91
91
92
- def test_dense (self ):
93
- with self .assertRaises (ValueError ):
94
- # dense not supported yet for large nv
95
- test_util .fixture ("humanoid/n_humanoids.xml" )
96
-
97
92
def test_actuator_trntype (self ):
98
93
mjm = mujoco .MjModel .from_xml_string ("""
99
94
<mujoco>
@@ -243,6 +238,22 @@ def test_option_physical_constants(self):
243
238
with self .assertRaises (NotImplementedError ):
244
239
mjwarp .put_model (mjm )
245
240
241
+ def test_jacobian_auto (self ):
242
+ mjm = mujoco .MjModel .from_xml_string ("""
243
+ <mujoco>
244
+ <option jacobian="auto"/>
245
+ <worldbody>
246
+ <replicate count="11">
247
+ <body>
248
+ <geom type="sphere" size=".1"/>
249
+ <freejoint/>
250
+ </body>
251
+ </replicate>
252
+ </worldbody>
253
+ </mujoco>
254
+ """ )
255
+ mjwarp .put_model (mjm )
256
+
246
257
247
258
if __name__ == "__main__" :
248
259
wp .init ()
You can’t perform that action at this time.
0 commit comments