openai / mujoco-py

MuJoCo is a physics engine for detailed, efficient rigid body simulations with contacts. mujoco-py allows using MuJoCo from Python 3.
Other
2.81k stars 810 forks source link

mujoco_py: How to implement mjcb_act_gain #701

Open r226319 opened 2 years ago

r226319 commented 2 years ago

Hi Guys,

I would like to implement a custom gain function. In raw MuJoCo it would be about writing a piece of code for the mjcb_act_gain callback. I guess that in the mujoco_py is not the case.

In the documentation of mujoco_py, I found that I can access to MuJoCo by raw cython declaration. I dig a little into the code and I found callback function types for actuators dynamics, gain and bias in mjdata.pxd file, probably giving an opportunity to solve my problem. Unfortunately, I have no idea how I should use them.

Did anyone try to do that or can point me in the right direction for solving this problem?

Thanks!