Proper way to control the actuator via python? #237
-
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
I wonder if it is due to
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
I haven't really used the named accessors yet, but the ctrl field of the actuator view may not have been intended to be written into.
You can then assign values to the ctrl field like you used to, i.e.
|
Beta Was this translation helpful? Give feedback.
-
You are using it correctly (or at least how I intended for it to be used). This is a bug in the Python bindings. I'm going to create an issue to track this bug, thanks for bringing it up! |
Beta Was this translation helpful? Give feedback.
-
Thank you @saran-t for the quick fix! As your accepted answer, I followed Building from source, and here are some sidenotes I think might be helpful for revealing some details not addressed in the doc:
My work environment is Ubuntu 20.04 with Python 3.8. The aforementioned steps lead me successfully solved the issue. Besides, I confirmed that @JeanElsner's circumvention is helpful for those who prefer an official release, thank you as well. |
Beta Was this translation helpful? Give feedback.
You are using it correctly (or at least how I intended for it to be used). This is a bug in the Python bindings. I'm going to create an issue to track this bug, thanks for bringing it up!