google-deepmind / mujoco

Multi-Joint dynamics with Contact. A general purpose physics simulator.
https://mujoco.org
Apache License 2.0
7.47k stars 734 forks source link

[Unity plugin] Add kv property for position actuators #1694

Closed StafaH closed 3 weeks ago

StafaH commented 1 month ago

In Mujoco 3.1.0, the kv attribute was added for position actuators. This is currently still missing from the Unity plugin, which only looks for kp in the Custom Params for a position actuator. Can this be added in the plugin?

Fix should be minimal, adding kv as a GUI element when position actuator is selected, and adding the get/set for the attribute in PositionToMjcf and PositionFromMjcf. A variable for kv already exists for velocity controllers.

Balint-H commented 1 month ago

Hello, thanks for reporting this! This is simple enough fix, I can do it in the next couple of days.

Balint-H commented 1 month ago

Just submitted #1696 to address this, thanks for the patience!