SiegeLordEx/UnrealRoboticsLab

A high-fidelity, open-source robotics simulator integrating Unreal Engine's photorealistic rendering with MuJoCo's precision physics.

★ 0Forks 0GitHub ↗Compare

Project website ↗

README

Documentation arXiv License MuJoCo Unreal Engine

URLab -- MuJoCo Physics in Unreal Engine

URLab

URLab (Unreal Robotics Lab) is an Unreal Engine 5 plugin that embeds the MuJoCo physics engine directly into the editor and runtime. Drag-and-drop MJCF XML import, a component-based architecture that maps 1:1 to MuJoCo elements, the full MuJoCo C API accessible from C++ and Blueprints, ZMQ networking for external control, Python policy integration, 40+ sensor types, 8 actuator types, debug visualization, and a record/replay system.

When To Use URLab

  • You need photorealistic rendering with accurate contact physics (sim-to-real transfer, synthetic data generation).
  • You want to control MuJoCo robots from Python or ROS 2 while rendering in Unreal Engine.
  • You want Unreal's ecosystem (Blueprints, Sequencer, Marketplace assets, Niagara) with physics-accurate robots.

Quick Start

  1. Clone into your project's Plugins/ folder. Build third-party libraries once (third_party/build_all.ps1).
  2. Drag an MJCF .xml file into the Content Browser. The importer creates a complete Articulation Blueprint.
  3. Place an AAMjManager in your level. Place the generated Blueprint.
  4. Hit Play. MuJoCo runs on an async physics thread; Unreal handles rendering.

See the Getting Started guide for a full walkthrough.

Key Features

  • MJCF Import -- drag-and-drop .xml, builds full body/joint/actuator/sensor tree as an Articulation Blueprint.
  • Quick Convert -- attach UMjQuickConvertComponent to any Static Mesh and it becomes a MuJoCo physics body. No XML needed.
  • 40+ sensors, 8 actuator types, 4 joint types -- position, velocity, motor, muscle, damper, adhesion, cylinder, general actuators; hinge, slide, ball, free joints; accelerometer, gyro, force/torque, touch, rangefinder, frame tracking, camera, and more.
  • ZMQ networking -- stream sensor data out and receive actuator commands in via PUB/SUB sockets. Connect Python, ROS 2, or any ZMQ-speaking process.
  • Debug visualization -- toggle contact forces, joint axes, collision geometry (articulations and Quick Convert separately), all via hotkeys.
  • Record and replay -- capture trajectories, play back frame-by-frame, CSV import, snapshot/restore full simulation state.
  • Blueprint API -- compile, reset, step, read sensors, set controls, capture snapshots, toggle debug drawing, all from Blueprint.
  • MjSimulate dashboard -- in-editor widget with physics parameter tuning, actuator sliders, sensor readouts, live camera feeds.
  • Keyframe system -- reset to named keyframes, hold keyframe poses (via ctrl or direct qpos injection), per-articulation dropdown in the dashboard.
  • Possess and walk -- possess any articulation as a Pawn, WASD control with twist velocity commands over ZMQ.
  • Cinematic tools -- orbit camera, keyframe camera with waypoint paths, impulse launchers for perturbation testing.
  • CoACD decomposition -- one-click convex decomposition for non-convex meshes, cached by content hash.
  • Heightfield terrain -- convert Unreal Landscape actors into MuJoCo heightfields.

See the full documentation for details.

Python Integration

URLab communicates with external systems over ZMQ. The companion package urlab_bridge (separate repository, same organization) provides Python middleware for remote control, RL policy deployment, sensor monitoring, and ROS 2 bridging.

Requirements

  • Unreal Engine 5.4+
  • Windows (Win64). Linux is experimental.
  • MuJoCo 3.7+ -- bundled in third_party/, built from source.
  • Visual Studio 2022 or compatible C++ toolchain.
  • CMake 3.24+ -- for building third-party libraries.
  • Python 3.11+ -- optional, for urlab_bridge policies.
  • uv -- optional, for Python dependency management.

Installation

  1. Clone into YourProject/Plugins/UnrealRoboticsLab/.
  2. Build third-party libraries (first time only):
    cd Plugins/UnrealRoboticsLab/third_party
    .\build_all.ps1    # Windows
    # bash build_all.sh  # Linux
  3. Regenerate project files and build.

Architecture

AAMjManager (singleton coordinator, one per level)
  |-- UMjPhysicsEngine      (async physics loop, mjModel/mjData lifecycle)
  |-- UMjDebugVisualizer    (contact forces, collision wireframes, joint axes)
  |-- UMjNetworkManager     (ZMQ discovery, camera streaming)
  |-- UMjInputHandler       (hotkey processing)
  |
  |-- AMjArticulation (robot / mechanism, possessable Pawn)
  |     |-- UMjBody -> UMjHingeJoint, UMjGeom, UMjSensor, ...
  |     |-- UMjActuator (position, velocity, motor, muscle, ...)
  |     '-- UMjKeyframe, UMjDefault, UMjEquality, UMjTendon
  |
  |-- UMjQuickConvertComponent (on any Static Mesh actor)
  |-- AMjHeightfieldActor (Landscape -> MuJoCo heightfield)
  '-- WBP_MjSimulate (dashboard widget)

Documentation

Guide Description
Getting Started Installation and first simulation
Features Complete feature reference
MJCF Import Importing MuJoCo XML models
Geometry & Collision Collision shapes, meshes, Quick Convert
Controller Framework PD, keyframe, and custom controllers
Blueprint Reference Hotkeys, scripting, API usage
ZMQ Networking External control via Python, ROS 2
Possession & Twist WASD control, possess robots, twist commands
URLab Bridge Python middleware, policies, remote control
Architecture Full technical internals reference

Third-Party Licenses

Library License Usage
MuJoCo Apache 2.0 Physics engine
CoACD MIT Convex mesh decomposition
libzmq MPL 2.0 Network transport

See ThirdPartyNotices.txt for full license texts.

Contributing

Contributions welcome. See CONTRIBUTING.md for guidelines. Since Unreal Engine projects cannot use standard CI, maintainers manually verify builds before merging.

Citation

If you use URLab in your research, please cite our ICRA 2026 paper:

@inproceedings{embleyriches2026urlab,
  title     = {Unreal Robotics Lab: A High-Fidelity Robotics Simulator with Advanced Physics and Rendering},
  author    = {Embley-Riches, Jonathan and Liu, Jianwei and Julier, Simon and Kanoulas, Dimitrios},
  booktitle = {IEEE International Conference on Robotics and Automation (ICRA)},
  year      = {2026},
  url       = {https://arxiv.org/abs/2504.14135}
}

License

Copyright 2026 Jonathan Embley-Riches. Licensed under the Apache License, Version 2.0. See LICENSE for details.

Disclaimer: UnrealRoboticsLab is an independent software plugin. It is NOT affiliated with, endorsed by, or sponsored by Epic Games, Inc. "Unreal" and "Unreal Engine" are trademarks or registered trademarks of Epic Games, Inc. in the US and elsewhere. This plugin incorporates third-party software: MuJoCo (Apache 2.0), CoACD (MIT), and libzmq (MPL 2.0). See ThirdPartyNotices.txt for details.

Contributors

jonathanembleyriches

Issues