write-leaderboard-agent
하는 일
스킬은 CARLA Leaderboard용 시작 주행 에이전트를 만들고 센서를 확인합니다. 시뮬레이터용 자율 주행 에이전트를 직접 작성하는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓CARLA Leaderboard에 쓸 새 주행 에이전트를 작성하고 싶을 때.
- ✓트랙의 제한에 맞는 센서 구성을 골라야 할 때.
- ✓에이전트가 로드되지 않고 클래스 이름이 틀렸을 수 있는 경우.
스킬 링크
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/leaderboard/write-leaderboard-agent/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“Leaderboard 센서 트랙용으로 카메라와 라이다를 쓰는 주행 에이전트를 작성하고, 작동하는 시작 파일도 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 설정, 센서, 스텝 함수가 있는 골격 클래스를 만들고, 사용자의 리더보드 버전에 맞는 생성자를 쓰며, 테스트 실행 전에 센서 구성을 트랙 제한과 비교해 확인합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Write a Leaderboard agent
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.
An agent is one Python file with one class. The Leaderboard imports it by path and instantiates it by a name derived from the file name:
module_name = os.path.basename(args.agent).split('.')[0] # my_agent.py -> my_agent
# ... the evaluator then looks for the TitleCase, underscore-stripped class
so my_agent.py must contain class MyAgent. That is the first thing that goes
wrong, and the error is a bare AttributeError.
Instructions
Progress:
- [ ] Step 1: Check prerequisites (bash scripts/check_env.sh) — confirms the LB version
- [ ] Step 2: Generate the skeleton for your track and version
- [ ] Step 3: Declare sensors inside the budget; validate offline
- [ ] Step 4: Implement run_step
- [ ] Step 5: Smoke-test on routes_devtest.xml
Step 2: Skeleton
source scripts/env.sh
python3 scripts/agent_tools.py scaffold --name MyAgent --track SENSORS --out ~/team_code
python3 scripts/agent_tools.py scaffold --name MyMapAgent --track MAP --out ~/team_code
The scaffold reads the detected leaderboard version and emits the correct constructor for it — this is the one hard API break between 1.0 and 2.x:
# 1.0 — the base class calls setup() from __init__
def __init__(self, path_to_conf_file): ...
# 2.0 / 2.1 — the evaluator constructs, then calls setup() itself
def __init__(self, carla_host, carla_port, debug=False): ...
A 1.0 agent run under a 2.x evaluator receives a host string where it expects a
config path. If you override __init__ at all, match the version; if you do not
override it, both work.
Step 3: Sensors
def sensors(self):
return [
{'type': 'sensor.camera.rgb', 'id': 'Center',
'x': 0.7, 'y': 0.0, 'z': 1.60, 'roll': 0.0, 'pitch': 0.0, 'yaw': 0.0,
'width': 800, 'height': 600, 'fov': 100},
{'type': 'sensor.lidar.ray_cast', 'id': 'LIDAR',
'x': 0.7, 'y': 0.0, 'z': 1.60, 'roll': 0.0, 'pitch': 0.0, 'yaw': 0.0},
{'type': 'sensor.other.imu', 'id': 'IMU', 'x': 0.7, 'y': 0.0, 'z': 1.60,
'roll': 0.0, 'pitch': 0.0, 'yaw': 0.0},
{'type': 'sensor.other.gnss', 'id': 'GPS', 'x': 0.7, 'y': -0.4, 'z': 1.60},
{'type': 'sensor.speedometer', 'id': 'Speed'},
]
python3 scripts/agent_tools.py validate --agent ~/team_code/my_agent.py --track SENSORS
validate runs the actual validate_sensor_configuration() from your
checkout, so it enforces the real budget for your version and track rather than a
copy of it. Budgets (2.0/2.1; qualifier tracks halve them, and match 1.0's):
| Sensor | SENSORS / MAP | *_QUALIFIER and LB 1.0 |
|---|---|---|
sensor.camera.rgb |
8 | 4 |
sensor.lidar.ray_cast |
2 | 1 |
sensor.other.radar |
4 | 2 |
sensor.other.gnss |
1 | 1 |
sensor.other.imu |
1 | 1 |
sensor.speedometer |
1 | 1 |
sensor.opendrive_map |
1 (MAP tracks only) | 1 |
Three constraints beyond the counts:
- Every
idmust be unique — duplicates are rejected outright. - Mount radius ≤ 3.0 m from the ego origin:
sqrt(x²+y²+z²) > 3.0is rejected. sensor.opendrive_mapon a SENSORS track is rejected, which is the entire difference between the SENSORS and MAP tracks.
You do not control sensor attributes except camera resolution/fov and the mount.
agent_wrapper.py hard-codes the rest: lidar is always 64 channels, 85 m range,
10 Hz, 600k points/s with fixed dropoff; radar 1500 points, 100 m; GNSS and IMU
noise are fixed. Setting range or channels in your sensor dict is silently
ignored. That is deliberate — it is what makes submissions comparable.
Step 4: run_step
def run_step(self, input_data, timestamp):
# input_data is {id: (frame, data)} for every sensor in sensors()
frame, img = input_data['Center'] # numpy BGRA, (height, width, 4)
_, gnss = input_data['GPS'] # [lat, lon, alt]
_, imu = input_data['IMU'] # [ax, ay, az, gx, gy, gz, compass]
_, speed = input_data['Speed'] # {'speed': m/s}
control = carla.VehicleControl()
control.steer, control.throttle, control.brake = 0.0, 0.5, 0.0
return control
- Return a `carla.VehicleContro
자주 묻는 질문
에이전트가 로드되지 않는 이유는?
파일 이름이 클래스 이름과 맞아야 하므로, my_agent.py에는 MyAgent라는 클래스가 필요합니다.
리더보드 버전마다 생성자가 같나요?
아닙니다. 1.0과 2.x가 다르므로, 스킬은 사용자의 버전에 맞는 생성자를 만듭니다.
ROS도 다루나요?
네. ROS 1과 ROS 2의 에이전트 기본 클래스를 다룹니다.
상세 정보
작성자의 원본 설명
Writes an autonomous agent for the CARLA Leaderboard — an AutonomousAgent subclass with setup/sensors/run_step/destroy, a sensor suite inside the track's budget, and the right constructor signature for the leaderboard version (1.0 and 2.x differ). Generates a working skeleton, validates the sensor configuration against the real per-track limits offline, and covers the ROS1/ROS2 agent base classes. Use when the user asks to "write a leaderboard agent", "make my agent work with the leaderboard", "add sensors to my agent", "port my agent to 2.1", or hits SensorConfigurationInvalid.
repo: carla-simulator/carla
인기도
- GitHub 스타
- 15k
- 순위
- #11083
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
create-leaderboard-route
15k카메라 화면에서 웨이포인트와 시나리오 트리거를 배치하고, 확인하고, 순서를 정해 CARLA 리더보드 경로 파일을 만들도록 에이전트를 돕습니다.
package-leaderboard-agent
15k주행 에이전트를 CARLA Leaderboard 제출용 Docker 이미지로 패키징하고, 폴더 구조를 확인하며 이미지가 에이전트를 로드하는지 테스트하도록 돕습니다.
read-leaderboard-results
15kCARLA Leaderboard 결과 파일을 읽고 경로별 점수와 위반 사항을 설명하며, 다른 규칙 버전에서 실행을 다시 채점하도록 에이전트를 돕습니다.
run-leaderboard-evaluation
15k주행 에이전트로 경로 세트에 대한 CARLA Leaderboard 평가를 실행하도록 돕습니다. 먼저 설정을 확인하고, 재개할 수 있는 체크포인트를 저장합니다.
비슷한 스킬
add-model-provider
394k에이전트가 안전한 설정 명령으로 새 AI 모델 제공자를 OpenClaw에 연결하고, API 키를 평문으로 두지 않으며, 실시간 테스트를 실행하도록 돕습니다.
acp-router
394k에이전트가 OpenClaw를 통해 Claude Code나 Cursor 같은 코딩 도우미에 작업을 전달해, 작업이 그 도구에서 실행되도록 돕습니다.
browser-automation
394k에이전트가 로그인, 탭, 페이지 응답이 멈췄을 때의 복구를 포함해 웹 페이지를 단계별로 조작하도록 가르칩니다.