@@ -122,6 +122,8 @@ def put_model(mjm: mujoco.MjModel) -> types.Model:
122122 m .jnt_axis = wp .array (mjm .jnt_axis , dtype = wp .vec3 , ndim = 1 )
123123 m .jnt_pos = wp .array (mjm .jnt_pos , dtype = wp .vec3 , ndim = 1 )
124124 m .jnt_stiffness = wp .array (mjm .jnt_stiffness , dtype = wp .float32 , ndim = 1 )
125+ m .jnt_actfrclimited = wp .array (mjm .jnt_actfrclimited , dtype = wp .bool , ndim = 1 )
126+ m .jnt_actfrcrange = wp .array (mjm .jnt_actfrcrange , dtype = wp .vec2 , ndim = 1 )
125127 m .geom_pos = wp .array (mjm .geom_pos , dtype = wp .vec3 , ndim = 1 )
126128 m .geom_quat = wp .array (mjm .geom_quat , dtype = wp .quat , ndim = 1 )
127129 m .site_pos = wp .array (mjm .site_pos , dtype = wp .vec3 , ndim = 1 )
@@ -132,8 +134,17 @@ def put_model(mjm: mujoco.MjModel) -> types.Model:
132134 m .dof_Madr = wp .array (mjm .dof_Madr , dtype = wp .int32 , ndim = 1 )
133135 m .dof_armature = wp .array (mjm .dof_armature , dtype = wp .float32 , ndim = 1 )
134136 m .dof_damping = wp .array (mjm .dof_damping , dtype = wp .float32 , ndim = 1 )
135- m .actuator_actlimited = wp .array (mjm .actuator_actlimited , dtype = wp .int32 , ndim = 1 )
136- m .actuator_actrange = wp .array (mjm .actuator_actrange , dtype = wp .vec2f , ndim = 1 )
137+ m .actuator_trntype = wp .array (mjm .actuator_trntype , dtype = wp .int32 , ndim = 1 )
138+ m .actuator_trnid = wp .array (mjm .actuator_trnid , dtype = wp .int32 , ndim = 2 )
139+ m .actuator_ctrllimited = wp .array (mjm .actuator_ctrllimited , dtype = wp .bool , ndim = 1 )
140+ m .actuator_ctrlrange = wp .array (mjm .actuator_ctrlrange , dtype = wp .vec2 , ndim = 1 )
141+ m .actuator_forcelimited = wp .array (mjm .actuator_forcelimited , dtype = wp .bool , ndim = 1 )
142+ m .actuator_forcerange = wp .array (mjm .actuator_forcerange , dtype = wp .vec2 , ndim = 1 )
143+ m .actuator_gainprm = wp .array (mjm .actuator_gainprm , dtype = wp .float32 , ndim = 2 )
144+ m .actuator_biasprm = wp .array (mjm .actuator_biasprm , dtype = wp .float32 , ndim = 2 )
145+ m .actuator_gear = wp .array (mjm .actuator_gear , dtype = wp .spatial_vector , ndim = 1 )
146+ m .actuator_actlimited = wp .array (mjm .actuator_actlimited , dtype = wp .bool , ndim = 1 )
147+ m .actuator_actrange = wp .array (mjm .actuator_actrange , dtype = wp .vec2 , ndim = 1 )
137148 m .actuator_actadr = wp .array (mjm .actuator_actadr , dtype = wp .int32 , ndim = 1 )
138149 m .actuator_dyntype = wp .array (mjm .actuator_dyntype , dtype = wp .int32 , ndim = 1 )
139150 m .actuator_dynprm = wp .array (mjm .actuator_dynprm , dtype = types .vec10f , ndim = 1 )
@@ -167,6 +178,10 @@ def make_data(mjm: mujoco.MjModel, nworld: int = 1) -> types.Data:
167178 d .site_xmat = wp .zeros ((nworld , mjm .nsite ), dtype = wp .mat33 )
168179 d .cinert = wp .zeros ((nworld , mjm .nbody ), dtype = types .vec10 )
169180 d .cdof = wp .zeros ((nworld , mjm .nv ), dtype = wp .spatial_vector )
181+ d .ctrl = wp .zeros ((nworld , mjm .nu ), dtype = wp .float32 )
182+ d .actuator_velocity = wp .zeros ((nworld , mjm .nu ), dtype = wp .float32 )
183+ d .actuator_force = wp .zeros ((nworld , mjm .nu ), dtype = wp .float32 )
184+ d .actuator_length = wp .zeros ((nworld , mjm .nu ), dtype = wp .float32 )
170185 d .actuator_moment = wp .zeros ((nworld , mjm .nu , mjm .nv ), dtype = wp .float32 )
171186 d .crb = wp .zeros ((nworld , mjm .nbody ), dtype = types .vec10 )
172187 if support .is_sparse (mjm ):
@@ -178,7 +193,6 @@ def make_data(mjm: mujoco.MjModel, nworld: int = 1) -> types.Data:
178193 d .act_dot = wp .zeros ((nworld , mjm .na ), dtype = wp .float32 )
179194 d .act = wp .zeros ((nworld , mjm .na ), dtype = wp .float32 )
180195 d .qLDiagInv = wp .zeros ((nworld , mjm .nv ), dtype = wp .float32 )
181- d .actuator_velocity = wp .zeros ((nworld , mjm .nu ), dtype = wp .float32 )
182196 d .cvel = wp .zeros ((nworld , mjm .nbody ), dtype = wp .spatial_vector )
183197 d .cdof_dot = wp .zeros ((nworld , mjm .nv ), dtype = wp .spatial_vector )
184198 d .qfrc_bias = wp .zeros ((nworld , mjm .nv ), dtype = wp .float32 )
@@ -247,12 +261,15 @@ def tile(x):
247261 d .site_xmat = wp .array (tile (mjd .site_xmat ), dtype = wp .mat33 , ndim = 2 )
248262 d .cinert = wp .array (tile (mjd .cinert ), dtype = types .vec10 , ndim = 2 )
249263 d .cdof = wp .array (tile (mjd .cdof ), dtype = wp .spatial_vector , ndim = 2 )
250- d .actuator_moment = wp .array (tile (actuator_moment ), dtype = wp .float32 , ndim = 3 )
251264 d .crb = wp .array (tile (mjd .crb ), dtype = types .vec10 , ndim = 2 )
252265 d .qM = wp .array (tile (qM ), dtype = wp .float32 , ndim = 3 )
253266 d .qLD = wp .array (tile (qLD ), dtype = wp .float32 , ndim = 3 )
254267 d .qLDiagInv = wp .array (tile (mjd .qLDiagInv ), dtype = wp .float32 , ndim = 2 )
268+ d .ctrl = wp .array (tile (mjd .ctrl ), dtype = wp .float32 , ndim = 2 )
255269 d .actuator_velocity = wp .array (tile (mjd .actuator_velocity ), dtype = wp .float32 , ndim = 2 )
270+ d .actuator_force = wp .array (tile (mjd .actuator_force ), dtype = wp .float32 , ndim = 2 )
271+ d .actuator_length = wp .array (tile (mjd .actuator_length ), dtype = wp .float32 , ndim = 2 )
272+ d .actuator_moment = wp .array (tile (actuator_moment ), dtype = wp .float32 , ndim = 3 )
256273 d .cvel = wp .array (tile (mjd .cvel ), dtype = wp .spatial_vector , ndim = 2 )
257274 d .cdof_dot = wp .array (tile (mjd .cdof_dot ), dtype = wp .spatial_vector , ndim = 2 )
258275 d .qfrc_bias = wp .array (tile (mjd .qfrc_bias ), dtype = wp .float32 , ndim = 2 )
0 commit comments