- The paper introduces Judo, a Python-based open-source package designed to accelerate research and deployment of sampling-based Model Predictive Control (MPC) in robotics.
- Judo features a user-friendly interface, leverages high-fidelity simulation with MuJoCo, includes an interactive browser GUI, and uses a modular, asynchronous architecture for streamlined sim-to-real transfer.
- The package demonstrates real-time control performance for complex tasks on standard hardware and provides an extensible API allowing easy implementation of custom tasks and optimization algorithms.
Judo: An Open-Source Package for Sampling-Based Model Predictive Control
The paper introduces Judo, an open-source Python package designed to accelerate research and deployment of sampling-based Model Predictive Control (MPC) algorithms. Judo addresses the need for accessible, extensible, and performant tooling in the robotics community, particularly for sampling-based MPC methods that have demonstrated efficacy in real-time, contact-rich robotic tasks.
Core Contributions
Judo is structured around three primary design principles:
- Maximizing Research Velocity: Judo is implemented in Python, balancing rapid prototyping with sufficient performance for real-time applications. The package provides simple, extensible interfaces for defining tasks and controllers, and integrates a browser-based GUI for real-time visualization and hyperparameter tuning. This design significantly shortens the development and evaluation loop for new algorithms and tasks.
- Accurate and Fast Simulation: The package leverages MuJoCo as its default physics backend, enabling high-fidelity simulation of complex robotic systems. The simulation backend is modular, allowing integration with alternative engines or custom dynamics models. This flexibility is critical for researchers targeting diverse hardware or requiring specialized simulation capabilities.
- Streamlined Sim-to-Real Transfer: Judo’s architecture separates control logic from simulation, with asynchronous communication between system, controller, and visualization nodes. This separation, facilitated by the Dora middleware, allows seamless swapping of the simulation node for a hardware interface, minimizing code changes during deployment to physical systems.
API and Extensibility
Judo’s API is organized around two main abstractions: Tasks and Optimizers. Tasks encapsulate the reward structure and system dynamics, while Optimizers implement the sampling and update logic for control policies. The package includes canonical implementations of predictive sampling, Cross-Entropy Method (CEM), and Model Predictive Path Integral (MPPI) control, and provides starter tasks ranging from simple cartpole systems to dexterous manipulation.
A minimal example of defining a custom task and optimizer is as follows:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
@dataclass
class CartpoleConfig(TaskConfig):
w_vert: float = 10.0
w_ctr: float = 10.0
w_vel: float = 0.1
w_ctrl: float = 0.1
class Cartpole(Task[CartpoleConfig]):
def __init__(self, model_path=XML_PATH):
super().__init__(model_path, sim_model_path=XML_PATH)
self.reset()
def reward(self, states, sensors, controls, config, system_metadata=None):
# Reward computation logic
...
def reset(self) -> None:
# State reset logic
... |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
@dataclass
class PredictiveSamplingConfig(OptimizerConfig):
sigma: float = 0.05
class PredictiveSampling(Optimizer[PredictiveSamplingConfig]):
def __init__(self, config: PredictiveSamplingConfig, nu: int) -> None:
super().__init__(config, nu)
def sample_control_knots(self, nominal_knots):
# Sampling logic
...
def update_nominal_knots(self, sampled_knots, rewards):
# Update logic
... |
This modularity enables rapid experimentation with new algorithms and system models, and supports both programmatic and YAML-based registration and configuration management via Hydra.
Interactive GUI
Judo’s GUI, built on the Viser framework, automatically generates interactive controls for all registered task and optimizer parameters. This includes sliders, checkboxes, dropdowns, and array editors, with support for fine-grained customization via decorators. The GUI also visualizes optimization traces and supports collaborative, browser-based sessions, facilitating remote and multi-user development.
Asynchronous and Modular Architecture
The system, controller, and visualizer nodes communicate asynchronously using Dora, a robotics-first middleware with efficient zero-copy array transfer. This architecture supports both simulation and hardware-in-the-loop operation, and the communication graph is specified in YAML, simplifying deployment and reproducibility.
The paper provides detailed timing benchmarks for three representative tasks (cartpole, cylinder push, and LEAP hand cube rotation) and three optimizers (CEM, MPPI, Predictive Sampling) on both consumer-grade (ThinkPad X1 Carbon Gen 11, 12-thread i7) and server-grade (128-thread Ryzen Threadripper Pro 5995wx) hardware. Key results include:
Task |
Optimizer |
ThinkPad (10 threads) |
Threadripper (10 threads) |
Threadripper (120 threads) |
cartpole |
CEM |
4.4 ± 0.7 ms |
1.3 ± 0.2 ms |
1.4 ± 0.2 ms |
cylinder_push |
CEM |
5.3 ± 0.8 ms |
2.1 ± 0.5 ms |
2.0 ± 0.3 ms |
leap_cube |
CEM |
48.8 ± 4.0 ms |
19.8 ± 2.9 ms |
15.4 ± 1.5 ms |
Both hardware platforms achieve real-time control rates for all but the most complex tasks, with server-grade hardware providing a 2.5x speedup. The authors note that this hardware dependency is a known limitation of sampling-based MPC, but anticipate that emerging GPU-based simulators (e.g., mujoco_warp) will further reduce this gap.
Comparison with Existing Libraries
Judo is compared against other sampling-based MPC libraries, including MJPC, hydrax, MPPI-Generic, mppi-isaac, and pytorch_mppi. Judo distinguishes itself by offering:
- A Python-based, user-friendly interface
- Integrated, browser-based GUI for real-time tuning
- Modular simulation backend
- Support for multiple planning algorithms and tasks
- Asynchronous, modular architecture for sim-to-real transfer
Most existing libraries are either limited to a single algorithm, lack extensibility, or do not provide integrated visualization and configuration management.
Implications and Future Directions
Judo’s design lowers the barrier to entry for research and deployment of sampling-based MPC, enabling rapid prototyping, reproducible benchmarking, and straightforward sim-to-real transfer. The package’s extensibility and modularity make it suitable for a wide range of applications, from academic research to industrial deployment.
The authors outline a roadmap that includes integration with learned controllers, expanded hardware support, and additional tasks and optimizers. The architecture is well-positioned to incorporate advances in parallel simulation, differentiable physics, and hybrid learning-based control.
Conclusion
Judo represents a significant step toward standardized, accessible tooling for sampling-based MPC in robotics. Its combination of usability, extensibility, and real-time performance addresses key bottlenecks in both research and deployment. The package is likely to facilitate broader adoption and innovation in sampling-based control, and its modular design will accommodate future developments in simulation, optimization, and learning-based methods.