इसे छोड़कर कंटेंट पर जाएं

OpenDRIVE / OpenSCENARIO / esmini में एक्सपोर्ट

drawtonomy आपके हाथ से बनाए दृश्य को ASAM OpenDRIVE (.xodr) रोड नेटवर्क और OpenSCENARIO (.xosc) सिनारियो में बदल देता है — दोनों एक zip में बंधे होते हैं जिसे आप esmini में सीधे चला सकते हैं।

यह conversion जानबूझकर basic है — केवल वही shapes convert होती हैं जो ASAM data model में साफ-साफ map होती हैं, बाकी सब छोड़ दिया जाता है। यह पेज बताता है कि ठीक-ठीक क्या convert होता है, exported vehicle क्या करती है, और क्या scope से बाहर है — ताकि output कभी ज़रूरत से ज़्यादा वादे न करे।

नीचे का वीडियो एक ही take में है: intersection बनाएं, path बनाएं, footprints generate करें, esmini zip export करें, फिर exported .xosc को esmini में चलाएं।

एक take: intersection बनाएं, path बनाएं, footprints generate करें, esmini zip export करें, फिर .xosc को esmini में चलाएं।

एडिटर से एक्सपोर्ट करें

Section titled “एडिटर से एक्सपोर्ट करें”

ASAM export का एक ही entry point है। drawtonomy में .xodr / .xosc के अलग-अलग menu item नहीं हैं — दोनों फ़ाइलें एक साथ बनती हैं और एक zip में pack होती हैं।

Export submenu में .zip (esmini) highlighted

  1. अपना दृश्य बनाएं (लेन, intersection, vehicles, path…)।
  2. Menu खोलें → Export → .zip (esmini)
  3. Prompt पर एक base name डालें (default: drawtonomy-<date>)।
  4. <name>.zip download होगी जिसमें <name>.xodr, <name>.xosc, और esmini के लिए ज़रूरी 3D model assets होंगी।

पूरा current page export होता है — ASAM target के लिए “selection only” mode नहीं है।

Terminal window
unzip drawtonomy-2026-05-30.zip
cd drawtonomy-2026-05-30
esmini --osc drawtonomy-2026-05-30.xosc --window 60 60 1024 768

esmini में exported trajectory follow करती vehicle

Vehicle orange line पर चलती है — वह line ही है FollowTrajectoryAction जो आपके बनाए path से generate हुई है।

drawtonomy shapeOpenDRIVE elementनोट
Laneएक <road>1 लेन = 1 independent road
Traffic lightनिकटतम road पर <signal>केवल vehicle / pedestrian type
Crosswalk<object type="crosswalk">road के लंबवत रखा जाता है
Polygon (≥3 points)<object type="patch"> with <outline>intersection/area visuals के लिए

बाकी सब — vehicles, pedestrians, standalone points, free linestrings, text, images — .xodr में नहीं लिखे जाते।

प्रत्येक road कैसी होती है:

  • Geometry केवल straight lines। Road reference line को लेन की left/right boundaries से sample किया जाता है और <line> segments के रूप में emit किया जाता है। कोई arc, spiral, या poly3 geometry नहीं बनती।
  • Fixed lane layout। हर road को exactly एक left lane (id=1), एक center lane (id=0), और एक right lane (id=-1) मिलती है, सभी type="driving"। Multi-lane roads और multiple lane sections represent नहीं होते।
  • Road marks hard-coded solid white 0.13 m line हैं।
  • कोई junction नहीं। हर road junction="-1" carry करती है और कोई <junction> element कभी नहीं बनता। Intersections केवल polygon patch (visuals) और लेन के next / prev connections से derived predecessor/successor links द्वारा दर्शाए जाते हैं (केवल पहली entry)।
  • कोई elevation / superelevation नहींelevationProfile और lateralProfile खाली (flat, planar roads) emit होते हैं।
  • Scale 16.67 px/m fixed है; geographic origin 0 है।
drawtonomy shapeOpenSCENARIO element
Vehicleएक <ScenarioObject> (<Vehicle> या <Pedestrian>)
Path footprint (head vehicle)एक <FollowTrajectoryAction>

“pedestrian” वह vehicle shape है जिसका template name एक pedestrian/walk pattern से match करता है — वह <Vehicle> की जगह <Pedestrian> के रूप में emit होती है। Lanes, crosswalks, traffic lights और free linestrings .xosc में emit नहीं होते।

Exported scenario जानबूझकर minimal है:

  • एकमात्र dynamic behavior FollowTrajectoryAction है — एक time-stamped polyline। कोई speed actions, lane changes, traffic-light responses, collision avoidance, या interaction conditions नहीं हैं।
  • हर moving entity SimulationTime ≥ 0 पर शुरू होती है और scenario में 60 s पर StopTrigger hard-coded है।

Path footprint से vehicle motion कैसे बनती है

Section titled “Path footprint से vehicle motion कैसे बनती है”

यह dynamic export का मूल है, इसलिए यहाँ सटीक जानकारी ज़रूरी है।

Footprint panel: Variable positioning, Interval और Anchor समझाया गया

Path वह linestring है जो आप बनाते हैं, और footprints vehicle की ghost copies हैं जो उस path पर बिछी होती हैं (editor में दिखने वाला trail)। Export पर:

  1. केवल leading footprint (पहला) एक moving <ScenarioObject> बनता है। बाकी trailing ghosts canvas-side preview हैं और drop हो जाते हैं — आपको एक vehicle मिलती है जो पूरा path चलाती है, queue नहीं।
  2. Path के control points trajectory vertices बनते हैं, world (ENU) meters में।
  3. प्रत्येक vertex को एक time मिलता है, और result <Trajectory><Polyline> of <Vertex time="…"> के रूप में <FollowTrajectoryAction> के अंदर लिखा जाता है।

Speed fixed है (यह मुख्य सीमा है)

Section titled “Speed fixed है (यह मुख्य सीमा है)”

Trajectory hard-coded 10 m/s (≈ 36 km/h) पर timed है। drawtonomy के UI में कोई speed field नहीं है, और exporter कभी default override नहीं करता। esmini में entity ~36 km/h report करेगी चाहे आपने जो भी बनाया हो। आप speed set नहीं करते — आप footprint layout के ज़रिए timing को shape करते हैं, जैसा नीचे बताया गया है।

Path का “Variable positioning” toggle on है या off — यह तय करता है कि trajectory के साथ time कैसे distribute होता है:

  • Uniform (toggle OFF) — footprints equal arc-length Intervals पर बैठते हैं और time distance / 10 m/s है। Motion constant speed है। Interval बदलने से केवल vertices की संख्या बदलती है (sample density); path shape और कुल duration नहीं बदलते।
  • Variable (toggle ON) — हर footprint path पर एक position पर pin होता है, और कुल duration footprints के बीच equal time slices में split होती है। जहाँ footprints पास-पास हैं वहाँ vehicle धीरे चलती है; जहाँ वे फैले हैं वहाँ तेज़। Route पर effective speed vary करने का यही एकमात्र तरीका है।

आप क्या edit करें ↔ .xosc में क्या बदलता है

Section titled “आप क्या edit करें ↔ .xosc में क्या बदलता है”
Editor actionExport पर effect
Path control point move करेंTrajectory vertex coordinates + कुल duration (length बदलती है, speed 10 m/s रहती है)
Variable mode में footprint drag करेंउस footprint की normalized position → उसके vertex का time → उस leg की local (effective) speed
Variable positioning toggle करेंEqual-time और equal-speed timing के बीच switch
Interval (uniform mode) बदलेंकेवल vertices की संख्या — trajectory shape और speed नहीं बदलतीं
Anchor बदलेंFootprint draw offset केवल — exported trajectory पर कोई effect नहीं
Vehicle template बदलेंvehicleCategory, 3D model, bounding-box height, performance preset
Vehicle resize करें (w, h)BoundingBox dimensions और axle geometry
Vehicle rotate करेंInitial heading (केवल तब जब vehicle की कोई trajectory न हो)
Vehicle move करेंInit WorldPosition (trajectory start पर snap हो जाती है अगर एक हो)

सीधे जवाब में: हाँ — Variable mode में path पर footprint move करने से exported speed plan बदलती है, क्योंकि उस segment को re-time किया जाता है। Uniform mode में या Anchor बदलने से नहीं बदलती।

Scope की ईमानदारी के लिए — ये fixed maps या constants से आती हैं, न कि किसी ऐसी चीज़ से जो आप edit कर सकते हैं: vehicle category/performance presets, 3D model paths, category के हिसाब से vehicle height, axle geometry (size से derived), following mode (position), 60 s stop trigger, और — सबसे महत्वपूर्ण — 10 m/s trajectory speed।

Exporter @drawtonomy/sdk में ship होता है और editor के बिना चलता है। Menu के विपरीत, SDK दोनों फ़ाइलें अलग-अलग भी emit करने देता है:

import { exporter, createSnapshot } from '@drawtonomy/sdk'
const snapshot = createSnapshot(shapes)
// Bundled (same as the menu):
const { blob, baseName } = exporter.buildEsminiZip(snapshot, {
baseName: 'my-scene',
})
// Or each format on its own:
const xodr = exporter.exportToOpenDrive(snapshot)
const xosc = exporter.exportToOpenScenario(snapshot, {
xodrFilename: 'my-scene.xodr',
})

पूर्ण API और extension points के लिए, Exporter SDK reference देखें।

FormatVersion
OpenDRIVE1.8
OpenSCENARIO1.3

Supported: लेनों से straight-line roads; signals, crosswalks और intersection patches OpenDRIVE objects के रूप में; timed trajectory follow करती एक vehicle per path; एक working esmini zip जिसे आप तुरंत चला सकते हैं।

अभी supported नहीं: OpenDRIVE junctions, curved geometry, multi-lane roads, road elevation; OpenSCENARIO speed actions, lane changes, traffic-light logic, multi-agent interaction, या कोई भी per-vehicle speed control।