control-traffic
यह क्या करती है
यह स्किल सिमुलेटर में ऑटोमैटिक ट्रैफ़िक के चलने का तरीका तय करती है। यह उन लोगों के लिए है जो अपने टेस्ट दृश्यों में ट्रैफ़िक को तेज़, धीमा या ज़्यादा रैंडम चाहते हैं।
कब इस्तेमाल करें
- ✓जब आप चाहते हैं कि ऑटोपायलट गाड़ियाँ तेज़ या धीमी चलें।
- ✓जब आप चाहते हैं कि गाड़ियाँ ज़्यादा या कम दूरी रखें, या लाल बत्ती पार करें।
- ✓जब आप चाहते हैं कि दोहराए गए रन में ट्रैफ़िक एक जैसा रहे, फ़िक्स्ड सीड के साथ।
Skill का लिंक
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/python-api/control-traffic/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“सारे ट्रैफ़िक को 30 प्रतिशत तेज़ कीजिए, 3 मीटर की दूरी रखिए, और दोहराए जाने वाले रन के लिए फ़िक्स्ड सीड इस्तेमाल कीजिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट सेटिंग्स को सभी ऑटोपायलट गाड़ियों पर, या किसी एक गाड़ी पर लागू करता है, उसी Traffic Manager पोर्ट पर जिस पर गाड़ियाँ स्पॉन हुई थीं। वह दोहराए जाने वाले रन के लिए सीड भी सेट कर सकता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Control the Traffic Manager
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.
Shape how autopilot vehicles drive — globally (all cars on a TM port) or
per-vehicle. This is the counterpart to control-vehicle:
that skill drives one car manually; this one tunes the autonomous traffic. It
affects cars enrolled in autopilot (see spawn-vehicles),
on the matching --tm-port.
Instructions
Progress:
- [ ] Step 1: Check prerequisites (bash scripts/check_env.sh), clear FAILs
- [ ] Step 2: Have autopilot vehicles on the TM port (spawn-vehicles)
- [ ] Step 3: Apply global and/or per-vehicle settings
- [ ] Step 4: Watch the change on a rendered server
Commands need CARLA_HOST/CARLA_PORT/TM_PORT from scripts/env.sh. Use the
same --tm-port the vehicles were spawned on (default 8000).
Step 1: Check prerequisites
bash scripts/check_env.sh
Step 3: Tune
source scripts/env.sh
# GLOBAL: all traffic 30% faster than the limit, keep 3 m, deterministic
python3 scripts/traffic.py global --speed-diff -30 --distance 3 --seed 42
# EVERY car: run 50% of red lights, allow lane changes
python3 scripts/traffic.py all --ignore-lights 50 --auto-lane-change on
# ONE car (the ego's neighbour): crawl, hug the right, TM manages its lights
python3 scripts/traffic.py vehicle --id 42 --speed-diff 60 --lane-offset 0.5 --lights on
# make the ego's autopilot reckless
python3 scripts/traffic.py vehicle --role hero --ignore-vehicles 40 --ignore-signs 100
# TM sync (only alongside a synchronous world — see set-world-settings)
python3 scripts/traffic.py sync on
Step 4: Verify
Watch the traffic on a rendered server. Settings are write-only on the TM (no read-back), so the command reports what it set and to how many vehicles.
Examples
Example 1: faster traffic
User says: "make the traffic move faster"
global --speed-diff -40 (40% above the limit). Negative = faster.
Example 2: chaos for testing
User says: "make cars run lights and ignore each other"
all --ignore-lights 100 --ignore-vehicles 60 — expect collisions (that's the
point of the test).
Example 3: deterministic traffic run
User says: "same traffic behaviour every run"
global --seed 42, in synchronous mode (sync on + set-world-settings), spawn
with a seed. Seed + sync is what makes it reproducible.
Troubleshooting
Problem: nothing changes
Cause: cars aren't on this TM port, or aren't on autopilot, or you set the ego
(which you're driving manually).
Solution: match --tm-port to the spawn; ensure autopilot is on (spawn-vehicles
default); target autopilot cars.
Problem: cars froze after sync on
Cause: TM sync without a synchronous, ticked world (or vice-versa).
Solution: keep TM sync and world sync in step and tick the world (set-world-settings).
Problem: --speed-diff 30 made them slower, not faster
Cause: the value is % below the limit.
Solution: use a negative value to go faster (-30 = 30% above the limit).
Problem: collisions everywhere
Cause: high --ignore-vehicles / --ignore-lights.
Solution: lower them; 0 restores full caution.
Outputs
Traffic Manager behaviour state (global + per-vehicle). No file, no read-back; the command reports what it applied.
Detail (every setting, the speed-difference sign, hybrid physics, determinism, sync coupling) in references/traffic-manager.md.
अक्सर पूछे जाने वाले सवाल
कौन-सी सेटिंग्स बदली जा सकती हैं?
गति, आगे की दूरी, लाल बत्ती या संकेत को नज़रअंदाज़ करना, लेन बदलना, लेन ऑफ़सेट, और डिटरमिनिस्टिक सीड।
क्या यह मेरी अपनी कार को नियंत्रित करती है?
नहीं। यह ऑटोपायलट गाड़ियों को ट्यून करती है, जबकि हाथ से ड्राइविंग एक अलग स्किल में है।
कौन-सा पोर्ट इस्तेमाल करूँ?
उसी Traffic Manager पोर्ट का जिस पर गाड़ियाँ स्पॉन हुई थीं, जो डिफ़ॉल्ट रूप से 8000 है।
जानकारी
लेखक का मूल विवरण
Tunes the CARLA Traffic Manager that drives autopilot vehicles — global and per-vehicle speed, following distance, running lights/signs, lane-change behaviour, lane offset, TM-managed lights, deterministic seed, hybrid physics, and TM sync mode. Use when the user asks to "make the traffic faster/slower", "let cars run red lights", "keep more distance", "stop lane changes", "make traffic deterministic", or otherwise change how autopilot cars behave. For manually driving one car, use control-vehicle.
repo: carla-simulator/carla
लोकप्रियता
- GitHub स्टार
- 15k
- रैंकिंग में स्थान
- #11088
- लाइसेंस
- 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
blucli
394kयह आपके एजेंट को blu कमांड से Bluesound और NAD स्पीकर खोजने, चलाने, रोकने, समूह बनाने और वॉल्यूम बदलने में मदद करती है।
camsnap
394kयह आपके एजेंट को नेटवर्क कैमरों और लोकल webcam से स्नैपशॉट, छोटी क्लिप या मोशन इवेंट लेने में मदद करती है, जो आपने सेट किए हों।
eightctl
394kयह आपके एजेंट को Eight Sleep pod की जांच और नियंत्रण करने में मदद करती है, जिसमें तापमान, अलार्म और नींद की समय-सारणी शामिल हैं।