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.mdSao 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
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
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/…andreferences/…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
- A
.logrecording on the server (path from--file), verified to contain frames. Feed it toreplay-recordingorquery-recording.
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
Bình luận
- …
Thêm skill từ kho mã này
create-leaderboard-route
15kGiúp agent của bạn tạo file tuyến đường CARLA Leaderboard bằng cách đặt các điểm waypoint và trigger kịch bản từ camera của simulator, rồi kiểm tra và sắp xếp chúng.
package-leaderboard-agent
15kGiúp agent của bạn đóng gói một agent lái xe thành image Docker để nộp lên CARLA Leaderboard, kiểm tra cấu trúc thư mục và thử rằng image nạp được agent.
read-leaderboard-results
15kGiúp agent của bạn đọc file kết quả CARLA Leaderboard, giải thích điểm và vi phạm của từng tuyến, và chấm lại một lần chạy theo phiên bản luật khác.
run-leaderboard-evaluation
15kGiúp agent của bạn chạy bộ đánh giá CARLA Leaderboard trên một tập tuyến với agent lái xe, kiểm tra thiết lập trước và lưu checkpoint để có thể tiếp tục.
Skill tương tự
blucli
394kGiúp agent của bạn tìm, phát, tạm dừng, nhóm và chỉnh âm lượng loa Bluesound và NAD qua lệnh blu.
camsnap
394kGiúp agent của bạn chụp ảnh, quay clip ngắn hoặc lấy sự kiện chuyển động từ camera mạng và webcam nội bộ mà bạn đã thiết lập.
eightctl
394kGiúp agent của bạn kiểm tra và điều khiển thiết bị Eight Sleep pod, gồm nhiệt độ, báo thức và lịch ngủ.