Skip to main content

MuJoCo-LiDAR: High-Performance LiDAR Simulation

PyPI Python

High-performance LiDAR simulation for MuJoCo with CPU, Taichi, JAX, and Warp backends.

中文文档 | Installation | Usage Guide | Development | Contributing

Features

  • Multi-Backend Support:
    • CPU: MuJoCo native mj_multiRay, no GPU required
    • Taichi: GPU parallel computing, supports Mesh and Hfield
    • JAX: GPU + MJX integration, batch simulation support
    • Warp: NVIDIA Warp ray casting, supports dynamic mesh scenes and batched scenes
  • High Performance: 1M+ rays/sec on GPU, real-time BVH construction
  • Multiple LiDAR Models: Velodyne (HDL-64E, VLP-32C), Livox (mid360, avia), Ouster (OS-128), custom patterns
  • ROS Integration: Ready-to-use ROS1/ROS2 examples

Quick Start

Installation

From PyPI:

# Python 3.10-3.13

# Basic (CPU only)
uv add mujoco-lidar

# With Taichi backend (GPU)
uv add "mujoco-lidar[taichi]"

# With JAX backend (GPU + batch)
uv add "mujoco-lidar[jax]"

# With Warp backend (GPU + dynamic mesh + batch)
uv add "mujoco-lidar[warp]"

From Source:

git clone https://github.com/TATP-233/MuJoCo-LiDAR.git
cd MuJoCo-LiDAR

# Python 3.10-3.13
uv sync --extra dev --extra examples

# Optional GPU backends
uv sync --extra dev --extra examples --extra taichi
uv sync --extra dev --extra examples --extra warp
uv sync --extra dev --extra examples --extra taichi --extra jax --extra warp

Run a non-ROS example after installing from source:

# Native MuJoCo viewer, CPU backend
uv run --extra dev --extra examples python examples/example_native.py --backend cpu

# Same example with the Warp backend, if installed
uv run --extra dev --extra examples --extra warp python examples/example_native.py --backend warp

# Unitree Go2, no ROS required
uv run --extra dev --extra examples --extra warp python examples/unitree_go2.py --backend warp --stand

See Installation Guide for details.

Basic Usage

import mujoco
from mujoco_lidar import MjLidarWrapper, scan_gen

# Load model
model = mujoco.MjModel.from_xml_path("scene.xml")
data = mujoco.MjData(model)

# Create LiDAR
lidar = MjLidarWrapper(
    model,
    site_name="lidar_site",
    backend="cpu",  # or "taichi", "jax", "warp"
    cutoff_dist=50.0
)

# Generate scan pattern
theta, phi = scan_gen.generate_HDL64()

# Trace rays
ranges = lidar.trace_rays(data, theta, phi)

See Usage Guide for more examples.

Performance

Backend Rays/sec Hardware Batch Support
CPU ~9M Native No
Taichi ~62M GPU Yes
JAX ~231M GPU Yes
Warp ~100M GPU Yes

Run benchmarks: make benchmark

Documentation

Examples

Development

git clone https://github.com/TATP-233/MuJoCo-LiDAR.git
cd MuJoCo-LiDAR
uv sync --extra dev

make test      # Run tests
make lint      # Check code quality
make benchmark # Run performance tests

See CONTRIBUTING.md for contribution guidelines.

License

MIT License - see LICENSE for details.

Citation

If you use this project in your research, please cite:

@article{jia2025discoverse,
      title={DISCOVERSE: Efficient Robot Simulation in Complex High-Fidelity Environments},
      author={Yufei Jia and Guangyu Wang and Yuhang Dong and Junzhe Wu and Yupei Zeng and Haonan Lin and Zifan Wang and Haizhou Ge and Weibin Gu and Chuxuan Li and Ziming Wang and Yunjie Cheng and Wei Sui and Ruqi Huang and Guyue Zhou},
      journal={arXiv preprint arXiv:2507.21981},
      year={2025},
      url={https://arxiv.org/abs/2507.21981}
}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mujoco_lidar-0.3.4.tar.gz (39.3 MB view details)

Uploaded Source

Built Distribution

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

mujoco_lidar-0.3.4-py3-none-any.whl (39.3 MB view details)

Uploaded Python 3

File details

Details for the file mujoco_lidar-0.3.4.tar.gz.

File metadata

  • Download URL: mujoco_lidar-0.3.4.tar.gz
  • Upload date:
  • Size: 39.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mujoco_lidar-0.3.4.tar.gz
Algorithm Hash digest
SHA256 571f8777cd30a4b57db64f7faeea74e078b8bbe5ad43f60f2882fb2a4e11d9f1
MD5 1424537b46d937ea04a9f4c3e79b01ec
BLAKE2b-256 8c53096dc6b0a6d14b94b828902df524d7c81e0f27ff236e7ce0776d1d1a1f2f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mujoco_lidar-0.3.4.tar.gz:

Publisher: publish.yml on discoverse-dev/MuJoCo-LiDAR

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_lidar-0.3.4-py3-none-any.whl.

File metadata

  • Download URL: mujoco_lidar-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 39.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mujoco_lidar-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1d3735f22d258dcc93a329132675e17233d71738121681261ae280c638e13225
MD5 a0c0a1068cf9f7f6ece7771c45ef94e5
BLAKE2b-256 9b9738cda65d9d6e679dc5bff69c8ef6a80f0bc368b19c781d6b7018508f8c2c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mujoco_lidar-0.3.4-py3-none-any.whl:

Publisher: publish.yml on discoverse-dev/MuJoCo-LiDAR

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

Release history Release notifications | RSS feed

This release

0.3.4 This release

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.6

2 files

0.2.5

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page