TL;DR
- Install Genesis in 5 minutes with
pip install genesis-worldor Docker for GPU acceleration. - Simulate rigid, articulated, and soft bodies with YAML/JSON configs—no coding required for basic setups.
- Generate 10,000+ parallel environments for RL training using Ray or MPI.
- Import URDF/MJCF robots with a single command and attach sensors (LiDAR, cameras) via Python API.
- Train policies at scale with Stable Baselines3 or RLlib—export data to CSV/JSON for analysis.
1. Installation and First Scene
Install Genesis
Choose your method based on hardware and workflow:
Option 1: Pip Install (Recommended for Most Users)
pip install "genesis-world>=2.4.0" --upgrade
Verify installation:
python -c "import genesis; print(genesis.__version__)"
Expected Output:
2.4.0
Option 2: Docker (GPU-Accelerated)
docker pull genesisworld/genesis:latest
docker run --gpus all -it genesisworld/genesis:latest python -c "import genesis; print('GPU detected:', genesis.is_gpu_available())"
Expected Output:
GPU detected: True
Option 3: From Source (For Development)
git clone https://github.com/genesis-sim/genesis.git
cd genesis
pip install -e ".[dev]" # Installs dev dependencies (testing, linting)
Create Your First Scene
Genesis uses YAML/JSON configs for environments. Start with a simple 2D world:
-
Create
simple_world.yaml:name: "Simple 2D World" description: "A basic environment with 1 agent and static obstacles." physics: engine: "pybullet" # Supports "pybullet", "mujoco", or "custom" gravity: [0.0, 0.0, -9.81] agents: - name: "agent_0" type: "circle" radius: 0.5 color: [0.0, 0.5, 1.0] # RGB initial_position: [0.0, 0.0] obstacles: - type: "rectangle" width: 2.0 height: 0.2 position: [0.0, -1.0] color: [0.5, 0.0, 0.0] -
Run the simulation:
python -m genesis run --config simple_world.yaml --headless FalseExpected Output: A window opens with a 2D renderer showing your agent and obstacle.
Key Gotchas
- Error:
ModuleNotFoundError: No module named 'pybullet'→ Install PyBullet:pip install pybullet - Error:
CUDA not available→ Ensure you’re using the Docker GPU command or have CUDA drivers installed Genesis Docs.
2. Rigid-Body, Articulated, and Soft-Body Simulation
Rigid-Body Physics
Modify simple_world.yaml to add a rigid-body robot:
agents:
- name: "robot_arm"
type: "urdf"
urdf_file: "path/to/robot.urdf"
initial_position: [1.0, 0.0]
joints:
- name: "joint_1"
type: "revolute"
lower_limit: -1.57
upper_limit: 1.57
Articulated Bodies (URDF/MJCF)
-
Download a sample URDF (e.g., from ROS Industrial):
wget https://raw.githubusercontent.com/ros-industrial/franka_description/master/urdf/franka_panda.urdf -O panda.urdf -
Update
simple_world.yaml:physics: engine: "mujoco" # Better for articulated bodies agents: - name: "panda" type: "urdf" urdf_file: "panda.urdf" initial_position: [0.0, 0.0, 0.5] -
Run with:
python -m genesis run --config simple_world.yaml
Soft-Body Dynamics (New in v2.4.0)
Enable soft-body physics in the config:
physics:
engine: "pybullet"
soft_body:
enabled: True
stiffness: 0.5
damping: 0.1
agents:
- name: "soft_robot"
type: "mesh"
mesh_file: "soft_robot.obj"
material:
type: "soft"
friction: 0.3
3. Parallel Environments for Data Generation
Genesis excels at high-throughput simulation for RL data collection. Use Ray for distributed environments:
Step 1: Install Ray
pip install "ray[default]"
Step 2: Configure Parallel Worlds
Create parallel_worlds.yaml:
num_environments: 1000 # Scale up to 10,000+
base_config: "simple_world.yaml" # Reuse your existing config
randomization:
agent_position: True
obstacle_count: [0, 5] # Random obstacles per env
Step 3: Launch Distributed Simulation
python -m genesis parallel --config parallel_worlds.yaml --backend ray --num_cpus 8
Expected Output:
[Genesis] Launched 1000 environments across 8 CPUs.
[Genesis] Data export enabled: /tmp/genesis_data/
Export Data for RL
Genesis auto-saves data to /tmp/genesis_data/ (configurable). Load it in Python:
import pandas as pd
df = pd.read_csv("/tmp/genesis_data/agent_trajectories.csv")
print(df.head())
4. Importing URDF/MJCF Robots
URDF Example
- Place your
.urdffile in arobots/directory. - Update
simple_world.yaml:agents: - name: "my_robot" type: "urdf" urdf_file: "robots/my_robot.urdf" initial_position: [0.0, 0.0, 0.1] sensors: - type: "lidar" range: 5.0 resolution: 0.1
MJCF Example
- Convert MJCF to URDF using MuJoCo’s tools.
- Use the same
urdf_filefield in the config.
Validate URDF
python -m genesis validate --urdf robots/my_robot.urdf
Expected Output:
[Genesis] URDF validated successfully.
[Genesis] Joints: 6 (revolute: 4, prismatic: 2)
5. Sensors and Rendering
Add Sensors to Agents
Extend simple_world.yaml:
agents:
- name: "sensor_agent"
type: "circle"
sensors:
- type: "camera"
resolution: [64, 64]
fov: 90
position: [0.0, 0.0, 0.2]
- type: "lidar"
range: 3.0
num_beams: 360
Render Sensor Data
Run with visualization:
python -m genesis run --config simple_world.yaml --render_sensors True
Expected Output: A window with real-time sensor overlays (camera images, LiDAR scans).
Save Renderings
python -m genesis run --config simple_world.yaml --output_dir ./renders --save_frames True
Output:
Frames saved to ./renders/ as frame_001.png, frame_002.png, etc.
6. Training Policies at Scale
Integrate with Stable Baselines3
-
Install RL dependencies:
pip install stable-baselines3[extra] -
Create a custom Genesis environment wrapper (
genesis_env.py):from genesis import GenesisEnv from stable_baselines3.common.env_checker import check_env class GenesisWrapper(GenesisEnv): def __init__(self, config_path="simple_world.yaml"): super().__init__(config_path) self.observation_space = self._get_obs_space() self.action_space = self._get_action_space() def _get_obs_space(self): # Define based on your sensors (e.g., camera + LiDAR) return gym.spaces.Box(low=-1, high=1, shape=(64*64*3 + 360,)) def _get_action_space(self): # Match your robot's DOF return gym.spaces.Box(low=-1, high=1, shape=(6,)) env = GenesisWrapper() check_env(env) # Validate the environment -
Train a PPO policy:
from stable_baselines3 import PPO model = PPO("MlpPolicy", env, verbose=1) model.learn(total_timesteps=10000) model.save("ppo_genesis")
Distributed RL with RLlib
pip install ray[rllib]
Train with RLlib:
from rllib_genesis import GenesisEnv
from ray.rllib.algorithms.ppo import PPOConfig
config = PPOConfig()
config.env_config["config_path"] = "simple_world.yaml"
config.env_config["num_environments"] = 10
config.num_workers = 4
trainer = config.build()
for i in range(10):
result = trainer.train()
print(f"Iteration {i}, Reward: {result['episode_reward_mean']}")
7. Comparing Genesis with Isaac Lab and MuJoCo
| Feature | Genesis | NVIDIA Isaac Lab | MuJoCo |
|---|---|---|---|
| Multi-Agent Support | 10,000+ agents (distributed) | 1,000+ agents (GPU-optimized) | Limited (single-agent focus) |
| Physics Engine | PyBullet, MuJoCo, Custom | PhysX (GPU-accelerated) | Bullet, custom physics |
| RL Integration | Stable Baselines3, RLlib, PettingZoo | Isaac Gym, OmniGraph | OpenAI Gym, custom wrappers |
| Dynamic Worlds | Yes (terrain, resources) | Yes (procedural generation) | No (static environments) |
| Rendering | Matplotlib, PyGame, OpenGL | Omniverse (high-fidelity) | Basic (headless by default) |
| Ease of Use | YAML/JSON configs + Python API | OmniGraph (visual scripting) | XML-based (steep learning curve) |
| Cloud Deployment | AWS/GCP templates | NVIDIA Omniverse Cloud | No native support |
| Cost | Free (OSS) | Free (OSS), Enterprise support | Free (OSS), Commercial license |
When to Choose Genesis:
- You need high-throughput multi-agent simulations (e.g., swarm robotics, traffic modeling).
- You’re working with dynamic, procedurally generated worlds.
- You prefer Python-first workflows with YAML configs.
When to Choose Isaac Lab:
- You require high-fidelity 3D rendering (e.g., robot perception stacks).
- Your team uses Omniverse or NVIDIA hardware.
When to Choose MuJoCo:
- You’re focused on single-agent RL with high-precision physics.
- You need minimal setup for prototyping.
What’s Next?
- Experiment with Parallel Worlds: Try scaling to 1,000 environments and export data for RL.
- Integrate with Your Robot: Replace
simple_world.yamlwith your URDF/MJCF and test sensor fusion. - Deploy to Cloud: Use Genesis’s AWS/GCP templates to run simulations at scale.
For custom Physical AI solutions—from simulation to deployment—Hyperion Consulting’s Physical AI Readiness Audit helps teams ship embodied systems faster.
