@@ -908,7 +908,7 @@ def _tendon_armature(
908908 if is_sparse : # is_sparse is not batched
909909 madr_ij = dof_Madr [dofid ]
910910
911- armature = tendon_armature [worldid , tenid ]
911+ armature = tendon_armature [worldid % tendon_armature . shape [ 0 ] , tenid ]
912912
913913 if armature == 0.0 :
914914 return
@@ -1321,7 +1321,7 @@ def _cfrc_ext_equality(
13211321 )
13221322
13231323 id = efc_id_in [worldid , efcid ]
1324- eq_data_ = eq_data [worldid , id ]
1324+ eq_data_ = eq_data [worldid % eq_data . shape [ 0 ] , id ]
13251325 body_semantic = eq_objtype [id ] == ObjType .BODY
13261326
13271327 obj1 = eq_obj1id [id ]
@@ -1342,7 +1342,7 @@ def _cfrc_ext_equality(
13421342 else :
13431343 offset = wp .vec3 (eq_data_ [3 ], eq_data_ [4 ], eq_data_ [5 ])
13441344 else :
1345- offset = site_pos [worldid , obj1 ]
1345+ offset = site_pos [worldid % site_pos . shape [ 0 ] , obj1 ]
13461346
13471347 # transform point on body1: local -> global
13481348 pos = xmat_in [worldid , bodyid1 ] @ offset + xpos_in [worldid , bodyid1 ]
@@ -1364,7 +1364,7 @@ def _cfrc_ext_equality(
13641364 else :
13651365 offset = wp .vec3 (eq_data_ [0 ], eq_data_ [1 ], eq_data_ [2 ])
13661366 else :
1367- offset = site_pos [worldid , obj2 ]
1367+ offset = site_pos [worldid % site_pos . shape [ 0 ] , obj2 ]
13681368
13691369 # transform point on body2: local -> global
13701370 pos = xmat_in [worldid , bodyid2 ] @ offset + xpos_in [worldid , bodyid2 ]
@@ -1559,7 +1559,7 @@ def _tendon_dot(
15591559):
15601560 worldid , tenid = wp .tid ()
15611561
1562- armature = tendon_armature [worldid , tenid ]
1562+ armature = tendon_armature [worldid % tendon_armature . shape [ 0 ] , tenid ]
15631563 if armature == 0.0 :
15641564 return
15651565
@@ -1717,7 +1717,7 @@ def _tendon_bias_coef(
17171717):
17181718 worldid , tenid , dofid = wp .tid ()
17191719
1720- armature = tendon_armature [worldid , tenid ]
1720+ armature = tendon_armature [worldid % tendon_armature . shape [ 0 ] , tenid ]
17211721 if armature == 0.0 :
17221722 return
17231723
@@ -1741,7 +1741,7 @@ def _tendon_bias_qfrc(
17411741):
17421742 worldid , tenid , dofid = wp .tid ()
17431743
1744- armature = tendon_armature [worldid , tenid ]
1744+ armature = tendon_armature [worldid % tendon_armature . shape [ 0 ] , tenid ]
17451745 if armature == 0.0 :
17461746 return
17471747
@@ -2078,7 +2078,7 @@ def _transmission(
20782078 siteid = trnid [0 ]
20792079 refid = trnid [1 ]
20802080
2081- gear = actuator_gear [worldid , actid ]
2081+ gear = actuator_gear [actuator_gear_id , actid ]
20822082 site_quat_id = worldid % site_quat .shape [0 ]
20832083 gear_translation = wp .spatial_top (gear )
20842084 gear_rotational = wp .spatial_bottom (gear )
@@ -2943,7 +2943,7 @@ def _spatial_geom_tendon(
29432943 # get geom information
29442944 geom_xpos = geom_xpos_in [worldid , wrap_objid_geom ]
29452945 geom_xmat = geom_xmat_in [worldid , wrap_objid_geom ]
2946- geomsize = geom_size [worldid , wrap_objid_geom ][0 ]
2946+ geomsize = geom_size [worldid % geom_size . shape [ 0 ] , wrap_objid_geom ][0 ]
29472947 geom_type = wrap_type [wrap_adr ]
29482948
29492949 # get body ids for site-geom-site instances
0 commit comments