본문으로 건너뛰기
cccskills
무료GitHub에 공개

package-leaderboard-agent

Package a CARLA Leaderboard agent into a Docker image for submission. It checks required directories and Python package files, supports ROS variants, and verifies that dependencies import and the agent loads inside the image.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

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.

설치 방법 보기

이럴 때 유용합니다

  • Build a Docker image for Leaderboard submission
  • Investigate missing egg files in make_docker.sh
  • Package a ROS agent with its bridge
  • Verify imports and agent loading before submission

포함된 파일(5)

  • SKILL.md7.2 KB
  • references/submission.md5.0 KB
  • scripts/check_env.sh7.6 KB
  • scripts/env.sh5.0 KB
  • scripts/package_agent.sh6.6 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Package an agent for submission

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.

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.

Troubleshooting

Problem: Error $CARLA_ROOT is empty. Set $CARLA_ROOT as an environment variable first. Cause: make_docker.sh checks all four roots up front (and CARLA_ROS_BRIDGE_ROOT when -r is given). Solution: export them; source scripts/env.sh does the first three.

Problem: mv: cannot stat '.lbtmp/PythonAPI/carla/dist/carla*-py3*.egg' Cause: no egg in the CARLA tree. Solution: see Step 1.

Problem: the image is tens of gigabytes Cause: TEAM_CODE_ROOT is copied wholesale — datasets, checkpoints, .git. Solution: keep only what the agent needs at runtime; check_env.sh reports the directory size before you build.

Problem: python3: can't open file '/workspace/leaderboard/leaderboard/leaderboard_evaluator.py' Cause: LEADERBOARD_ROOT pointed somewhere that is not a leaderboard checkout, so the copy landed wrong. Solution: check_env.sh validates each root by looking for its marker file.

Problem: imports work locally but not in the image Cause: the image's PYTHONPATH uses carla-leaderboard-py3x.egg, a renamed copy of your egg. If your local setup used a wheel, the image is using a different client. Solution: verify, and make the local and image clients the same.

Problem: the ROS image builds but the stack never starts Cause: ROS_DISTRO mismatch with what your launch files expect, or the bridge was cloned without submodules. Solution: re-clone with --recurse-submodules; build with the matching distro.

Outputs

A docker image (leaderboard-user, or leaderboard-user:ros-<distro>) containing CARLA's PythonAPI, the paired scenario_runner and leaderboard, your team code and the environment the evaluator expects. verify reports whether the image can actually import the stack and load the agent.

Dockerfile contents, the environment it bakes in, and what the submission expects are in references/submission.md.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Add a message type to CARLA's native ROS 2 interface. Create its C++ data structure, serialization code for transmission, type identity hash, registration, and tests, with Docker-based hash calculation and build checks.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Adding a standard ROS 2 message type missing from CARLA
  • Defining a custom carla_msgs message
  • Investigating type-hash warnings
carla-simulator/carla1.5만2026년 10월 22일 업데이트

Extend CARLA’s native ROS 2 interface to publish sensor data or receive vehicle commands. Covers topic implementation, registration, data connections, and verification, plus adding middleware, the communication layer used to exchange messages.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Publish obstacle sensor data to ROS 2
  • Add a topic for vehicle speed commands
  • Integrate another communication middleware
carla-simulator/carla1.5만2026년 10월 22일 업데이트

Summarize ScenarioRunner results to see which scenarios passed and which checks failed. Compare runs before and after changes, or analyze recorded driving to produce measurements and plots of vehicle distance and deviation from the lane center.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Checking scenario pass and fail results
  • Comparing results before and after controller changes
  • Plotting vehicle distances from a recorded run
carla-simulator/carla1.5만2026년 10월 22일 업데이트

Checks a local CARLA checkout for missing API documentation, outdated references, broken links, and pages absent from navigation. Produces a grouped Markdown report without building the project or running the simulator.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Reviewing documentation before a release
  • Finding missing or outdated API references
  • Checking broken links and navigation gaps
carla-simulator/carla1.5만2026년 10월 22일 업데이트

Read and display CARLA object bounding boxes, then project them onto a camera image as 2D rectangles. Export an annotated PNG and box coordinates in JSON for object detection annotation work.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Adding vehicle boxes to a camera image
  • Exporting box coordinates for detection annotations
  • Checking vehicle dimensions
carla-simulator/carla1.5만2026년 10월 22일 업데이트

Builds CARLA's ue4-dev branch on Linux, producing the Unreal Engine 4.26 editor, server modules, and an installed Python client package. Fetches required content, optionally compiles native ROS 2 support, and verifies the build against a source-built server.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Building CARLA ue4-dev from source
  • Compiling CARLA with native ROS 2 support
  • Building the Python client for an existing environment
carla-simulator/carla1.5만2026년 10월 22일 업데이트

carla-simulator의 스킬 모두 보기

이 스킬의 문제 신고