Skip to main content

A general Python interface class for robot simulations using MuJoCo.

Project description

MuJoCo Robot

🚧 Work in progress.

A general Python interface for robot simulations using MuJoCo. Its public API mirrors pybullet_robot so that controllers written against that backend can be run here with minimal changes.

MujocoRobot gives you a single object to load, introspect, control, and read state from a robot, implemented directly on MjModel + MjData.

Installation

Requires Python >= 3.10 and mujoco >= 3.2.

From source

git clone https://github.com/justagist/mujoco_robot
cd mujoco_robot
pip install -e .

Development

pip install -e ".[dev]"   # test + lint + build tooling
ruff check .
pytest -q

Design notes

  • Quaternions: the external API uses [x, y, z, w] (scipy convention); values are converted to MuJoCo's [w, x, y, z] only at the boundary.
  • Angles: joint positions, velocities, and limits are in radians. A compiled model always stores radians regardless of the MJCF compiler angle setting, so no conversion is done.
  • Backend: pure MjModel + MjData (no client-server). Pass an existing (model, data) to wrap a robot that is already part of a scene.
  • End-effector frame: a body by default; a site can be used optionally.
  • Control: writes data.ctrl when the model has actuators, otherwise falls back to data.qfrc_applied with a Python PD loop.
  • Fixed vs floating base: a structural free joint (added via MjSpec), not a load-time flag.

Status

Work in progress, built up in phases. Panda (from robot_descriptions) is the reference test robot.

License

MIT (c) Saif Sidhik

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_robot-0.0.1.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mujoco_robot-0.0.1-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

Details for the file mujoco_robot-0.0.1.tar.gz.

File metadata

  • Download URL: mujoco_robot-0.0.1.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mujoco_robot-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6952824d6c1d19a9e36442c0de8593dcc807ebbd66517153548f87853e5ba856
MD5 e51a239a71bb3d1fdaea66f2bf96bdd3
BLAKE2b-256 ead4caa276445dcd181a978d57d066e8213d1379d0f0ef4b31f7c96d6e581705

See more details on using hashes here.

Provenance

The following attestation bundles were made for mujoco_robot-0.0.1.tar.gz:

Publisher: publish.yml on justagist/mujoco_robot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mujoco_robot-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: mujoco_robot-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 20.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mujoco_robot-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d40762caeec65788e7238871ad2e973d64d33ab57f4f28704ec5cd1704236125
MD5 d604c1c65960b8b6812a38cb0c40f217
BLAKE2b-256 965a28dbda80f5a6a9366ef5af4400ab2a510e6c3036443bf8e9aee506048a7e

See more details on using hashes here.

Provenance

The following attestation bundles were made for mujoco_robot-0.0.1-py3-none-any.whl:

Publisher: publish.yml on justagist/mujoco_robot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page