$ show Genesis-Embodied-AI/genesis-world
Genesis is a universal physics engine designed for robotics and physical AI simulation. It provides a unified multi-physics framework supporting rigid-body dynamics, finite element method (FEM), material point method (MPM), position-based dynamics (PBD), smoothed particle hydrodynamics (SPH), and incremental potential contact (IPC) coupling. The engine is GPU-accelerated via a custom compiler (Quadrants, forked from Taichi) and scales from single-CPU laptops to multi-GPU datacenters. It features differentiable simulation with gradient tape and manual backward passes, enabling end-to-end optimization through physics. The architecture follows a scene-entity-solver pattern with pydantic-based options for configuration, a plugin-based sensor system (cameras, IMU, tactile, lidar, etc.), and multiple rendering backends (rasterizer, raytracer, batch renderer). Robotics-specific features include URDF/MJCF/USD asset import, inverse kinematics, PD control, and reinforcement learning integration via rsl-rl. The codebase is well-structured with extensive tests, CI/CD pipelines, and a large set of examples covering manipulation, locomotion, deformables, fluids, and coupling scenarios. While the engine is primarily an application library, it also serves as a research platform for differentiable physics and novel simulation techniques.
The LLM identified 4 files worth highlighting for reuse:
Implements a custom linear bounding volume hierarchy (BVH) using morton codes and radix/rank sorting. Provides backend-agnostic build and query functions (CPU leaf-walk, GPU fenced walk, Metal block sweep) via the quadrants kernel system. Reusable as a high-performance spatial index for collision detection, raycasting, and proximity queries in any physics or geometry processing project.
Provides reusable SIMT (single-instruction multiple-thread) utilities for GPU programming, including block reductions (sum, max, argmax), segmented scans, and warp-level primitives. Written using the quadrants DSL, these functions can be extracted and used in any GPU kernel project requiring efficient parallel reductions without external library dependencies.
Implements a plugin-style recorder manager that registers, builds, and coordinates multiple recorders (video, CSV, NPZ, trajectory) with lifecycle hooks (build, process, cleanup, reset). Supports background threading, step-based sampling, and a decorator for automatic recording registration. The pattern is reusable for any simulation or data-collection pipeline requiring modular, thread-safe output management.
Defines the base sensor architecture with a pipeline of hooks: _update_raw_data, _apply_physics_imperfections, _apply_transform, _apply_hardware_imperfections, _post_process. Includes mixins for probe sensors, rigid sensors, and noise models (hysteresis, crosstalk, dead taxels). The pattern is reusable for any simulation requiring modular, composable sensor definitions with configurable imperfections and ring-buffer history.