Environment Configuration
The Space Robotics Bench provides a flexible configuration system for environments through Hydra. This document explains how to customize environment parameters across different domains and tasks.
How Does It Work?
Each SRB environment is registered alongside its Python configuration class, which defines the default parameters for that specific environment. All environment configuration classes are organized in a hierarchical structure via inheritance, where BaseEnvCfg does most of the heavy lifting. This design supports a modular and extensible configuration system that allows for easy customization of environment parameters.
Modifying Configurations
You can modify environment configurations in several ways:
1. Command-Line Overrides
The most direct way to modify environment parameters is through command-line overrides:
srb agent <WORKFLOW> --env <ENV> \
env.domain=moon \
env.robot=ur10 \
env.num_envs=4 \
env.stack=false \
...
2. Configuration Files
Each SRB environment is backed by a Python configuration class (a @configclass-decorated dataclass extending BaseEnvCfg). When you launch a task, Hydra extracts the default values from this class and merges them with any command-line overrides.
To inspect the full set of defaults for any environment, read its Python configuration class directly (shown below) — Hydra extracts these defaults from the class at launch. Every run also dumps its resolved configuration to <logdir>/.hydra/config.yaml, which doubles as a reference for the expected YAML structure.
If you want to persist a set of overrides, create a YAML file and pass its path via the --cfg flag:
srb agent zero --env peg_in_hole --cfg ./my_overrides.yaml
where my_overrides.yaml contains:
env:
domain: mars
num_envs: 8
robot: ur10
Note:
--cfgalso acceptsdefault(use the environment’s default config) andignore/none/null(no config file).
Tip: Shortcut syntax is supported for assets —
env.robot=frankais automatically expanded toenv.robot.name=franka.
Key Parameters
Below are the most important configuration parameters organized by category (several parameters have their own detailed documentation pages):
Scenario/Environment
env.domain- Domainenv.robot- Robotenv.num_envs,env.stack- Parallelismenv.particles- Particlesenv.reward- Reward & Normalization
Simulation
env.sim- Low-level simulation parameters (physics, rendering, etc.)env.visuals- Visual appearance settings
Debugging
env.debug_vis- Enables debug visualization features