> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tryreflex.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Simulation

> Run rfx without robot hardware. Genesis is available today, MuJoCo and Isaac Lab are next.

<Note>
  Genesis integration is available now. Isaac Lab and MuJoCo integration are
  in progress and land under this same surface.
</Note>

## Quickstart (Genesis)

From the repo root:

```bash theme={null}
uv pip install --python 3.13 torch
uv run --python 3.13 rfx/examples/genesis_viewer.py --auto-install
```

This starts the Genesis backend, opens the viewer, and auto-installs
`genesis-world` if missing.

## Go2 URDF integration

Go2 assets are **not** bundled in the repository. Place your own URDF and
meshes under `rfx/assets/robots/go2/` before running Go2 examples:

```text theme={null}
rfx/assets/robots/go2/
├── urdf/
│   ├── go2.urdf
│   └── meshes/...
└── mjcf/
    └── go2.xml
```

Then run:

```bash theme={null}
uv run --python 3.13 rfx/examples/universal_go2.py --backend genesis --auto-install
```

`rfx/configs/go2.yaml` defaults `urdf_path` to
`rfx/assets/robots/go2/urdf/go2.urdf`.

## Minimal Python API

```python theme={null}
from rfx.sim import SimRobot

robot = SimRobot.from_config(
    "rfx/configs/so101.yaml",
    backend="genesis",
    viewer=True,
    auto_install=True,
)

obs = robot.reset()
```

## Run modes

<CodeGroup>
  ```bash viewer theme={null}
  uv run --python 3.13 rfx/examples/genesis_viewer.py
  ```

  ```python headless theme={null}
  from rfx.sim import SimRobot
  robot = SimRobot.from_config(
      "rfx/configs/so101.yaml",
      backend="genesis",
      viewer=False,
  )
  ```

  ```bash runtime knobs theme={null}
  uv run --python 3.13 rfx/examples/genesis_viewer.py \
    --num-envs 1 \
    --steps 2000 \
    --substeps 4
  ```
</CodeGroup>

## Auto-install behavior

If Genesis is not installed, rfx tries:

1. `uv pip install --python <active-interpreter> genesis-world`
2. Falls back to `<active-interpreter> -m pip install genesis-world` when
   `uv` is unavailable.

<Warning>
  Genesis dependencies do not currently publish wheels for CPython 3.14. Use
  a CPython 3.13 environment: `uv run --python 3.13 ...`.
</Warning>

Opt in globally:

```bash theme={null}
export RFX_AUTO_INSTALL_GENESIS=1
```

Any Genesis backend start then attempts install automatically.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Genesis install fails">
    Run the install directly:

    ```bash theme={null}
    uv pip install genesis-world
    ```
  </Accordion>

  <Accordion title="Viewer does not appear">
    * Check that your machine supports graphics for the active environment.
    * Retry with `--device cpu`.
    * Validate by running headless first.
  </Accordion>
</AccordionGroup>

## Roadmap

* Isaac Lab integration
* MuJoCo integration
* Backend switching patterns and shared config conventions
