YAML: extensionclassExtensionConfig

Extension

Declares extension instances via extension_cfg_dict; the key name is the unique runtime identifier. Extensions are enabled in declaration order — data_collect must precede record/benchmark.

sourcefastsim/configs/extension_cfg.py

Top-level Fields1

FieldTypeRequiredDefaultDescription / Constraints
extension_cfg_dictdict[str, ExtensionBaseConfig]optional{}Extension config dict; key is instance name (also the unique runtime lookup key), value is the extension config object
Enabled in declaration order; data_collect must be declared before record and benchmark

ExtensionBaseConfig: Common Fields (all extensions)

classExtensionBaseConfigfastsim/extensions/extension_cfg.py
FieldTypeRequiredDefaultDescription / Constraints
stereotypestringrequiredExtension type (data_collect / record / replay / server / benchmark)
enablebooloptionaltrueWhether to auto-call enable(sim) on simulation startup; set false to defer manual activation

DataCollectorConfig: Observation Collection (stereotype: data_collect)

Registers multiple observers, each collecting a specific data type from the scene. Observations are consumed by the record / benchmark extensions.

classDataCollectorConfigstereotypedata_collectfastsim/extensions/data_collect/data_collector_cfg.py
FieldTypeRequiredDefaultDescription / Constraints
observer_cfgslist[ObserverConfig]optional[]List of observers to register; each typed by stereotype
classRobotObserverConfigstereotyperobot_observerfastsim/extensions/data_collect/observer_cfg.py
FieldTypeRequiredDefaultDescription / Constraints
stereotypestringrequired"robot_observer"
namestringrequiredRobot instance name (matches key in scene.robot_cfg_dict)
observe_joint_positionsbooloptionalfalseCollect joint positions
observe_ee_posebooloptionalfalseCollect end-effector pose
observe_gripper_statebooloptionalfalseCollect gripper state (opening degree)
classSensorObserverConfigstereotypesensor_observerfastsim/extensions/data_collect/observer_cfg.py
FieldTypeRequiredDefaultDescription / Constraints
stereotypestringrequired"sensor_observer"
namestringrequiredSensor instance name (matches key in scene.sensor_cfg_dict)
observe_rgbbooloptionalfalseCollect RGB image
observe_depthbooloptionalfalseCollect depth map
observe_intrinsic_matrixbooloptionalfalseCollect camera intrinsic matrix
observe_extrinsic_matrixbooloptionalfalseCollect camera extrinsic matrix
classObjectObserverConfigstereotypeobject_observerfastsim/extensions/data_collect/observer_cfg.py
FieldTypeRequiredDefaultDescription / Constraints
stereotypestringrequired"object_observer"
namestringrequiredObject instance name (matches key in scene.object_cfg_dict)
observe_positionbooloptionalfalseCollect object position
observe_rotationbooloptionalfalseCollect object rotation
observe_scalebooloptionalfalseCollect object scale
classTaskObserverConfigstereotypetask_observerfastsim/extensions/data_collect/observer_cfg.py
FieldTypeRequiredDefaultDescription / Constraints
stereotypestringrequired"task_observer"
namestringrequiredTask instance name

RecorderConfig: Recording & Export (stereotype: record)

Depends on a data_collect extension; asynchronously writes per-frame observations to disk, then post-processes on termination (HDF5, video, etc.).

classRecorderConfigstereotyperecordfastsim/extensions/record/recorder_cfg.py
FieldTypeRequiredDefaultDescription / Constraints
backend_root_pathstringrequiredRoot directory for recording output (supports root_key:// paths)
record_backendstringoptionallfsStorage backend type
record_fpsintoptional30Recording frame rate (used for frame throttling)
postprocess_listlist[str]optional[]Post-processing types to run on termination
hdf5 / video / png_depth / preview_video
use_recorder_stepbooloptionalfalseUse the recorder's own step counter instead of the global simulation step
data_collector_namestringoptionaldata_collectDataCollector extension instance name (must match the key in extension_cfg_dict)
record_observer_nameslist[str]optional[]Observer names to record; empty = record all
record_task_summarybooloptionalfalseExport task_summary.json on termination

ReplayConfig: Trajectory Replay (stereotype: replay)

Reads a trajectory from record.h5 and drives entities in simulation to replay it. Additional cameras (ReplayCameraConfig) can be added for multi-angle recording.

classReplayConfigstereotypereplayfastsim/extensions/replay/replay_cfg.py
FieldTypeRequiredDefaultDescription / Constraints
hdf5_pathstringrequiredPath to record.h5 (supports root_key:// paths)
scene_cfg_pathstringoptionalScene config file path to use during replay
spawnable_nameslist[str]optional[]Entity names to load; empty = load all
replay_camera_cfgslist[ReplayCameraConfig]optional[]Additional cameras for replay; see ReplayCameraConfig
classReplayCameraConfigfastsim/extensions/replay/replay_cfg.py
FieldTypeRequiredDefaultDescription / Constraints
widthintrequiredImage width in pixels
heightintrequiredImage height in pixels
positionlist[3]requiredCamera position [x, y, z] in meters
rotationlist[4]requiredCamera rotation as quaternion [w, x, y, z]
data_typeslist[str]optional["rgb"]Data types to collect (same as CameraConfig)

ServerConfig: REST API Server (stereotype: server)

Starts a Flask HTTP server, auto-registering all @apiclass-decorated controller methods as POST /{class}/{method} routes.

classServerConfigstereotypeserverfastsim/extensions/servitize/server_cfg.py
FieldTypeRequiredDefaultDescription / Constraints
hoststringoptional0.0.0.0Listen address
portintoptional8080Listen port
1024–65535
debugbooloptionalfalseFlask debug mode (disable in production)

BenchmarkConfig: Episode Evaluation (stereotype: benchmark)

Runs user-defined policy evaluation in a separate thread per episode, assessing goal conditions and reporting success rate. Policy class must extend Policy and implement the required interface.

classBenchmarkConfigstereotypebenchmarkfastsim/extensions/benchmark/benchmark_cfg.py
FieldTypeRequiredDefaultDescription / Constraints
episode_numintrequiredTotal number of episodes
action_frequencyfloatoptional10.0Policy control frequency in Hz
timeout_per_episodefloat | nulloptionalnullPer-episode timeout in seconds; null = no timeout
goalslist[GoalConfig]optional[]Goal conditions evaluated at the end of each episode
policyPolicyConfigrequiredPolicy config; stereotype specifies the user-defined policy type
data_collector_namestringoptionaldata_collectDataCollector extension instance name
required_observer_nameslist[str]optional[]Observer names required for the benchmark to run
terminate_sim_when_finishedbooloptionalfalseWhether to terminate the simulation when all episodes complete
classPolicyConfigfastsim/extensions/benchmark/policy.py
FieldTypeRequiredDefaultDescription / Constraints
stereotypestringrequiredPolicy type; must match the key registered with @stereotype.register_config
...anyoptionalAny additional fields defined in the user's PolicyConfig subclass, parsed by @configclass

Example

extension blockYAML
extension:
  extension_cfg_dict:
    my_data_collect:            # ← 键名即运行时实例名
      stereotype: data_collect
      enable: true
      observer_cfgs:
        - stereotype: robot_observer
          name: arm
          observe_joint_positions: true
          observe_ee_pose: true
        - stereotype: sensor_observer
          name: wrist_cam
          observe_rgb: true
          observe_depth: true

    record:
      stereotype: record
      enable: true
      backend_root_path: datasets://runs/run001
      record_fps: 30
      postprocess_list: [hdf5, video]
      data_collector_name: my_data_collect

    server:
      stereotype: server
      enable: false
      host: 0.0.0.0
      port: 8080
      debug: false