本文へ移動
cccskills
無料GitHub で公開

replay-recording

Replays a CARLA .log recorded by the recorder — the whole run or a time window, at any speed, following a chosen actor, optionally regenerating sensors and restoring weather. Use when the user asks to "replay the recording", "play back the run", "watch it again in slow motion / at 2x", "follow vehicle N during replay", or "replay onto a different map".

インストール方法を見る

含まれるファイル(5)

  • SKILL.md5.7 KB
  • references/replay.md2.1 KB
  • scripts/check_env.sh2.1 KB
  • scripts/env.sh1.3 KB
  • scripts/replay.py9.5 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Replay a CARLA recording

Paths. scripts/… and references/… below are relative to the directory holding this SKILL.md. Your working directory is the user's project, not that directory, so prefix them with its absolute path or the command is not found.

Play back a .log produced by record-simulation. The server re-creates the recorded scene; play prints its summary. Confirm the replay by watching the followed actor or by inspecting the same log with query-recording.

The scene, the holders and the clock

play puts the world into the state a replay needs, in this order:

  1. Stops local spawn holders. spawn-vehicles / spawn-walkers / a held create-sensor stay resident by design, and each removes its own actors and restores the clock in a finally, so they are sent SIGINT rather than killed. --keep-scene skips all of this.
  2. Puts the world back to asynchronous. The replayer runs server-side, so no client has to tick anything. If a client still owned a synchronous clock the replay would advance only as fast as that client ticked; worse, with the holder gone and the world left synchronous, nothing ticks at all and the replay appears to do nothing.
  3. Clears the scene. A replay RECREATES the actors in the log, so it adds to the world rather than replacing it: replaying a 50-car log into a live 50-car scene gives 100 vehicles driving through each other. Traffic signs and the spectator survive — they belong to the map, not the scene.

The corollary for recording: the recorder is free to be the synchronous client. Capturing under a fixed timestep is what makes a log reproducible, and it costs the replay nothing, because playback is driven by the server.

Holder detection reads /proc argv rather than matching a command-line substring — a shell whose own command line merely quotes vehicles.py spawn --hold matches a substring search and gets signalled, which kills the caller by accident.

Instructions

Progress:
- [ ] Step 1: Check prerequisites (bash scripts/check_env.sh), clear FAILs
- [ ] Step 2: (optional) inspect the log first (query-recording) to pick times/ids
- [ ] Step 3: Play — whole log, or a window; set speed / follow as asked
- [ ] Step 4: Stop when done (decide keep-actors)

Commands need CARLA_HOST/CARLA_PORT from scripts/env.sh.

Step 1: Check prerequisites

bash scripts/check_env.sh

Step 3: Play

source scripts/env.sh

# whole log at real time
python3 scripts/replay.py play --file /tmp/run.log

# a 10s window from t=5s, following actor 87, at 2x
python3 scripts/replay.py play --file /tmp/run.log --start 5 --duration 10 --follow 87 --time-factor 2.0

# regenerate sensors and restore the recorded weather
python3 scripts/replay.py play --file /tmp/run.log --replay-sensors --replay-weather

# change speed of the running replay, e.g. slow motion
python3 scripts/replay.py speed --factor 0.25

--start is seconds from the beginning (negative counts from the end), --duration 0 plays to the end, --follow 0 means don't move the spectator.

Step 4: Stop

python3 scripts/replay.py stop                 # remove replayed actors
python3 scripts/replay.py stop --keep-actors   # leave them in the world

Examples

Example 1: watch it back

User says: "replay that run"

play --file /tmp/run.log. Server summary prints; watch in the CARLA window.

Example 2: slow-mo on one car

User says: "replay following car 87 at quarter speed"

play --file /tmp/run.log --follow 87 --time-factor 0.25.

Example 3: regenerate camera data from a recording

User says: "I need camera frames from that recording"

Re-attach the sensors you want (create-sensor / read-sensor skills), then play --file /tmp/run.log --replay-sensors. The recorder stored no images; they are regenerated now.

Troubleshooting

Problem: play prints a file-not-found / parse error Cause: the .log is not on the server at that path. Solution: use the server-side path; a relative name resolves under CarlaUE4/Saved/. Verify with query-recording info first.

Problem: replay shows nothing / wrong map Cause: the log was recorded on a different map than the one loaded. Solution: replay loads the recorded map automatically; for OpenDRIVE-only logs use --map-override <Name>.

Problem: no sensor images during replay Cause: --replay-sensors not set, or no sensors attached. Solution: attach sensors, then replay with --replay-sensors.

Problem: actors vanish when replay ends Cause: stop removes replayed actors by default. Solution: stop --keep-actors to keep them.

Outputs

Server state: the recorded scene re-enacted on the running server. Optionally regenerated sensor data (with --replay-sensors). No file is produced.

Detail (time window semantics, sensors/weather, map override, sync interaction) in references/replay.md.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Adds a new ROS 2 message type to CARLA's native ROS 2 interface — the hand-written POD struct under LibCarla/source/carla/ros2/types/msg, its Fast-CDR serialize/deserialize pair, the RIHS01 type hash computed in Docker, the CdrTopicInfo registration and the type-hash test. Use when the user asks to "add a ROS message type", "support sensor_msgs/X in CARLA", "add a carla_msgs type", "why is my type hash warning appearing", or needs a message CARLA does not publish yet. There is no IDL codegen — every step is manual.

日本語の概要は準備中です。原文の説明を表示しています。

carla-simulator/carla-agentic-tools42026年9月12日 更新

Adds a new topic to CARLA's native ROS 2 interface — a publisher (BasePublisher + PublisherImpl, topic suffix, QoS, registration in ROS2::GetOrCreateSensor, a ProcessDataFrom* entry point and its call site in the UE4 plugin) or a subscriber that lets ROS drive an actor. Also covers adding a middleware (RMW) behind IPublisherMiddleware. Use when the user asks to "publish X to ROS from CARLA", "add a ROS topic/publisher/subscriber", "make the obstacle/lane-invasion sensor publish", "add odometry to ROS", or "add another RMW".

日本語の概要は準備中です。原文の説明を表示しています。

carla-simulator/carla-agentic-tools42026年9月12日 更新

Reads and summarises ScenarioRunner output — the criteria pass/fail tables from --output/--file, the machine-readable --json and --junit result files, and the criteria JSON written alongside a --record recording — and runs the metrics module (metrics_manager.py) to compute custom measurements over a recorded run offline, without the simulator. Use when the user asks "did the scenario pass", "why did it fail", "summarise these results", "compare these runs", or wants distance/speed/lane metrics from a recording.

日本語の概要は準備中です。原文の説明を表示しています。

carla-simulator/carla-agentic-tools42026年9月12日 更新

Gets actor and level 3D bounding boxes and projects them into a camera image as 2D boxes — the dataset-annotation workflow. Lists box geometry, draws 3D boxes in the world via debug, or captures one camera frame and writes an annotated PNG plus a JSON of 2D boxes for matching actors. Use when the user asks to "get bounding boxes", "draw boxes around the cars", "project boxes onto the camera", or "generate a detection dataset / annotations".

日本語の概要は準備中です。原文の説明を表示しています。

carla-simulator/carla-agentic-tools42026年9月12日 更新

Builds CARLA (branch ue4-dev, Unreal Engine 4.26) from source on Linux end-to-end — UE4 fork, the Carla server (editor C++ modules), the LibCarla Python client wheel, and content — then verifies them against a from-source server. Optionally builds the native ROS 2 interface in (ROS2=1 → --ros2, Fast-DDS/CycloneDDS/Zenoh), which is compile-time only and cannot be enabled later. Use when the user asks to "build CARLA from source", "compile CARLA ue4-dev", "set up CARLA on Ubuntu (incl. 24.04)", "build CARLA with ROS2 support", or "produce a CARLA server + client wheel". Cooking a distributable Dist/ package is a separate skill (package-carla-ue4); running the build is run-carla-server.

日本語の概要は準備中です。原文の説明を表示しています。

carla-simulator/carla-agentic-tools42026年9月12日 更新

Builds CARLA on Unreal Engine 5.8 from the ue58-dev branch using its CMake build system — configure a preset, then build the carla-unreal / carla-unreal-editor / carla-python-api-install / launch targets — with ROS 2, DLSS, RSS and cook-scope options, and the engine-side build of the CarlaUnreal UE 5.8 fork. There is no Makefile and no Util/BuildTools in this tree, so every UE4 `make` recipe is invalid here. Use when the user asks to "build CARLA UE5", "build ue58-dev", "compile CARLA with cmake", "rebuild the Python API", or hits a CMake configure or target failure.

日本語の概要は準備中です。原文の説明を表示しています。

carla-simulator/carla-agentic-tools42026年9月12日 更新

carla-simulator のスキルをすべて見る

このスキルの問題を報告する