write-leaderboard-agent
Qué hace
La skill crea un agente de conducción inicial para el Leaderboard de CARLA y revisa sus sensores. Está pensada para desarrolladores que escriben su propio agente de conducción autónoma para el simulador.
Cuándo usarla
- ✓Cuando quieres escribir un nuevo agente de conducción para el Leaderboard de CARLA.
- ✓Cuando necesitas elegir una configuración de sensores que encaje con los límites de un circuito.
- ✓Cuando tu agente no carga y el nombre de la clase puede ser incorrecto.
Link de la skill
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/leaderboard/write-leaderboard-agent/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Escribe un agente de conducción con cámara y lidar para el circuito de sensores del Leaderboard, con un archivo inicial que funcione.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente genera una clase base con funciones de configuración, de sensores y de paso, usa el constructor que corresponde a tu versión del Leaderboard y comprueba la configuración de sensores frente a los límites del circuito antes de cualquier prueba.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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
Preguntas frecuentes
¿Por qué no carga mi agente?
El nombre del archivo debe coincidir con el de la clase: my_agent.py necesita una clase llamada MyAgent.
¿Las versiones del Leaderboard usan el mismo constructor?
No. Las versiones 1.0 y 2.x difieren, así que la skill genera el que corresponde a tu versión.
¿Cubre ROS?
Sí. Cubre las clases base de agentes para ROS 1 y ROS 2.
Detalles
Descripción original del autor
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
Popularidad
- Estrellas en GitHub
- 15 mil
- Posición en el ranking
- #11083
- Licencia
- MIT
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
create-leaderboard-route
15 milAyuda a tu agente a crear rutas para el Leaderboard de CARLA, colocando puntos de paso y disparadores de escenario desde la cámara del simulador.
package-leaderboard-agent
15 milAyuda a tu agente a empaquetar un agente de conducción en una imagen de Docker para el Leaderboard de CARLA, y comprueba que la imagen lo carga.
read-leaderboard-results
15 milAyuda a tu agente a leer los resultados del Leaderboard de CARLA, explicar la puntuación e infracciones de cada ruta y recalcular la ejecución con otra versión de las reglas.
run-leaderboard-evaluation
15 milAyuda a tu agente a ejecutar el evaluador del Leaderboard de CARLA en un conjunto de rutas, revisando antes la configuración y guardando puntos de control.
Skills parecidas
add-model-provider
394 milPermite que tu agente conecte un nuevo proveedor de modelos de IA a OpenClaw con comandos de configuración seguros, mantenga las claves API fuera del texto plano y haga una prueba en vivo.
acp-router
394 milAyuda a tu agente a enviar una tarea a un asistente de programación como Claude Code o Cursor a través de OpenClaw, para que el trabajo se ejecute en esa herramienta.
browser-automation
394 milEnseña a tu agente a controlar páginas web paso a paso, incluidos los inicios de sesión, las pestañas y la recuperación cuando una página deja de responder.