package-leaderboard-agent
Skill này làm gì
Skill xây dựng image Docker mà CARLA Leaderboard dùng để đánh giá. Skill dành cho lập trình viên chuẩn bị agent lái xe tự động để nộp bài.
Khi nào nên dùng
- ✓Khi bạn muốn xây dựng image Docker cho một bài nộp Leaderboard.
- ✓Khi bạn cần kiểm tra thư mục và môi trường của agent đã đúng trước khi nộp.
- ✓Khi bạn muốn xác nhận image nạp được agent trước khi nộp.
Liên kết skill
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/leaderboard/package-leaderboard-agent/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 xây dựng image Docker Leaderboard cho agent của tôi và kiểm tra rằng nó nạp được trước khi tôi nộp.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent kiểm tra bốn thư mục bắt buộc và cấu trúc file egg mà quá trình build cần, chạy script build, rồi thử bên trong image rằng ngăn xếp import được và agent nạp được.
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.
Package an agent for submission
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.
The leaderboard evaluates a docker image, not a repository. make_docker.sh
assembles one from four trees plus your code:
$CARLA_ROOT/PythonAPI -> /workspace/CARLA/PythonAPI
$SCENARIO_RUNNER_ROOT -> /workspace/scenario_runner
$LEADERBOARD_ROOT -> /workspace/leaderboard
$TEAM_CODE_ROOT -> /workspace/team_code
and bakes PYTHONPATH, TEAM_AGENT, CHALLENGE_TRACK_CODENAME and the routes into
the image.
Instructions
Progress:
- [ ] Step 1: Check prerequisites (bash scripts/check_env.sh) — the four roots and the egg layout
- [ ] Step 2: Confirm the agent runs locally first (run-leaderboard-evaluation)
- [ ] Step 3: Build the image
- [ ] Step 4: Verify the image imports the stack and loads the agent
- [ ] Step 5: Submit
Step 1: The egg trap
make_docker.sh does this unconditionally:
cp -fr ${CARLA_ROOT}/PythonAPI .lbtmp
mv .lbtmp/PythonAPI/carla/dist/carla*-py2*.egg .lbtmp/PythonAPI/carla/dist/carla-leaderboard-py2.7.egg
mv .lbtmp/PythonAPI/carla/dist/carla*-py3*.egg .lbtmp/PythonAPI/carla/dist/carla-leaderboard-py3x.egg
so it fails if $CARLA_ROOT/PythonAPI/carla/dist/ has no .egg files — which is
the case for a pip/wheel-only install. check_env.sh reports this before the build
wastes time. Get a CARLA tree that ships eggs (a release tarball or a source build),
or add the wheel to the image yourself.
The py2.7 rename is legacy; a modern release ships only a py3 egg, so the py2 mv
fails harmlessly and the script continues because it is not run under set -e.
Step 3: Build
source scripts/env.sh
export TEAM_CODE_ROOT=~/team_code
bash scripts/package_agent.sh build # -> leaderboard-user
bash scripts/package_agent.sh build --ros noetic # -> leaderboard-user:ros-noetic
The wrapper checks the roots, warns about the egg layout and about copying a huge
TEAM_CODE_ROOT (model weights inflate the image fast), then calls the repo's
make_docker.sh. Supported ROS distros are exactly melodic, noetic, foxy —
anything else prints the usage and exits.
Set the agent-specific values in the image by editing the block in
scripts/Dockerfile.master:
ENV TEAM_AGENT ${TEAM_CODE_ROOT}/my_agent.py
# ENV TEAM_CONFIG ${TEAM_CODE_ROOT}/config.json
ENV CHALLENGE_TRACK_CODENAME SENSORS
Step 4: Verify before submitting
bash scripts/package_agent.sh verify # imports + agent class inside the image
bash scripts/package_agent.sh shell # interactive poke around
verify runs the image and checks, inside it: carla, agents, srunner and
leaderboard all import; TEAM_AGENT exists and defines the class the evaluator
will derive from its filename; and the declared track is valid. That is the whole
class of failures that otherwise comes back as a rejected submission hours later.
A full local dry run is better still — same image, your own server:
bash scripts/package_agent.sh run --routes-subset 0
Step 5: Submit
Submission is through the leaderboard website (https://leaderboard.carla.org/submit/): push the image to a registry and provide the tag. Read the current instructions there — the mechanics (registry, quotas, allowed track) change between challenge rounds and are not in the repository.
Examples
Example 1: "build the docker image for my agent"
export TEAM_CODE_ROOT=~/team_code, check_env.sh, edit the Dockerfile's
TEAM_AGENT, build, then verify.
Example 2: "make_docker.sh fails on the mv of the egg"
Your CARLA is wheel-only. Use a release tarball for CARLA_ROOT, or copy the
wheel into the image and install it in the Dockerfile instead of relying on the egg.
Example 3: "my ROS agent needs the bridge"
export CARLA_ROS_BRIDGE_ROOT=~/ros-bridge (cloned with
--recurse-submodules -b leaderboard-2.1), then build --ros noetic, which uses
Dockerfile.ros and copies the bridge into the image.
Example 4: "the image builds but the submission is rejected"
Almost always sensors or the agent class. verify catches both;
[[write-leaderboard-agent]] validate catches the sensor budget specifically.
Troubleshoo
Câu hỏi thường gặp
Leaderboard đánh giá cái gì?
Một image Docker thay vì một repository, nên quá trình build đóng gói các công cụ simulator và code của bạn vào image.
Vấn đề egg là gì?
Script build lỗi khi các file gói Python của simulator không khớp tên mà nó mong đợi, nên skill kiểm tra điều này trước.
Nó kiểm tra gì trước khi nộp?
Bốn thư mục bắt buộc, cấu trúc egg, và việc image có import được ngăn xếp và nạp được agent hay không.
Chi tiết
Mô tả gốc của tác giả
Packages an agent for CARLA Leaderboard submission — builds the docker image with make_docker.sh (plain or ROS variant), checks the four required roots and the egg layout it assumes, sets the agent/track/routes environment inside the image, and verifies the image can import the stack and load the agent before submission. Use when the user asks to "build the leaderboard docker image", "submit to the leaderboard", "package my agent", or make_docker.sh fails.
repo: carla-simulator/carla
Độ phổ biến
- Sao GitHub
- 15k
- Vị trí xếp hạng
- #11080
- 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.
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.
write-leaderboard-agent
15kGiúp agent của bạn viết một agent lái xe cho CARLA Leaderboard, với lớp đúng, cấu hình cảm biến trong giới hạn đường đua và file khởi đầu hoạt động.
Skill tương tự
openclaw-update
394kGiúp agent của bạn cập nhật OpenClaw Gateway đang có, chọn cách cập nhật phù hợp với cách cài đặt và giữ phiên làm việc của bạn hoạt động.
diagnose-gateway
394kGiúp agent của bạn tìm hiểu vì sao OpenClaw Gateway bị lỗi bằng cách kiểm tra cài đặt, kênh và cổng mà không thay đổi gì.
crabbox-apps
394kGiúp agent của bạn mở và chạy một app trên máy đám mây tạm thời, rồi hiển thị giao diện của nó trong thanh bên của chat.