मुख्य सामग्री पर जाएँ
Skillpedia
टेस्टिंग15k · #11110

run-openscenario

यह क्या करती है

यह स्किल OpenSCENARIO मानक में लिखी परिदृश्य फ़ाइलें चलाती है, जिनका इस्तेमाल कई ड्राइविंग टूल करते हैं, CARLA सिमुलेटर के भीतर। यह उन इंजीनियरों के लिए है जो साझा परिदृश्य फ़ाइलों से सेल्फ़-ड्राइविंग सॉफ़्टवेयर परखते हैं।

कब इस्तेमाल करें

  • ✓जब आपके पास किसी दूसरे टूल से OpenSCENARIO फ़ाइल है और आप उसे CARLA में चलाना चाहते हैं।
  • ✓जब आप चलाने से पहले परिदृश्य फ़ाइल में गड़बड़ियाँ जाँचना चाहते हैं।
  • ✓जब आपको जानना हो कि CARLA मानक का कौन-सा हिस्सा सपोर्ट करता है।

Skill का लिंक

https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/scenario-runner/run-openscenario/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/scenario-runner/run-openscenario/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“क्या आप CARLA में यह OpenSCENARIO फ़ाइल चला सकते हैं, पहले उसमें गड़बड़ियाँ जाँचकर, और बता सकते हैं कि कोई फ़ीचर असमर्थित है या नहीं?”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट फ़ाइल को मानक के नियमों से जाँचता है, फिर मिलते हुए विकल्प के साथ रन शुरू करता है। इनमें से कई फ़ाइलों में उनका अपना मैप और कारें होती हैं, इसलिए अलग से मैप का नाम नहीं चाहिए।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Run an OpenSCENARIO file

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.

ScenarioRunner speaks two unrelated standards that happen to share a name:

OpenSCENARIO 1.x OpenSCENARIO 2.0
Extension .xosc .osc
Format XML (<Storyboard>, <Act>, <Maneuver>) a domain-specific language
Flag --openscenario --openscenario2
Implementation srunner/tools/openscenario_parser.py srunner/osc2/ (ANTLR grammar)
Maturity broad, partial experimental

They are not versions of each other and no file works with both flags.

Unlike Python scenarios, an OSC file carries its own map, entities and ego — so there is no --scenario name, no town lookup, and --reloadWorld is implied by whatever <RoadNetwork> says.

Instructions

Progress:
- [ ] Step 1: Check prerequisites (bash scripts/check_env.sh)
- [ ] Step 2: Find or validate the file (list / validate)
- [ ] Step 3: Run it with the right flag
- [ ] Step 4: Drive or observe the ego if the file expects an external controller

Step 2: Find and validate

source scripts/env.sh

bash scripts/run_openscenario.sh list                  # bundled .xosc and .osc, per branch
bash scripts/run_openscenario.sh validate path/to.xosc # schema + map + entity check, no server

validate is worth running first: it resolves the <RoadNetwork><LogicFile> map against the server's map list, checks catalog references, and reports the ParameterDeclarations you can override — all of which otherwise fail several seconds into a run, after the world has already been reloaded.

Step 3: Run

source scripts/env.sh

# OpenSCENARIO 1.x
bash scripts/run_openscenario.sh run "$SCENARIO_RUNNER_ROOT/srunner/examples/FollowLeadingVehicle.xosc"

# with global parameter overrides — note the 'key: value' comma-separated form
PARAMS='leadingSpeed: 8.0, egoSpeed: 12.0' \
    bash scripts/run_openscenario.sh run .../FollowLeadingVehicle.xosc

# OpenSCENARIO 2.0
bash scripts/run_openscenario.sh run2 "$SCENARIO_RUNNER_ROOT/srunner/examples/cut_in_and_slow_right.osc"

Direct equivalents:

python3 "$SCENARIO_RUNNER_ROOT/scenario_runner.py" --openscenario  file.xosc --openscenarioparams 'k: v'
python3 "$SCENARIO_RUNNER_ROOT/scenario_runner.py" --openscenario2 file.osc

--openscenarioparams overrides only entries in the global ParameterDeclarations; per-story parameters are not reachable. The format is 'name: value, name2: value2' — it is split on , then on : and both sides are stripped, so a value containing either character breaks the parse.

The OSC timeout is hard-coded to 100000 seconds for both flags. A stuck OSC run does not time out on its own; interrupt it.

Step 4: Who drives the ego

An .xosc that assigns a controller (<ObjectController> with the CARLA NpcVehicleDriving / simple_vehicle_control controllers) drives itself. One that declares the ego with an external controller does not — same silent "nothing happens" as with Python scenarios:

python3 "$SCENARIO_RUNNER_ROOT/manual_control.py" -a --rolename=hero

--rolename picks the actor (default hero); -a hands it to the autopilot. Drop -a to drive it by keyboard.

OscControllerExample.xosc is the file to read for how controllers are wired.

Examples

Example 1: "run this xosc I got from another tool"

validate first. The two usual rejections are a map name the server does not have (<LogicFile filepath="Town04"> needs Town04 loaded/available) and OSC features ScenarioRunner does not implement — validate names both. Then run.

Example 2: "sweep a parameter"

for v in 4 8 12; do
  PARAMS="leadingSpeed: $v" bash scripts/run_openscenario.sh run .../FollowLeadingVehicle.xosc
done

Example 3: "try OpenSCENARIO 2.0"

list shows the .osc corpus (cut_in_and_slow_right.osc, overtake1.osc, follow_trajectory.osc, …). On ue5-master and ue58-dev they live in srunner/osc_examples/, not srunner/examples/. Expect gaps: the osc2 pipeline parses a subset of the language and raises from srunner/osc2/ on the rest.

Troubleshooting

Problem: File does not exist Cause: ScenarioRunner checks the path before anything else, and relative paths resolve agains

अक्सर पूछे जाने वाले सवाल

दोनों फ़ाइल प्रकारों में क्या फ़र्क है?

.xosc फ़ाइलें 1.x मानक का इस्तेमाल करती हैं, जबकि .osc फ़ाइलें 2.0 भाषा में हैं, जो अभी प्रायोगिक है।

क्या फ़ाइल को अलग मैप सेटिंग चाहिए?

आम तौर पर नहीं। इन फ़ाइलों में उनका रोड नेटवर्क शामिल होता है, इसलिए मैप फ़ाइल से आता है।

क्या यह ऐसी फ़ाइल चला सकती है जो कार के लिए बाहरी कंट्रोलर चाहती है?

हाँ। अगर फ़ाइल को बाहरी कंट्रोलर की ज़रूरत है, तो स्किल मुख्य कार को चला या देख सकती है।

जानकारी

लेखक का मूल विवरण

Runs standard-format scenarios through ScenarioRunner — ASAM OpenSCENARIO 1.x (.xosc, via --openscenario, with catalogs and ParameterDeclaration overrides) and OpenSCENARIO 2.0 (.osc, via --openscenario2, the ANTLR/osc2 pipeline). Validates a file against the schema before running, lists the bundled examples, and reports which OSC features ScenarioRunner actually implements. Use when the user asks to "run an xosc", "run an OpenSCENARIO file", "use the OpenSCENARIO standard", "run a .osc / OSC2 scenario", or hands over a scenario file from another tool.

repo: carla-simulator/carla

लोकप्रियता

GitHub स्टार
15k
रैंकिंग में स्थान
#11110
लाइसेंस
MIT
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

create-leaderboard-route

15k

यह आपके एजेंट को CARLA Leaderboard की रूट फ़ाइल बनाने में मदद करती है, जिसमें वेपॉइंट और सीन ट्रिगर कैमरे से लगाए जाते हैं।

अन्यविविध

package-leaderboard-agent

15k

यह आपके एजेंट को CARLA Leaderboard के लिए Docker इमेज बनाने में मदद करती है, और जाँचती है कि इमेज में एजेंट सही लोड होता है।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

read-leaderboard-results

15k

यह आपके एजेंट को CARLA Leaderboard की नतीजा फ़ाइल पढ़कर हर रूट का स्कोर समझाने और दूसरे नियम संस्करण में फिर से स्कोर करने में मदद करती है।

डेटाएनालिसिस और स्प्रेडशीट

run-leaderboard-evaluation

15k

यह आपके एजेंट को रूट के सेट पर CARLA Leaderboard मूल्यांकन चलाने में मदद करती है, शुरू करने से पहले सेटअप जाँचकर और चेकपॉइंट सेव करके।

कोडिंगटेस्टिंग

मिलती-जुलती skills