# GenesisLab GenesisLab is a unified, extensible framework for robot learning built on top of [Genesis](https://github.com/Genesis-Embodied-AI/Genesis), the world's fastest physics simulation platform. ## What is GenesisLab? GenesisLab is a comprehensive robotics learning framework that provides: 1. **Manager-Based Architecture**: A modular design with specialized managers for observations, actions, rewards, commands, and more. 2. **Multi-Robot Support**: Pre-configured support for various robot platforms including Unitree (Go2, H1, G1), ANYmal-D, and more. 3. **Gymnasium Integration**: Seamless integration with the Gymnasium API for RL training. 4. **Flexible Task System**: Easy-to-extend task definitions for various robot learning scenarios. 5. **Advanced Sensor System**: Support for both fake (fast) and Genesis native sensors including cameras, LiDAR, and IMU. 6. **Terrain Generation**: Procedural terrain generation with curriculum support. ## Key Features Compared to other robot learning frameworks, GenesisLab offers: - 🚀 **Ultra-Fast Simulation**: Leveraging Genesis's parallel simulation capabilities for unprecedented training speed - 🎯 **Manager-Based Design**: Clean separation of concerns through specialized manager components - 🤖 **Multi-Robot Ready**: Support for legged robots, humanoids, and wheeled robots out-of-the-box - 🔧 **Highly Configurable**: Configuration-driven design using `@configclass` decorators - 📊 **Rich Observation Space**: Support for privileged observations, proprioception, exteroception, and more - 🎮 **Command-Based Control**: Flexible command system for directing robot behaviors - 🌍 **Diverse Terrains**: Procedural terrain generation with multiple terrain types and difficulty curricula ## Architecture Overview GenesisLab follows a manager-based architecture where different aspects of the robot learning problem are handled by specialized managers: - **Scene Management**: `LabScene` provides the central interface for simulation management - **Observation Manager**: Handles all observation terms and computes observation tensors - **Action Manager**: Processes actions and applies them to the robot - **Reward Manager**: Computes multi-term reward functions - **Termination Manager**: Defines episode termination conditions - **Command Manager**: Generates and manages robot commands - **Curriculum Manager**: Implements training curricula for progressive learning - **Event Manager**: Handles randomization and domain randomization events - **Object Manager**: Manages dynamic objects in the scene ## Getting Started ### Quick Installation ```bash # Clone the repository git clone https://github.com/yourusername/genesislab.git cd genesislab # Install GenesisLab cd source/genesislab pip install -e . # Install Genesis pip install genesis-world # Install PyTorch pip install torch torchvision torchaudio ``` ### First Steps 1. **Run Your First Environment** ```python import gymnasium as gym import genesislab.envs # Register environments # Create environment env = gym.make("GenesisLab-Go2-Flat-v0", num_envs=1024) # Reset and run obs, info = env.reset() for _ in range(1000): action = env.action_space.sample() obs, reward, terminated, truncated, info = env.step(action) env.close() ``` 2. **Train with RL Libraries** GenesisLab is compatible with popular RL libraries: ```python # Example with stable-baselines3 from stable_baselines3 import PPO import genesislab.envs env = gym.make("GenesisLab-Go2-Rough-v0", num_envs=4096) model = PPO("MlpPolicy", env, verbose=1) model.learn(total_timesteps=10_000_000) ``` ## Documentation Structure ```{toctree} :maxdepth: 2 :caption: User Guide user_guide/index ``` ```{toctree} :maxdepth: 2 :caption: API Reference api_reference/index ``` ## Community and Support - **GitHub Issues**: Report bugs and request features - **Discussions**: Ask questions and share ideas - **Contributing**: We welcome contributions! See our contributing guidelines ## Citation If you use GenesisLab in your research, please cite: ```bibtex @misc{GenesisLab, author = {GenesisLab Contributors}, title = {GenesisLab: A Unified Framework for Robot Learning with Genesis}, year = {2024}, url = {https://github.com/yourusername/genesislab} } ``` And don't forget to cite Genesis: ```bibtex @misc{Genesis, author = {Genesis Authors}, title = {Genesis: A Generative and Universal Physics Engine for Robotics and Beyond}, month = {December}, year = {2024}, url = {https://github.com/Genesis-Embodied-AI/Genesis} } ``` ## License GenesisLab is released under the MIT License. See [LICENSE](https://github.com/yourusername/genesislab/blob/main/LICENSE) for details.