Getting Started#

This guide will help you install GenesisLab and run your first robot learning environment.

Quick Start#

1. Install#

# Install Genesis
pip install genesis-world

# Install PyTorch (if not already installed)
pip install torch

# Install GenesisLab
cd genesislab/source/genesislab
pip install -e .

2. Run Your First Environment#

import gymnasium as gym
import genesislab.envs  # Register environments

# Create environment with 1024 parallel environments
env = gym.make("GenesisLab-Go2-Flat-v0", num_envs=1024)

# Reset
obs, info = env.reset()
print(f"Observation shape: {obs.shape}")

# Run simulation
for _ in range(100):
    # Random actions
    action = env.action_space.sample()
    
    # Step environment
    obs, reward, terminated, truncated, info = env.step(action)

env.close()

3. Train with RL#

from stable_baselines3 import PPO
import genesislab.envs

# Create env
env = gym.make("GenesisLab-Go2-Flat-v0", num_envs=4096)

# Train
model = PPO("MlpPolicy", env, verbose=1)
model.learn(total_timesteps=10_000_000)

# Save
model.save("go2_policy")

What’s Next?#

Available Pre-built Environments#

GenesisLab provides several ready-to-use environments:

Quadrupeds#

  • GenesisLab-Go2-Flat-v0: Unitree Go2 on flat terrain

  • GenesisLab-Go2-Rough-v0: Unitree Go2 on rough terrain

  • GenesisLab-A1-Flat-v0: Unitree A1 on flat terrain

  • GenesisLab-ANYmal-Flat-v0: ANYmal-D on flat terrain

Humanoids#

  • GenesisLab-H1-Flat-v0: Unitree H1 humanoid

  • GenesisLab-G1-Flat-v0: Unitree G1 humanoid

Custom#

Learning Path#

We recommend following this path:

  1. Installation: Complete installation guide

  2. First Env: Run your first environment

  3. Concepts: Understand basic concepts

  4. Configuration: Learn environment configuration

  5. 📚 Tutorials: Follow step-by-step tutorials

  6. 🎓 Advanced: Explore advanced topics

Need Help?#