Chuyển đến nội dung
Skillpedia
Khác15k · #11098

record-simulation

Skill này làm gì

Skill lưu trạng thái của mô phỏng vào file để có thể phát lại sau. Skill dành cho người muốn ghi lại một lần chạy để nghiên cứu hoặc lặp lại.

Khi nào nên dùng

  • ✓Khi bạn muốn ghi một lần chạy mô phỏng để phát lại sau.
  • ✓Khi bạn muốn ghi lại một kịch bản và phân tích sau.
  • ✓Khi bạn muốn bật hoặc tắt bộ ghi và xác nhận file hợp lệ.

Liên kết skill

https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/python-api/record-simulation/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/python-api/record-simulation/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Hãy ghi lần chạy mô phỏng này vào file nhật ký, và xác nhận rằng nó có các khung khi tôi dừng.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent bật bộ ghi, để mô phỏng chạy, rồi tắt bộ ghi và đọc nhật ký từ server để xác nhận đã ghi được các khung. Nhật ký ghi vị trí actor, trạng thái đèn giao thông và hoạt ảnh, nhưng không ghi ảnh cảm biến.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Record a CARLA simulation

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.

Capture a running simulation to a .log you can replay later (replay-recording) or interrogate (query-recording). The deliverable is a verified log: after stopping, the file is parsed back from the server to confirm it holds frames — start/stop alone confirm nothing.

What it captures: world state per frame — actor create/destroy, transforms, traffic-light states, vehicle wheel/animation and walker bones. With --extra (additional_data) also velocities, accelerations and control inputs. Not captured: sensor output (camera/lidar) — those re-simulate only on replay.

The .log is written on the server's filesystem (see the reference for exactly where).

Instructions

Progress:
- [ ] Step 1: Check prerequisites (bash scripts/check_env.sh), clear FAILs
- [ ] Step 2: Start recording (or use `clip` for a fixed duration)
- [ ] Step 3: Let the simulation run (traffic, scenario, manual drive, ...)
- [ ] Step 4: Stop, then verify the log parses back with frames

Commands need CARLA_HOST/CARLA_PORT from scripts/env.sh. Prefix with source scripts/env.sh or export them.

Step 1: Check prerequisites

bash scripts/check_env.sh

Step 2-4: Record

source scripts/env.sh

# manual bracketing: start, do things, stop
python3 scripts/record.py start --file /tmp/run.log
# ... run traffic / drive / trigger a scenario ...
python3 scripts/record.py stop

# or record a fixed-length clip and auto-verify
python3 scripts/record.py clip --file /tmp/run.log --seconds 20

# capture velocities/controls too (larger file)
python3 scripts/record.py start --file /tmp/run.log --extra

Use an absolute --file so you know where the log lands (a relative name goes under the server's CarlaUE4/Saved/).

Verify

clip verifies automatically; after a manual stop, confirm with the query-recording skill:

python3 ../query-recording/scripts/query.py info --file /tmp/run.log

A valid log shows a frame count and a duration. Zero frames means nothing ran between start and stop, or the path was wrong.

Examples

Example 1: capture a traffic run

User says: "record 30 seconds of traffic"

Start traffic (traffic-manager skill), then clip --file /tmp/traffic.log --seconds 30. VERIFY shows frames + duration ~30s.

Example 2: record around a manual action

User says: "record while I run my scenario"

start --file /tmp/scenario.log, run the scenario, stop, then query info.

Troubleshooting

Problem: log has 0 frames / query says empty Cause: nothing simulated between start and stop, or a bad server-side path. Solution: ensure actors are moving; use an absolute writable server path.

Problem: replayed run has no camera images Cause: the recorder never stores sensor data. Solution: expected — re-attach sensors and replay with --replay-sensors (replay-recording skill) to regenerate them.

Problem: file not found where I expected Cause: relative name resolves on the server, under CarlaUE4/Saved/. Solution: pass an absolute path, and remember it is on the server machine.

Outputs

Detail (capture contents, file location, size) in references/recorder.md.

Câu hỏi thường gặp

Ảnh camera có được ghi không?

Không. Đầu ra cảm biến không được lưu, và nó được mô phỏng lại khi phát lại nhật ký.

Nhật ký được lưu ở đâu?

Trên hệ thống file của server simulator, không nhất thiết trên máy tính của bạn.

Có ghi được vận tốc và điều khiển không?

Có, với tùy chọn dữ liệu bổ sung, thêm vận tốc, gia tốc và đầu vào điều khiển.

Chi tiết

Mô tả gốc của tác giả

Records a running CARLA simulation to a .log file via start_recorder/stop_recorder for later deterministic replay — capturing actor spawns, transforms, traffic-light states and animations (optionally velocities/controls). Use when the user asks to "record the simulation", "start/stop the recorder", "capture this run", or "save a scenario to replay later". Does NOT capture sensor images.

repo: carla-simulator/carla

Độ phổ biến

Sao GitHub
15k
Vị trí xếp hạng
#11098
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự