π How to Create a Scenario File¶
This guide walks you through the steps to create a custom scenario file for simulation or testing purposes.¶
π Steps¶
1. Copy an Existing Scenario¶
Start by copying any working scenario file. This ensures you have a valid structure and format to begin with.
2. Start the Goal Picking Tool¶
To use the interactive goal picker tool:
-
Start
lichtblick suitefrom theADOReproject root: -
Open the goal picker tool in your browser:
- Use the tool to:
- Search for locations using the search box
- Click on the map to place start and goal markers
- Toggle between start and goal placement modes
- View coordinates in both Lat/Long and UTM formats
- Copy the generated Python code directly from the text boxes
3. Get Start and Goal Coordinates¶
You can obtain coordinates using one of these methods:
Method A: Goal Picker Tool (Recommended) - Use the goal_picker.html tool as described above - This tool provides both coordinate formats and generates Python code automatically - Simply click on the map to place markers and copy the generated code
Method B: Google Maps
- Use Google Maps to select your desired start point and goal point
- Right-click on the location and choose What's here?
- Copy the latitude and longitude for both start and goal points
4. Define Positions Using the New Position Class¶
You can now define positions using either Lat/Long or UTM coordinates with the new Position class:
Option A: Using Lat/Long coordinates
Option B: Using UTM coordinates
Option C: Legacy tuple format (still supported)
> π‘TIP: The Position class automatically converts between coordinate systems, so you can use whichever format is most convenient for your source data.¶
5. Update Your Scenario File¶
Open your scenario file and update the position definitions:
¶
6. Set the Start Heading¶
The start heading (orientation in radians) can be critical for correct vehicle behavior:
- Try an initial value like 0.0 or 1.57 (90Β°).
- Adjust the heading using a trial-and-error method until the vehicle starts in the correct direction.
- The heading is specified as the psi parameter in the Position class or as the third element in the legacy tuple format.
β Example Entry¶
New Position class format:
Alternative UTM format:
Legacy tuple format:
π Final Check¶
Before running the scenario: - β Validate the file syntax. - β Make sure start and goal positions make sense visually. - β Run the simulation and fine-tune as needed. - β Test both coordinate formats to ensure compatibility. - β Verify the import statement for the Position class is included.