# MuJoCo MPC picks its planner per problem, and calls itself a research prototype

> MuJoCo MPC is Google DeepMind's interactive framework for real-time predictive control on MuJoCo models, built around multiple shooting so that iLQG, gradient descent and derivative-free Predictive Sampling all solve the same problem under one interface. Its build pins clang-12 and an untested platform matrix, its gRPC service costs 10 to 20 minutes to fetch, and the README says outright that it is not production-quality software.

**google-deepmind/mujoco_mpc** — Real-time behaviour synthesis with MuJoCo, using Predictive Control

- Repository: https://github.com/google-deepmind/mujoco_mpc
- Website: https://github.com/deepmind/mujoco_mpc
- Stars: 1,760 · Forks: 286
- Language: C++
- License: Apache-2.0
- Published: 2026-10-16 · Updated: 2026-10-16 · Language: en
- Canonical page: https://hysenlabs.com/projects/google-deepmind-mujoco-mpc

## Multiple shooting is the frame, and the planners plug into it

MJPC is an interactive application and software framework for real-time predictive control with MuJoCo, developed by Google DeepMind, whose stated aim is to let users easily author and solve complex robotics tasks.

The technical decision that shapes the whole framework is that it currently supports multiple shooting-based planners. That framing explains the planner list. Derivative-based methods include iLQG and Gradient Descent, while derivative-free methods include a simple yet very competitive planner called Predictive Sampling.

Predictive Sampling is the one worth pausing on. A derivative-free method needs no gradients, which means it works on problems where the dynamics are not differentiable, are only available through a simulator that gives you numbers rather than Jacobians, or are simply too awkward to derive. The README's claim that it is competitive with the gradient methods is a claim about quality, not about speed, and the framework's value is that you can test that claim on your own task rather than taking it on trust.

The example tasks show the range the authors had in mind. There is a quadruped task, bimanual manipulation, a Rubik's cube 10-move unscramble, and humanoid motion-capture tracking. Those are four quite different problems: locomotion, contact-rich manipulation, combinatorial sequencing, and imitation from human motion. A framework that handles all four through one planner interface is doing something more general than tuning one controller.

The written description of the method is an arXiv preprint at 2212.00541, and there are three talks linked, including one at the MIT Robotics Seminar in December 2022 and a more recent one in December 2023 at the IEEE Technical Committee on Model-Based Optimization.

## The build pins clang-12 and a platform matrix nobody tests

Installation is a source build, and the README is unusually explicit about what is and is not supported.

MJPC is tested with Ubuntu 20.04 and macOS-12. In principle other versions and Windows should work, but these are not tested. That sentence is the first thing to internalise, because the build instructions that follow encode the tested platforms exactly.

On macOS the prerequisites are Xcode plus ninja and zlib, installed through Homebrew. On Ubuntu 20.04 the package list is longer and more telling, since it pins a compiler version:

```sh
sudo apt-get update && sudo apt-get install cmake libgl1-mesa-dev libxinerama-dev libxcursor-dev libxrandr-dev libxi-dev ninja-build zlib1g-dev clang-12
```

clang-12 rather than the default compiler is a deliberate choice, and the CMake configure line for Ubuntu makes it explicit by setting both the C and C++ compilers. The Mesa and X11 development packages are there for the GUI, and ninja-build is required because the generator flag selects it.

The configure step differs by platform in exactly one place, the compiler:

```sh
cmake .. -DCMAKE_BUILD_TYPE:STRING=Release -G Ninja -DMJPC_BUILD_GRPC_SERVICE:BOOL=ON
```

with the CMAKE_C_COMPILER and CMAKE_CXX_COMPILER set to the clang-12 pair on Ubuntu. After that you build and run from the bin directory:

```sh
cmake --build . --config=Release
cd bin
./mjpc
```

The MJPC_BUILD_GRPC_SERVICE flag is on by default in these instructions, and the README attaches a warning to it: gRPC is a large dependency and can take 10 to 20 minutes to initially download. For someone who wants to look at the GUI, that is a two-minute curiosity becoming a twenty-minute build. If you do not need the service, turning it off at configure time is the obvious lever.

The README also recommends VSCode with the CMake Tools and C/C++ extensions, and the same clang-12 requirement applies there, along with building the mjpc target in release mode rather than the VSCode default of debug.

## The Python API is experimental and says so twice

There is a Python API, and the README's framing of it is more cautious than the framing of anything else in the file.

It is described as simple, and then immediately qualified as experimental and as expecting some more experience from its users. The specific hazard is named: correct usage requires that the model, defined in Python, and the MJPC task, meaning the residual and transition functions defined in C++, are compatible with each other. Currently the Python API does not provide any particular error handling for verifying this compatibility, and it may be difficult to debug without more in-depth knowledge about MuJoCo and MJPC.

That is a specific and believable failure mode rather than a generic warning. A model defined in Python and a task implemented in C++ have to agree, and nothing checks that they do. When they disagree you get behaviour you have to diagnose with knowledge of both layers.

The installation follows the C++ build, since the Python module wraps the built library. You need Python 3.10, and the README suggests optionally creating a conda environment pinned to that version. Then you install MuJoCo itself with pip, change into the python directory, and install the module:

```sh
pip install mujoco
cd python
python setup.py install
```

The test of whether it worked is a specific script:

```sh
python "mujoco_mpc/agent_test.py"
```

Example scripts live in the demos directory, and one of them runs the MJPC GUI application using MuJoCo's passive viewer via Python, which is a useful way to check that the GUI and the Python layer talk to each other.

One piece of troubleshooting advice is worth repeating because it saves a long debugging session. If the installation fails or is terminated prematurely, the recommendation is to delete the MJPC build directory and start from scratch, because the build will likely be corrupted, and additionally to delete the files generated during installation from the python directory. Partial builds leaving stale state is a common failure mode, and this project tells you to nuke rather than repair.

## What the README says when you ask whether it is ready

There is a Known Issues section, and the sentence that begins it is the most important line in the README for anyone considering production use.

MJPC is not production-quality software, it is a research prototype. There are likely to be missing features and outright bugs. That is the project describing itself, not a reviewer's assessment, and it should end any evaluation for a production control system.

There is also a licence and disclaimer section, separate from the Apache-2.0 licence the project is released under, and the repository carries CITATION.bib and CITATION.cff files. The citation files matter more than they might appear for a research prototype: this software exists partly as an artifact attached to published work, and the preprint describes the method rather than the tool.

The repository layout is small and honest about the split. There is a CMakeLists.txt with a cmake/ directory for build logic, mjpc/ for the C++ application, python/ for the bindings and demos, and docs/ holding the GUI dive, an overview document on predictive control, and a contributing guide. The README links to those documents rather than duplicating them, which is the right structure for a project whose README has to stay short.

On maintenance, the repository is not archived and the last push was on 2026-10-07, so the code is moving. The release history is thin: v0.0.1 in January 2024 and v0.1.0 in February 2024. A project that is still pushing but has not tagged a release since early 2024 is telling you that versioning is not where its effort goes, which is consistent with the research prototype framing.

## Conclusion

Adopt MuJoCo MPC if you are prototyping robot control and want to compare a gradient-based planner against a derivative-free one on the same task, since that comparison is what the framework is built to enable. Do not adopt it as production control software, because the README labels it a research prototype with missing features and outright bugs. Verify first the toolchain, since the documented build pins clang-12 and is tested only on Ubuntu 20.04 and macOS-12, with other versions and Windows expected to work but not tested, and check whether you actually need the gRPC service enabled at configure time given the stated 10 to 20 minute initial download.

## FAQ

### How do I build MuJoCo MPC from source?

Clone the repository, create a build directory, and configure with CMake using Ninja and Release, setting the compiler to clang-12 on Ubuntu. Then run cmake --build . --config=Release and launch the GUI from bin with ./mjpc.

### Which planners does MuJoCo MPC support?

It supports multiple shooting-based planners. The derivative-based methods include iLQG and Gradient Descent, and the derivative-free method is Predictive Sampling, which the README describes as simple yet very competitive.

### Is MuJoCo MPC suitable for production use?

No, according to its own README, which says MJPC is not production-quality software but a research prototype with likely missing features and outright bugs. The Python API is separately described as experimental with no error handling for model compatibility.

### How do I install the Python API for MuJoCo MPC?

Build the C++ project first, then use Python 3.10, install mujoco with pip, change into the python directory and run python setup.py install. Verify with python "mujoco_mpc/agent_test.py", and delete the build directory if the install fails partway.

## Sources

- [google-deepmind/mujoco_mpc on GitHub](https://github.com/google-deepmind/mujoco_mpc)
- [License: Apache-2.0](https://github.com/google-deepmind/mujoco_mpc/blob/main/LICENSE)
- [Project website](https://github.com/deepmind/mujoco_mpc)
- [README](https://github.com/google-deepmind/mujoco_mpc/blob/main/README.md)
- [Releases](https://github.com/google-deepmind/mujoco_mpc/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/google-deepmind-mujoco-mpc
