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
Close
Hashes for mujoco-py-derivatives-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d026e485a4f43eb9ad674eb4bfd05961582ede3451b8c065661d5403c07485b4 |
|
MD5 | 5294d2c16ce6c680d6039c1f488b9202 |
|
BLAKE2b-256 | d2c78e9d9560c8e54b324c9cbbf1e4a6547c8112eb6ee65beb0e2f26b16b0b3b |