write-leaderboard-agent
यह क्या करती है
यह स्किल CARLA Leaderboard के लिए शुरुआती ड्राइविंग एजेंट बनाती है और उसके सेंसर जाँचती है। यह उन डेवलपर्स के लिए है जो सिमुलेटर के लिए अपना स्वायत्त ड्राइविंग एजेंट लिख रहे हैं।
कब इस्तेमाल करें
- ✓जब आप CARLA Leaderboard के लिए नया ड्राइविंग एजेंट लिखना चाहते हैं।
- ✓जब आपको ट्रैक की सीमाओं में फ़िट होने वाला सेंसर सेटअप चुनना हो।
- ✓जब आपका एजेंट लोड न हो और शायद क्लास का नाम गलत हो।
Skill का लिंक
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/leaderboard/write-leaderboard-agent/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“Leaderboard के सेंसर ट्रैक के लिए कैमरा और लिडार वाला ड्राइविंग एजेंट लिखिए, साथ में चलने लायक शुरुआती फ़ाइल भी।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट सेटअप, सेंसर और स्टेप फ़ंक्शन वाली एक ढाँचा क्लास बनाता है, अपने Leaderboard वर्ज़न के हिसाब से कंस्ट्रक्टर इस्तेमाल करता है, और किसी भी टेस्ट रन से पहले सेंसर सेटअप को ट्रैक की सीमाओं से मिलाता है।
तकनीकी सामग्री (मूल 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 नाम की क्लास होनी चाहिए।
क्या Leaderboard के वर्ज़न एक ही कंस्ट्रक्टर इस्तेमाल करते हैं?
नहीं। 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
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
create-leaderboard-route
15kयह आपके एजेंट को CARLA Leaderboard की रूट फ़ाइल बनाने में मदद करती है, जिसमें वेपॉइंट और सीन ट्रिगर कैमरे से लगाए जाते हैं।
package-leaderboard-agent
15kयह आपके एजेंट को CARLA Leaderboard के लिए Docker इमेज बनाने में मदद करती है, और जाँचती है कि इमेज में एजेंट सही लोड होता है।
read-leaderboard-results
15kयह आपके एजेंट को CARLA Leaderboard की नतीजा फ़ाइल पढ़कर हर रूट का स्कोर समझाने और दूसरे नियम संस्करण में फिर से स्कोर करने में मदद करती है।
run-leaderboard-evaluation
15kयह आपके एजेंट को रूट के सेट पर CARLA Leaderboard मूल्यांकन चलाने में मदद करती है, शुरू करने से पहले सेटअप जाँचकर और चेकपॉइंट सेव करके।
मिलती-जुलती skills
add-model-provider
394kयह आपके एजेंट को सुरक्षित कमांड से OpenClaw में नया AI मॉडल प्रोवाइडर जोड़ने, API कीज़ को सादे टेक्स्ट से बचाने और लाइव टेस्ट चलाने देती है।
acp-router
394kयह आपके एजेंट को OpenClaw के ज़रिए Claude Code या Cursor जैसे कोडिंग असिस्टेंट को काम भेजने देती है, ताकि काम उसी टूल में चले।
browser-automation
394kयह आपके एजेंट को लॉगिन, टैब और अटकी वेब पेज से उबरने समेत, वेबसाइट पर चरण-दर-चरण काम करना सिखाती है।