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.

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.

RequestRead / run
First use or paths movedscripts/setup_paths.py; then references/python-interface.md
YAML scenario, manifest, validationreferences/scenarios.md; scripts/scenario_runner.py
Unknown output or channelreferences/outputs-and-units.md; scripts/output_registry.py
Known output units / SI conversionreferences/outputs-and-units.md
Unknown physical parameter or keywordreferences/parameter-discovery.md, then references/database-exploration.md
Scalar, table, or dataset-reference overridereferences/parameters.md; scripts/parameters.py
Multiple runs / parameter sweepreferences/batch-workflows.md; scripts/batch_runner.py
Dataset dependencies / missing link / cyclereferences/database-exploration.md; build_dependency_graph()
Choose batch, Simulink, or VS API controlreferences/control-modes.md
Throttle, brake, per-wheel torque syntaxreferences/advanced-controls.md
Unexpected run failurereferences/troubleshooting.md; scripts/diagnose_run.py
CarSim compatibility / version statusreferences/compatibility.md, then references/version-compatibility.md when diagnosing version handling
Simulink closed loopreferences/simulink-cosim.md
Low-level VS API steppingreferences/vs-c-api.md
Read .par syntaxreferences/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: 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