google-deepmind / mujoco
MuJoCo stands for Multi-Joint dynamics with Contact. It is a general purpose physics engine that aims to facilitate research and development in robotics, biomechanics, graphics and animation, machine learning, and other areas which demand fast and accurate simulation of articulated structures interacting with their environment. This repository is maintained by Google DeepMind.
MuJoCo 代表“多关节动力学与接触”(Multi-Joint dynamics with Contact)。它是一个通用物理引擎,旨在促进机器人、生物力学、图形与动画、机器学习以及其他需要对与环境交互的关节结构进行快速且精确模拟的领域的研究与开发。该存储库由 Google DeepMind 维护。
MuJoCo has a C API and is intended for researchers and developers. The runtime simulation module is tuned to maximize performance and operates on low-level data structures that are preallocated by the built-in XML compiler. The library includes interactive visualization in native desktop windows and web browsers. MuJoCo further exposes a large number of utility functions for computing physics-related quantities. We also provide Python bindings and a plug-in for the Unity game engine.
MuJoCo 拥有 C API,面向研究人员和开发人员。其运行时模拟模块经过调优以实现性能最大化,并运行在由内置 XML 编译器预分配的底层数据结构上。该库包含可在原生桌面窗口和 Web 浏览器中运行的交互式可视化功能。此外,MuJoCo 还提供了大量用于计算物理相关量的实用函数。我们还提供 Python 绑定以及适用于 Unity 游戏引擎的插件。
Documentation MuJoCo’s documentation can be found at mujoco.readthedocs.io. Upcoming features due for the next release can be found in the changelog in the “latest” branch.
文档:MuJoCo 的文档可在 mujoco.readthedocs.io 找到。下一版本即将推出的功能可在“latest”分支的更新日志中查看。
Getting Started Try MuJoCo in your browser. Visit mujoco.org to explore MuJoCo on desktop or mobile with nothing to install, or open live.mujoco.org to inspect and drag and drop your own models in the WebAssembly version of the MuJoCo Studio app (slower than native C, since it runs in WebAssembly). Run a viewer on your machine. Follow the Getting Started guide in the documentation to download a prebuilt release and run the MuJoCo Studio app or the classic simulate viewer (shown in this video) on your machine.
入门:在浏览器中尝试 MuJoCo。访问 mujoco.org 即可在桌面或移动设备上探索 MuJoCo,无需安装任何内容;或者打开 live.mujoco.org,在 WebAssembly 版本的 MuJoCo Studio 应用中检查并拖放您自己的模型(由于在 WebAssembly 中运行,速度比原生 C 语言慢)。在您的机器上运行查看器。按照文档中的入门指南下载预构建版本,并在您的机器上运行 MuJoCo Studio 应用或经典模拟查看器(如本视频所示)。
Explore our online IPython notebooks. If you are a Python user, you might want to start with our tutorial notebooks running on Google Colab: The introductory tutorial teaches MuJoCo basics: The Model Editing tutorial shows how to create and edit models procedurally: The rollout tutorial shows how to use the multithreaded rollout module: The LQR tutorial synthesizes a linear-quadratic controller, balancing a humanoid on one leg: The least-squares tutorial explains how to use the Python-based nonlinear least-squares solver: The MJX tutorial provides usage examples of MuJoCo XLA, a branch of MuJoCo written in JAX: The differentiable physics tutorial trains locomotion policies with analytical gradients automatically derived from MuJoCo’s physics step:
探索我们的在线 IPython 笔记本。如果您是 Python 用户,可以从我们在 Google Colab 上运行的教程笔记本开始:入门教程教授 MuJoCo 基础知识;模型编辑教程展示如何以程序化方式创建和编辑模型;Rollout 教程展示如何使用多线程 Rollout 模块;LQR 教程合成了一个线性二次型控制器,使人形机器人单腿保持平衡;最小二乘法教程解释了如何使用基于 Python 的非线性最小二乘求解器;MJX 教程提供了 MuJoCo XLA(MuJoCo 的 JAX 编写分支)的使用示例;可微物理教程训练运动策略,并使用从 MuJoCo 物理步骤自动导出的解析梯度。
Installation Prebuilt binaries Versioned releases are available as precompiled binaries from the GitHub releases page, built for Linux (x86-64 and AArch64), Windows (x86-64 only), and macOS (universal). This is the recommended way to use the software. Building from source Users who wish to build MuJoCo from source should consult the build from source section of the documentation. However, note that the commit at the tip of the main branch may be unstable.
安装:预构建二进制文件。版本化发布版本可作为预编译二进制文件从 GitHub 发布页面获取,适用于 Linux (x86-64 和 AArch64)、Windows (仅 x86-64) 和 macOS (通用)。这是使用该软件的推荐方式。从源代码构建:希望从源代码构建 MuJoCo 的用户应查阅文档中的“从源代码构建”部分。但请注意,主分支顶端的提交可能不稳定。
Python (>= 3.11) The native Python bindings, which come pre-packaged with a copy of MuJoCo, can be installed from PyPI via: pip install mujoco Note that Pre-built Linux wheels target manylinux2014, see here for compatible distributions. For more information such as building the bindings from source, see the Python bindings section of the documentation.
Python (>= 3.11):原生 Python 绑定随附 MuJoCo 的副本,可通过 PyPI 安装:pip install mujoco。请注意,预构建的 Linux wheel 针对 manylinux2014,兼容的发行版请见此处。有关从源代码构建绑定等更多信息,请参阅文档中的 Python 绑定部分。
Versioning We aim to release MuJoCo in the first week of each month. Our versioning standards changed to modified Semantic Versioning in 3.5.0, see versioning for details.
版本控制:我们的目标是在每月的第一周发布 MuJoCo。我们的版本控制标准在 3.5.0 版本中更改为修改后的语义版本控制,详情请参阅版本控制说明。
Contributing We welcome community engagement: questions, requests for help, bug reports and feature requests. To read more about bug reports, feature requests and more ambitious contributions, please see our contributors guide and style guide. Asking Questions Questions and requests for help are welcome as a GitHub “Asking for Help” Discussion and should focus on a specific problem or question. Bug reports and feature requests GitHub Issues are reserved for bug reports, feature requests and other development-related subjects.
贡献:我们欢迎社区参与:提问、寻求帮助、报告错误和提出功能请求。要了解有关错误报告、功能请求和更宏大贡献的更多信息,请参阅我们的贡献者指南和风格指南。提问:欢迎通过 GitHub 的“Asking for Help”讨论区进行提问和寻求帮助,问题应集中在具体的难题或疑问上。错误报告和功能请求:GitHub Issues 仅用于错误报告、功能请求和其他与开发相关的主题。
Related software MuJoCo is the backbone for numerous environment packages. Below we list several bindings and converters. Bindings These packages give users of various languages access to MuJoCo functionality: First-party bindings: Python bindings dm_control, Google DeepMind’s related environment stack, includes PyMJCF, a module for procedural manipulation of MuJoCo models. JavaScript bindings and WebAssembly support (inspired stillonearth and zalo’s community projects; mjswan extends these with real-time policy control, interactive force application, and more). C# bindings and Unity plug-in.
相关软件:MuJoCo 是众多环境包的基石。下面我们列出了一些绑定和转换器。绑定:这些包使不同语言的用户能够访问 MuJoCo 的功能。第一方绑定:Python 绑定;dm_control(Google DeepMind 相关的环境栈),包含 PyMJCF(一个用于程序化操作 MuJoCo 模型的模块);JavaScript 绑定和 WebAssembly 支持(受 stillonearth 和 zalo 的社区项目启发;mjswan 在此基础上扩展了实时策略控制、交互式力应用等功能);C# 绑定和 Unity 插件。
Third-party bindings: MATLAB Simulink: Simulink Blockset for MuJoCo Simulator by Manoj Velmurugan. Swift: swift-mujoco. Java: mujoco-java. Julia: MuJoCo.jl. Rust: MuJoCo-rs.
第三方绑定:MATLAB Simulink(Manoj Velmurugan 开发的 MuJoCo 模拟器 Simulink 模块集);Swift (swift-mujoco);Java (mujoco-java);Julia (MuJoCo.jl);Rust (MuJoCo-rs)。
Converters OpenSim: MyoConverter converts OpenSim models to MJCF. SDFormat: gz-mujoco is a two-way SDFormat <-> MJCF conversion tool. OBJ: obj2mjcf a script for converting composite OBJ files into a loadable MJCF model. onshape: Onshape to Robot Converts onshape CAD assemblies to MJCF.
转换器:OpenSim(MyoConverter 将 OpenSim 模型转换为 MJCF);SDFormat(gz-mujoco 是一个双向 SDFormat <-> MJCF 转换工具);OBJ(obj2mjcf 是一个将复合 OBJ 文件转换为可加载 MJCF 模型的脚本);onshape(Onshape to Robot 将 Onshape CAD 装配体转换为 MJCF)。
Citation If you use MuJoCo for published research, please cite: @inproceedings{todorov2012mujoco, title={MuJoCo: A physics engine for model-based control}, author={Todorov, Emanuel and Erez, Tom and Tassa, Yuval}, booktitle={2012 IEEE/RSJ International Conference on Intelligent Robots and Systems}, pages={5026—5033}, year={2012}, organization={IEEE}, doi={10.1109/IROS.2012.6386109} }
引用:如果您在已发表的研究中使用 MuJoCo,请引用:@inproceedings{todorov2012mujoco, title={MuJoCo: A physics engine for model-based control}, author={Todorov, Emanuel and Erez, Tom and Tassa, Yuval}, booktitle={2012 IEEE/RSJ International Conference on Intelligent Robots and Systems}, pages={5026—5033}, year={2012}, organization={IEEE}, doi={10.1109/IROS.2012.6386109} }
License and Disclaimer Copyright 2021 DeepMind Technologies Limited. Box collision code (engine_collision_box.c) is Copyright 2016 Svetoslav Kolev. ReStructuredText documents, images, and videos in the doc directory are made available under the terms of the Creative Commons Attribution 4.0 (CC BY 4.0) license. You may obtain a copy of the License at https://creativecommons.org/licenses/by/4.0/legalcode. Source code is licensed under the Apache License, Version 2.0. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0. This is not an officially supported Google product.
许可与免责声明:版权所有 2021 DeepMind Technologies Limited。盒碰撞代码 (engine_collision_box.c) 版权所有 2016 Svetoslav Kolev。doc 目录下的 ReStructuredText 文档、图像和视频均根据知识共享署名 4.0 (CC BY 4.0) 许可协议提供。您可以在 https://creativecommons.org/licenses/by/4.0/legalcode 获取许可副本。源代码根据 Apache License, Version 2.0 授权。您可以在 https://www.apache.org/licenses/LICENSE-2.0 获取许可副本。本产品并非 Google 官方支持的产品。