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
---
name: carsim-guide
description: 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.
---

# CarSim agent router

CarSim 2024.0 is the verified solver target. Other explicitly detected
versions follow the generic path with an **unverified** warning; version
detection alone is not solver compatibility proof.

## Route the request

Read only the references needed for the current task.

When this skill provides a verified script path, prefer it over ad-hoc direct
manipulation. This is a routing preference, not a ban on evidence-gathering
tools or on a documented escape hatch.

| Request | Read / run |
|---|---|
| First use or paths moved | `scripts/setup_paths.py`; then `references/python-interface.md` |
| YAML scenario, manifest, validation | `references/scenarios.md`; `scripts/scenario_runner.py` |
| Unknown output or channel | `references/outputs-and-units.md`; `scripts/output_registry.py` |
| Known output units / SI conversion | `references/outputs-and-units.md` |
| Unknown physical parameter or keyword | `references/parameter-discovery.md`, then `references/database-exploration.md` |
| Scalar, table, or dataset-reference override | `references/parameters.md`; `scripts/parameters.py` |
| Multiple runs / parameter sweep | `references/batch-workflows.md`; `scripts/batch_runner.py` |
| Dataset dependencies / missing link / cycle | `references/database-exploration.md`; `build_dependency_graph()` |
| Choose batch, Simulink, or VS API control | `references/control-modes.md` |
| Throttle, brake, per-wheel torque syntax | `references/advanced-controls.md` |
| Unexpected run failure | `references/troubleshooting.md`; `scripts/diagnose_run.py` |
| CarSim compatibility / version status | `references/compatibility.md`, then `references/version-compatibility.md` when diagnosing version handling |
| Simulink closed loop | `references/simulink-cosim.md` |
| Low-level VS API stepping | `references/vs-c-api.md` |
| Read `.par` syntax | `references/dataset-syntax.md` |

## Non-negotiable execution model

- A base is one GUI-expanded `Run_all.par` for a specific **Run Control /
  execution context**, not merely a vehicle. Bind it by name and SHA256 with
  `base_registry.py`; never select the newest file.
- The CLI consumes the expanded base plus a later `override.par`. Do not point
  the solver at a thin hand-written tree of raw database datasets.
- Keep DATADIR read-only. Put scenarios, overrides, results, caches, and
  manifests outside it. A user request to change a database parameter should
  use an override or an explicitly cloned GUI dataset.
- `scenario_runner.py` owns the normal solver chain. `batch_runner.py` calls it
  once per isolated run; it does not implement another solver path.
- Results are valid only after fresh-artifact, termination, required-channel,
  finite time-grid, and applicable echo checks. Use `read_run_csv`; SI is the
  default.

## Discovery discipline

Discovery answers “what might this be”; verification answers “what did CarSim
actually use.” Never merge those states.

1. Classify output, parameter, dataset, execution mode, and validation need.
2. Resolve an exact verified registry entry or alias when one exists.
3. Otherwise normalize the physical query into explicit search terms and
   search supplied run/echo/database artifacts deterministically. Empty search
   terms mean unresolved; they must never match every artifact line.
4. Preserve all credible candidates and report ambiguity; never choose the
   first weak match or invent a keyword/channel.
5. Verify units and context in the actual dataset/echo before compiling.
6. After execution, verify the fresh CSV and echo and retain the manifest.

## Overrides and controls

- `VehicleOverrides`: five verified sprung-body fields, SI input.
- `ScalarOverride`: native-unit scalar plus echo policy `required`,
  `best_effort`, or `none`.
- `TableOverride`: finite rectangular simple table; optional strictly
  increasing time column.
- `ReferenceOverride`: exact `#FullDataName` resolution inside DATADIR; it does
  not accept arbitrary paths.
- `RawOverride` / legacy `unsafe_extra_lines`: explicit escape hatch with no
  complex semantic or echo guarantee.
- Core-managed runtime keywords (`TSTEP`, `TSTOP`, `IPRINT`, paths, DLL,
  product version, ports, and related simfile fields) are protected.

Distinguish targets from actuator commands: `speed_target` is not
`throttle_command`; `steering_target`, steering-wheel angle, and road-wheel
angle are different semantics. Prerecorded tables and batch replay are not
closed loop. Runtime feedback requires Simulink or VS API stepping.

## Version and failure handling

`version_compatibility.py` records only versions with real evidence. For a
new version: detect it, mark it unverified, try the generic compatible route,
and record the warning in `run_manifest.json`. Reject only malformed/unknown
version identity or a proven incompatible feature.

Classify failure at the layer where evidence places it: environment, base,
scenario, compile, solver, license, output, echo, database, cosim, or version.
Do not hide solver exceptions or over-parse unfamiliar solver text.

- Retry at most once, and only for a temporary file-access failure or a known
  short-lived process/file race.
- Stop, diagnose, and report evidence for license failures, base hash mismatch,
  unknown parameters or units, echo mismatch, scenario errors, version warnings
  requiring judgment, or repeated abnormal solver termination.
- Never change speed, friction, mass, or control inputs merely to make a failed
  run pass unless the user asks to debug the physical configuration.

## Fixed conventions

- Vehicle frame: x forward, y left, z up; positive yaw rate is a left turn.
- Corners: L1=FL, R1=FR, L2=RL, R2=RR.
- One immutable directory per run; never overwrite prior batch members.
- Tire Fx/Fy/Fz/Kappa/Alpha are ordinary outputs.
- `Lat_Veh` and `Lat_Targ` remain excluded as verified drift artifacts; use
  Yo/Yaw for lateral position.
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: 323kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 323kUpdated 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: 323kUpdated Claude CodeCodexVerifiedInstall