Derivatives for MuJoCo
Project description
Numerical derivatives of dynamics for mujoco
Forked from https://github.com/wecacuee/mujoco_py_deriv
- Needs mujoco licence to run.
- Wraps derivative.cpp to call from Python.
Installation
- Install mujoco_py
pip install mujoco-py-derivatives
Usage
Prepare mujoco model.
import mujoco_py as mj
from mujoco_py_derivatives import MjDerivative, checkderiv
# Prepare mujoco model and data
model = mj.load_model_from_path("flat_pusher_sample.xml")
sim = mj.MjSim(model, nsubsteps=nstep)
dmain = sim.data
Compute numerical derivative
# To compute δf/δx
f = ["qacc"]
x = ["qfrc_applied", "qvel", "qpos"]
deriv_obj = MjDerivative(model, dmain, f, x)
deriv = deriv_obj.compute()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mujoco-py-derivatives-0.1.4.tar.gz
(153.3 kB
view hashes)
Close
Hashes for mujoco-py-derivatives-0.1.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e27ed21d79f92b5287afb1efa32d62e1f72f4defe9e949e6d8082fa9086f75c |
|
MD5 | 76b9340fafe404d6270f5d0ba46ce67a |
|
BLAKE2b-256 | dd9a313ee0790b2077934689b1c19b09ba982ff765330ad31e5711870e08efb9 |