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?#
Installation Guide: Detailed installation instructions
First Environment: Run and understand your first environment
Basic Concepts: Learn core GenesisLab concepts
Configuration: Customize environments
Available Pre-built Environments#
GenesisLab provides several ready-to-use environments:
Quadrupeds#
GenesisLab-Go2-Flat-v0: Unitree Go2 on flat terrainGenesisLab-Go2-Rough-v0: Unitree Go2 on rough terrainGenesisLab-A1-Flat-v0: Unitree A1 on flat terrainGenesisLab-ANYmal-Flat-v0: ANYmal-D on flat terrain
Humanoids#
GenesisLab-H1-Flat-v0: Unitree H1 humanoidGenesisLab-G1-Flat-v0: Unitree G1 humanoid
Custom#
Create your own! See creating custom tasks
Learning Path#
We recommend following this path:
✅ Installation: Complete installation guide
✅ First Env: Run your first environment
✅ Concepts: Understand basic concepts
✅ Configuration: Learn environment configuration
📚 Tutorials: Follow step-by-step tutorials
🎓 Advanced: Explore advanced topics
Need Help?#
Check the FAQ
Browse tutorials
Read the API reference
Ask questions in GitHub Discussions
Report issues on GitHub