debug-draw
Skill này làm gì
Skill vẽ các lớp phủ tạm thời trong thế giới CARLA. Skill dành cho lập trình viên muốn đánh dấu một vị trí, một đường đi hoặc một hộp khi kiểm tra công việc.
Khi nào nên dùng
- ✓Khi bạn muốn đánh dấu một điểm, đường hoặc hộp trong thế giới mô phỏng.
- ✓Khi bạn muốn trực quan hóa một đường đi hoặc một tập waypoint.
- ✓Khi bạn muốn gắn nhãn một vị trí trên bản đồ để gỡ lỗi.
Liên kết skill
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/python-api/debug-draw/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 vẽ một điểm đánh dấu màu xanh lá tại 10, 20, 1 và một đường từ gốc đến 50, 0, 1 kéo dài 60 giây.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent gửi lệnh vẽ với vị trí, màu và thời gian tồn tại. Các hình hiện ra như một lớp phủ tạm thời trên server và biến mất khi hết thời gian.
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.
Draw CARLA debug shapes
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.
Overlay primitives on the running world for visual debugging: points, lines,
arrows, boxes, text. They are drawn by the server as a transient overlay — not
actors — so they cannot be selected or deleted individually; they expire after
their --life. Other skills (e.g. map-waypoints) draw through this same
world.debug API.
Instructions
Progress:
- [ ] Step 1: Check prerequisites (bash scripts/check_env.sh), clear FAILs
- [ ] Step 2: Draw the primitive(s) with a colour and lifetime
- [ ] Step 3: Confirm in a rendered view; redraw if it must persist in sync mode
Commands need CARLA_HOST/CARLA_PORT from scripts/env.sh. Coordinates are
world metres X,Y,Z; colours are r,g,b (0-255). Negative coordinates: use
the = form (--at=-10,-5,1, --from=-3,0,1) so a leading minus isn't read as
a flag.
Step 1: Check prerequisites
bash scripts/check_env.sh
Step 2: Draw
source scripts/env.sh
python3 scripts/debug_draw.py point --at 10,20,1 --size 0.2 --color 0,255,0 --life 60
python3 scripts/debug_draw.py line --from 0,0,1 --to 50,0,1 --thickness 0.2 --life 60
python3 scripts/debug_draw.py arrow --from 0,0,1 --to 10,0,1 --color 0,0,255 --life 60
python3 scripts/debug_draw.py box --center 30,30,1 --extent 2,4,1.5 --yaw 45 --life 60
python3 scripts/debug_draw.py text --at 30,30,3 --text "junction 12" --color 255,255,0 --life 60
Step 3: Confirm / persistence
Shapes render on a world tick, in a rendered view. Two gotchas:
- Headless
-nullrhiservers show nothing — there is no render thread. Use a windowed or packaged server to see overlays. - Sync mode: nothing appears until the client ticks, and
--lifeis in simulation time. For an overlay that stays up while stepping, redraw each frame (or set--lifelonger than your tick interval).
On CARLA 0.10.0 (the UE5 line: 5.5 and 5.8)
The HUD variants are gone on 0.10.0. carla.DebugHelper there exposes
exactly seven methods — draw_point, draw_line, draw_arrow, draw_box,
draw_string, clear_debug_shape, clear_debug_string — so the 0.9.14+
draw_hud_point / draw_hud_line / draw_hud_box family (which drew in screen
space, ignoring depth) has no equivalent. Use the world-space calls; they behave
the same on both versions.
clear_debug_shape and clear_debug_string exist on both, and are the only way
to remove a shape before its lifetime expires.
Examples
Example 1: mark a spot
User says: "mark world position (10, 20)"
point --at 10,20,1 --size 0.2 --color 0,255,0 --life 120.
Example 2: label and box an object
User says: "put a box and a label around (30,30)"
box --center 30,30,1 --extent 2,4,1.5 then text --at 30,30,3 --text "target".
Troubleshooting
Problem: nothing shows up
Cause: headless -nullrhi server (no rendering), or sync mode without a tick.
Solution: run a windowed/packaged server; in sync mode tick the world.
Problem: shape vanishes immediately
Cause: very small --life, or a single-frame draw in sync mode.
Solution: raise --life, or redraw each frame for a persistent overlay.
Problem: I can't delete a shape
Cause: debug shapes are not actors.
Solution: they expire on their own; use a short --life, or reload the world.
Outputs
Transient visual overlay in the rendered world. No file, no persistent actor.
Detail (each primitive's parameters, colour/lifetime semantics, sync-mode behaviour) in references/debug.md.
Câu hỏi thường gặp
Tôi có thể chọn hoặc xóa một hình không?
Không. Các hình là lớp phủ chứ không phải actor, nên chúng hết hạn sau thời gian tồn tại.
Tôi có thể dùng màu nào?
Các giá trị đỏ, xanh lá và xanh dương, mỗi giá trị từ 0 đến 255.
Skill dùng tọa độ nào?
Tọa độ thế giới tính bằng mét, viết dạng X, Y và Z.
Chi tiết
Mô tả gốc của tác giả
Draws debug overlays in a running CARLA world via world.debug — points, lines, arrows, bounding boxes, and text strings, each with a colour and lifetime. Use when the user asks to "draw/mark/highlight a point or box in the world", "visualise a path/waypoints", "label a location", or "show something on the map for debugging". Shapes are an overlay, not actors.
repo: carla-simulator/carla
Độ phổ biến
- Sao GitHub
- 15k
- Vị trí xếp hạng
- #11091
- 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ự
diffs
394kGiúp agent của bạn tạo một diff có thể chia sẻ về các chỉnh sửa, dưới dạng liên kết xem hoặc file ảnh, thay vì một bản tóm tắt viết tay.
coding-agent
394kGiúp agent của bạn giao một việc lập trình lớn cho Codex, Claude Code hoặc OpenCode chạy nền, rồi theo dõi tiến độ của nó.
gh-issues
394kGiúp agent của bạn tìm issue trên GitHub, chọn những issue cần xử lý và mở pull request với bản sửa, kể cả theo dõi nhận xét đánh giá.