Skip to content

zyfgi/carsim-guide-skill

carsim-guide

Verified

Operate and automate CarSim simulations from an agent, including safe output and parameter discovery, named Run Control execution contexts, structured overrides, isolated batch sweeps, dataset dependency inspection, control-mode selection, result validation, diagnostics, and version-aware CLI/Simulink/VS API routing. Use for executing, configuring, exploring, or debugging CarSim. Do not use for vehicle-dynamics theory alone, generic dataframe work, or unrelated simulators.

FileKindSize
SKILL.mdskill md6.3 KB
examples/batches/friction_sweep.yamlconfig159 B
examples/batches/mass_friction_grid.yamlconfig198 B
examples/discovery/dataset_tree.pyscript693 B
examples/discovery/find_output.pyscript715 B
examples/discovery/find_parameter.pyscript761 B
examples/scenarios/basic_cruise.yamlconfig380 B
examples/scenarios/friction_change.yamlconfig379 B
examples/scenarios/steering_maneuver.yamlconfig377 B
examples/scenarios/tire_force_output.yamlconfig437 B
examples/scenarios/vehicle_override.yamlconfig376 B
examples/simulink_cosim.pyscript5.5 KB
examples/torque_vectoring.pyscript5.6 KB
references/advanced-controls.mdmarkdown4.0 KB
references/batch-workflows.mdmarkdown1.6 KB
references/compatibility.mdmarkdown1.4 KB
references/control-modes.mdmarkdown1.0 KB
references/database-exploration.mdmarkdown7.4 KB
references/dataset-syntax.mdmarkdown6.6 KB
references/outputs-and-units.mdmarkdown2.1 KB
references/parameter-discovery.mdmarkdown1.4 KB
references/parameters.mdmarkdown3.3 KB
references/python-interface.mdmarkdown7.9 KB
references/run-validation.mdmarkdown2.2 KB
references/scenarios.mdmarkdown3.3 KB
references/simulink-cosim.mdmarkdown4.0 KB
references/troubleshooting.mdmarkdown1.4 KB
references/version-compatibility.mdmarkdown811 B
references/vs-c-api.mdmarkdown3.3 KB
scripts/base_registry.pyscript4.7 KB
scripts/batch_runner.pyscript7.1 KB
scripts/carsim_batch.pyscript23.4 KB
scripts/carsim_errors.pyscript2.2 KB
scripts/control_modes.pyscript1.8 KB
scripts/cosim_model.mother4.7 KB
scripts/database_tools.pyscript16.5 KB
scripts/diagnose_run.pyscript444 B
scripts/diagnostics.pyscript6.9 KB
scripts/discovery_query.pyscript1.0 KB
scripts/dump_dll_exports.pyscript1.9 KB
scripts/output_registry.pyscript8.9 KB
scripts/override_registry.pyscript2.9 KB
scripts/parameter_discovery.pyscript8.6 KB
scripts/parameters.pyscript10.0 KB
scripts/result_contract.pyscript548 B
scripts/scenario_runner.pyscript11.3 KB
scripts/scenario_schema.pyscript4.0 KB
scripts/setup_paths.pyscript11.2 KB
scripts/tv_cosim.mother8.5 KB
scripts/validate_run.pyscript6.1 KB
scripts/version_compatibility.pyscript2.0 KB

references/parameters.md

View on GitHub
# Parameters: changing vehicle / run values safely

Four tiers, from safest to most powerful. All of them write scenario
override files only — the database stays read-only.

## 1. Typed convenience API (verified)

`VehicleOverrides` covers the five verified sprung-mass parameters; SI
in, CarSim mm out:

```python
VehicleOverrides(sprung_mass_kg=1250.0, cg_y_m=0.15, izz_kgm2=1743.0)
```

Sprung mass is absolute (not added payload), and the typed CG fields describe
the sprung body rather than the total vehicle. Confirm the effective total CG
in `run_echo.par`; for lateral CG, use the echoed `Y_CG_TL` value rather than
inferring it from the static left-right tire-load split.

## 2. Generic scalar overrides (keyword confirmed, value native)

`ScalarOverride` carries one keyword, its value **in the CarSim native
unit**, and an echo policy (`required`, `best_effort`, or `none`). Registered
registered scalars default to `required`; unknown generic scalars default to
`best_effort`. Only keywords verified on a real base belong in
`parameters.PARAMETER_REGISTRY` (currently the same five above); anything else
must be confirmed first:

```text
natural language ("提高前悬架弹簧刚度 10%")
      -> database_tools.search_database_text / find_datasets / find_keyword
      -> candidate keyword + dataset (confirm unit & context in the dataset file)
      -> confirm it actually took effect via run_echo (inspect_echo_keyword)
      -> ScalarOverride("FS_COMP_COEFFICIENT", 29.7)
```

Never guess a keyword. In YAML:

```yaml
parameters:
  - {keyword: FS_COMP_COEFFICIENT, value: 29.7, echo_validation: required}
```

Validation: keywords are `[A-Z][A-Z0-9_]*` tokens, values finite; overrides
may not duplicate a typed `vehicle` field nor touch Core-managed run/simfile
keywords (timing, paths, DLL, product version, and ports) — conflicts raise at compile time. Post-run,
`check_run` verifies every requested keyword against `run_echo.par`
(known-echo keywords only; unsupported ones are reported, never faked).

## 3. Structured table and dataset reference overrides

`TableOverride` accepts a non-empty, finite rectangular numeric table. Set
`independent_variable="time"` to require a strictly increasing first column.
`ReferenceOverride` accepts an exact `#FullDataName`, resolves it uniquely
inside DATADIR, and rejects arbitrary file paths. These are deliberately
small structures, not a complete `.par` parser.

Each override exposes an `OverrideCapability` from `override_registry.py`.
`SPEED_TARGET_TABLE` is the only table keyword currently marked
`VERIFIED`. A generic table is `CONTEXT_REQUIRED`. Reference resolution
proves that a named dataset exists; it does **not** prove the reference keyword
accepts that dataset family, so generic references remain `CONTEXT_REQUIRED`.
The scenario manifest records these verification states.

YAML uses `type: table` or `type: reference`; see the scenario schema.

## 4. Escape hatch (advanced CarSim syntax)

Complex `IMPORT`/`EXPORT`, `INSTALL_*` blocks and syntax the API does not
model go through `RawOverride([...])` or legacy `unsafe_extra_lines=[...]` (see
references/advanced-controls.md for the verified torque/brake/steer syntax).
One line per entry; conflicts with typed configuration are rejected. Raw
syntax has no automatic semantic or complex echo guarantee. `extra_lines` is
a deprecated alias.
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall