You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by DrawZeroPoint April 12, 2022
Dear MuJoCo developers,
I am using the 2.1.4 version python binding of MuJoCo to control actuators with codes. So far, I encountered an odd issue that may be due to my improper way to use the API, so any suggestions are gratefully appreciated.
where I can confirm that _data is initialized and contains the actuator; cmd is a plain float number. Oddly, the second line gives the error:
IndexError: too many indices for array: array is 0-dimensional, but 1 were indexed
I wonder if it is due to .ctrl should not be used in this way? What I planned to do is to assign the control value cmd to the actuator.
Previously with mujoco-py, I did the same thing like this:
self.sim.data.ctrl[actuator_id] = cmd
```</div>
The text was updated successfully, but these errors were encountered:
saran-t
changed the title
Proper way to control the actuator via python?
Cannot assign to .ctrl via named indexers
Apr 12, 2022
NumPy arrays with an empty shape cannot be assigned via the usual syntax.
Fixes: google-deepmind#238.
Related: google-deepmind#237.
PiperOrigin-RevId: 441265437
Change-Id: Ib0de22c83f9babe9a97682dc5a32660c198ad68c
NumPy arrays with an empty shape cannot be assigned via the usual syntax.
Fixes: google-deepmind#238.
Related: google-deepmind#237.
PiperOrigin-RevId: 441265437
Change-Id: Ib0de22c83f9babe9a97682dc5a32660c198ad68c
Discussed in #237
Originally posted by DrawZeroPoint April 12, 2022
Dear MuJoCo developers,
I am using the 2.1.4 version python binding of MuJoCo to control actuators with codes. So far, I encountered an odd issue that may be due to my improper way to use the API, so any suggestions are gratefully appreciated.
The simplified code I am using is like this:
where I can confirm that
_data
is initialized and contains the actuator;cmd
is a plain float number. Oddly, the second line gives the error:IndexError: too many indices for array: array is 0-dimensional, but 1 were indexed
I wonder if it is due to
.ctrl
should not be used in this way? What I planned to do is to assign the control valuecmd
to the actuator.Previously with mujoco-py, I did the same thing like this:
The text was updated successfully, but these errors were encountered: