Skip to content
Back to skills

Perception Terrain Randomization

ASecurity

"Configure mjlab sensors, terrain generation, flat patches, and

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
tools

Works with

  • cli

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill perception-terrain-randomization --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Perception Terrain Randomization?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Perception Terrain Randomization
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-perception-terrain-randomization/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-perception-terrain-randomization)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: perception-terrain-randomization
description: "Configure mjlab sensors, terrain generation, flat patches, and
  domain randomization with CPU/CUDA verification boundaries."
metadata:
  disco-role: operating
disable-model-invocation: true
license: Apache 2.0
---

# Perception, Terrain, and Randomization

Use this sub-skill when an mjlab task needs perception sensors, terrain,
terrain-aware resets/curriculum, or runtime domain randomization.

## Route here for

- Scene-level `BuiltinSensorCfg`, `ContactSensorCfg`, `RayCastSensorCfg`,
  `TerrainHeightSensorCfg`, and `CameraSensorCfg` selection.
- Sensor data semantics: contact reductions/history, raycast hit distances,
  terrain height scans, RGB/depth/segmentation outputs, and debug visualization.
- `TerrainEntityCfg`, `TerrainGeneratorCfg`, terrain presets, curriculum grid
  behavior, spawn proportions, and flat patch sampling.
- Domain-randomization event functions in `mjlab.envs.mdp.dr`, including model
  field expansion, recomputation levels, camera/render implications, and
  visualization limits.
- Deciding whether a check is CPU-config-only or a CUDA/full sensor validation.

## Route elsewhere

- Base entity, scene, MuJoCo spec editing, asset variants, and scene export:
  [scene-simulation-assets](../scene-simulation-assets/SKILL.md).
- Observation/reward/action/termination term dictionaries and observation-group
  wiring: [environment-configuration](../environment-configuration/SKILL.md)
  and [mdp-components](../mdp-components/SKILL.md).
- Training, playback, task registry, viewer CLI, checkpoints, W&B, and export
  commands: [training-evaluation-cli](../training-evaluation-cli/SKILL.md).

## Operating workflow

1. Identify which layer owns the request: sensor config, terrain config,
   terrain-aware reset/curriculum, or `dr` event term.
2. Confirm exact installed signatures and terrain preset names with the bundled
   [inspection script](scripts/inspect_sensor_terrain.py) when the mjlab version
   may matter. Use `--json` for machine-readable output.
3. Read the relevant reference:
   - [Sensors](references/sensors.md) for built-in/contact/raycast/camera data.
   - [Terrain](references/terrain.md) for generator modes, presets, flat patches,
     curriculum, and debug groups.
   - [Domain randomization](references/domain-randomization.md) for event modes,
     field selection, operations/distributions, and recompute behavior.
   - [Troubleshooting](references/troubleshooting.md) for common sensor, terrain,
     rendering, and DR failures.
4. Choose verification level explicitly:
   - CPU/config checks can inspect imports, dataclass signatures, CLI/help text,
     and pure terrain config construction.
   - CUDA/full checks are needed for raycast/camera sensing, MuJoCo Warp render
     context behavior, sensor-context creation, and training-scale simulation.

## Fast decisions

- Use `ContactSensorCfg` for structured contact data and gait air-time signals.
- Use `RayCastSensorCfg` with a `GridPatternCfg` for terrain scans and with a
  `PinholeCameraPatternCfg` for depth-like rays.
- Use `TerrainHeightSensorCfg` when the policy needs per-frame vertical
  clearance rather than raw raycast hit positions.
- Use `CameraSensorCfg` for RGB/depth/segmentation images; keep all camera
  render settings identical inside one scene.
- Use terrain named configs for standard locomotion terrain, then customize with
  `dataclasses.replace()` or by replacing `sub_terrains`.
- Prefer `startup` or `reset` events for DR functions that trigger model
  recomputation; reserve frequent interval/step events for cheap state or
  friction-style changes.

Files in this skill

  • SKILL.md3.6 KB
  • references/domain-randomization.md10.4 KB
  • references/sensors.md10.8 KB
  • references/terrain.md9.7 KB
  • references/troubleshooting.md2.5 KB
  • scripts/inspect_sensor_terrain.py2.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.