File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed
Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,8 @@ def next_activation(
4949
5050 # get the high/low range for each actuator state
5151 limited = m .actuator_actlimited [actid ]
52- range_low = wp .select (limited , - wp .inf , m .actuator_actrange [actid , 0 ])
53- range_high = wp .select (limited , wp .inf , m .actuator_actrange [actid , 1 ])
52+ range_low = wp .select (limited , - wp .inf , m .actuator_actrange [actid ][ 0 ])
53+ range_high = wp .select (limited , wp .inf , m .actuator_actrange [actid ][ 1 ])
5454
5555 # get the actual actuation - skip if -1 (means stateless actuator)
5656 act_adr = m .actuator_actadr [actid ]
@@ -65,7 +65,7 @@ def next_activation(
6565
6666 # check dynType
6767 dyn_type = m .actuator_dyntype [actid ]
68- dyn_prm = m .actuator_dynprm [actid , 0 ]
68+ dyn_prm = m .actuator_dynprm [actid ][ 0 ]
6969
7070 # advance the actuation
7171 if dyn_type == 3 : # wp.static(WarpDynType.FILTEREXACT):
Original file line number Diff line number Diff line change @@ -132,6 +132,11 @@ def put_model(mjm: mujoco.MjModel) -> types.Model:
132132 m .dof_Madr = wp .array (mjm .dof_Madr , dtype = wp .int32 , ndim = 1 )
133133 m .dof_armature = wp .array (mjm .dof_armature , dtype = wp .float32 , ndim = 1 )
134134 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_actadr = wp .array (mjm .actuator_actadr , dtype = wp .int32 , ndim = 1 )
138+ m .actuator_dyntype = wp .array (mjm .actuator_dyntype , dtype = wp .int32 , ndim = 1 )
139+ m .actuator_dynprm = wp .array (mjm .actuator_dynprm , dtype = types .vec10f , ndim = 1 )
135140
136141 return m
137142
Original file line number Diff line number Diff line change @@ -107,10 +107,10 @@ class Model:
107107 dof_armature : wp .array (dtype = wp .float32 , ndim = 1 )
108108 dof_damping : wp .array (dtype = wp .float32 , ndim = 1 )
109109 actuator_actlimited : wp .array (dtype = wp .int32 , ndim = 1 )
110- actuator_actrange : wp .array (dtype = wp .float32 , ndim = 2 )
110+ actuator_actrange : wp .array (dtype = wp .vec2f , ndim = 1 )
111111 actuator_actadr : wp .array (dtype = wp .int32 , ndim = 1 )
112112 actuator_dyntype : wp .array (dtype = wp .int32 , ndim = 1 )
113- actuator_dynprm : wp .array (dtype = wp . float32 , ndim = 2 )
113+ actuator_dynprm : wp .array (dtype = vec10f , ndim = 1 )
114114
115115
116116@wp .struct
You can’t perform that action at this time.
0 commit comments