random-track-generator 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Mees van Löben Sels
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,91 @@
1
+ Metadata-Version: 2.4
2
+ Name: random-track-generator
3
+ Version: 1.0.0
4
+ Summary: Generate random Formula Student Driverless race tracks.
5
+ Requires-Python: >=3.11
6
+ Description-Content-Type: text/markdown
7
+ License-File: LICENSE
8
+ Requires-Dist: gpxpy>=1.5.0
9
+ Requires-Dist: numpy<2.0,>=1.21.0
10
+ Requires-Dist: pyyaml>=6.0
11
+ Requires-Dist: scipy>=1.8.1
12
+ Requires-Dist: shapely>=2.0.1
13
+ Dynamic: license-file
14
+
15
+ # Random Track Generator
16
+
17
+ ![Python](https://img.shields.io/badge/python-%3E%3D3.11-blue)
18
+ ![License](https://img.shields.io/badge/license-MIT-green)
19
+
20
+ <p float="middle">
21
+ <img src="img/extend.png" width="45%" />
22
+ <img src="img/expand.png" width="45%" />
23
+ </p>
24
+
25
+ Generate random, rules-compliant tracks for Formula Student Driverless competitions. Creates realistic tracks with proper track width, cone spacing, and corner radii using Voronoi diagram-based generation.
26
+
27
+ Developed by [Formula Student Team Delft](https://fsteamdelft.nl) for use with [FSSIM](https://github.com/AMZ-Driverless/fssim) and [FSDS](https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator).
28
+
29
+ ## How It Works
30
+
31
+ Tracks are generated using bounded Voronoi diagrams from uniformly sampled points. Regions are selected using one of three modes (**Expand**, **Extend**, or **Random**), then interpolated with cubic splines to create smooth, realistic racing lines.
32
+
33
+ <p float="middle">
34
+ <img src="img/voronoi.png" width="50%" />
35
+ </p>
36
+
37
+ ## Installation
38
+
39
+ ```bash
40
+ uv sync
41
+ ```
42
+
43
+ ## Usage
44
+
45
+ ### Generate a random track
46
+
47
+ ```python
48
+ from random_track_generator import generate_track
49
+
50
+ track = generate_track(
51
+ n_points=60, # Voronoi points
52
+ n_regions=20, # Regions to select
53
+ min_bound=0., # Minimum x/y bound [m]
54
+ max_bound=150., # Maximum x/y bound [m]
55
+ mode="extend", # Generation mode
56
+ seed=42 # Optional: for reproducibility
57
+ )
58
+
59
+ cones_left, cones_right = track.as_tuple()
60
+ ```
61
+
62
+ #### Generation Modes
63
+
64
+ - **`"expand"`** - Selects nearest neighbors for roundish tracks
65
+ - **`"extend"`** - Selects regions along a random line for elongated tracks
66
+ - **`"random"`** - Randomly selects regions for large, irregular tracks
67
+
68
+
69
+ > **Note:** Not all parameter combinations produce stable results. Experiment with settings if generation fails.
70
+
71
+ ### Load a preset track
72
+
73
+ ```python
74
+ from random_track_generator import load_track
75
+
76
+ track = load_track("FSG")
77
+ cones_left, cones_right = track.as_tuple()
78
+ ```
79
+
80
+ ### Save to file
81
+
82
+ ```python
83
+ track.save("output/", sim_type="fssim") # YAML for FSSIM
84
+ track.save("output/", sim_type="fsds") # CSV for FSDS
85
+ track.save("output/", sim_type="gpx",
86
+ lat_offset=51.19, lon_offset=5.32) # GPX with coordinates
87
+ ```
88
+
89
+ ## Credits
90
+
91
+ Based on Ian Hudson's [Race-Track-Generator](https://github.com/I-Hudson/Race-Track-Generator).
@@ -0,0 +1,77 @@
1
+ # Random Track Generator
2
+
3
+ ![Python](https://img.shields.io/badge/python-%3E%3D3.11-blue)
4
+ ![License](https://img.shields.io/badge/license-MIT-green)
5
+
6
+ <p float="middle">
7
+ <img src="img/extend.png" width="45%" />
8
+ <img src="img/expand.png" width="45%" />
9
+ </p>
10
+
11
+ Generate random, rules-compliant tracks for Formula Student Driverless competitions. Creates realistic tracks with proper track width, cone spacing, and corner radii using Voronoi diagram-based generation.
12
+
13
+ Developed by [Formula Student Team Delft](https://fsteamdelft.nl) for use with [FSSIM](https://github.com/AMZ-Driverless/fssim) and [FSDS](https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator).
14
+
15
+ ## How It Works
16
+
17
+ Tracks are generated using bounded Voronoi diagrams from uniformly sampled points. Regions are selected using one of three modes (**Expand**, **Extend**, or **Random**), then interpolated with cubic splines to create smooth, realistic racing lines.
18
+
19
+ <p float="middle">
20
+ <img src="img/voronoi.png" width="50%" />
21
+ </p>
22
+
23
+ ## Installation
24
+
25
+ ```bash
26
+ uv sync
27
+ ```
28
+
29
+ ## Usage
30
+
31
+ ### Generate a random track
32
+
33
+ ```python
34
+ from random_track_generator import generate_track
35
+
36
+ track = generate_track(
37
+ n_points=60, # Voronoi points
38
+ n_regions=20, # Regions to select
39
+ min_bound=0., # Minimum x/y bound [m]
40
+ max_bound=150., # Maximum x/y bound [m]
41
+ mode="extend", # Generation mode
42
+ seed=42 # Optional: for reproducibility
43
+ )
44
+
45
+ cones_left, cones_right = track.as_tuple()
46
+ ```
47
+
48
+ #### Generation Modes
49
+
50
+ - **`"expand"`** - Selects nearest neighbors for roundish tracks
51
+ - **`"extend"`** - Selects regions along a random line for elongated tracks
52
+ - **`"random"`** - Randomly selects regions for large, irregular tracks
53
+
54
+
55
+ > **Note:** Not all parameter combinations produce stable results. Experiment with settings if generation fails.
56
+
57
+ ### Load a preset track
58
+
59
+ ```python
60
+ from random_track_generator import load_track
61
+
62
+ track = load_track("FSG")
63
+ cones_left, cones_right = track.as_tuple()
64
+ ```
65
+
66
+ ### Save to file
67
+
68
+ ```python
69
+ track.save("output/", sim_type="fssim") # YAML for FSSIM
70
+ track.save("output/", sim_type="fsds") # CSV for FSDS
71
+ track.save("output/", sim_type="gpx",
72
+ lat_offset=51.19, lon_offset=5.32) # GPX with coordinates
73
+ ```
74
+
75
+ ## Credits
76
+
77
+ Based on Ian Hudson's [Race-Track-Generator](https://github.com/I-Hudson/Race-Track-Generator).
@@ -0,0 +1,18 @@
1
+ [project]
2
+ name = "random-track-generator"
3
+ version = "1.0.0"
4
+ description = "Generate random Formula Student Driverless race tracks."
5
+ readme = "README.md"
6
+ requires-python = ">=3.11"
7
+ dependencies = [
8
+ "gpxpy>=1.5.0",
9
+ "numpy>=1.21.0,<2.0",
10
+ "pyyaml>=6.0",
11
+ "scipy>=1.8.1",
12
+ "shapely>=2.0.1",
13
+ ]
14
+ [tool.setuptools.packages.find]
15
+ include = ["random_track_generator*"]
16
+
17
+ [tool.setuptools.package-data]
18
+ random_track_generator = ["tracks/*.yaml"]
@@ -0,0 +1,91 @@
1
+ Metadata-Version: 2.4
2
+ Name: random-track-generator
3
+ Version: 1.0.0
4
+ Summary: Generate random Formula Student Driverless race tracks.
5
+ Requires-Python: >=3.11
6
+ Description-Content-Type: text/markdown
7
+ License-File: LICENSE
8
+ Requires-Dist: gpxpy>=1.5.0
9
+ Requires-Dist: numpy<2.0,>=1.21.0
10
+ Requires-Dist: pyyaml>=6.0
11
+ Requires-Dist: scipy>=1.8.1
12
+ Requires-Dist: shapely>=2.0.1
13
+ Dynamic: license-file
14
+
15
+ # Random Track Generator
16
+
17
+ ![Python](https://img.shields.io/badge/python-%3E%3D3.11-blue)
18
+ ![License](https://img.shields.io/badge/license-MIT-green)
19
+
20
+ <p float="middle">
21
+ <img src="img/extend.png" width="45%" />
22
+ <img src="img/expand.png" width="45%" />
23
+ </p>
24
+
25
+ Generate random, rules-compliant tracks for Formula Student Driverless competitions. Creates realistic tracks with proper track width, cone spacing, and corner radii using Voronoi diagram-based generation.
26
+
27
+ Developed by [Formula Student Team Delft](https://fsteamdelft.nl) for use with [FSSIM](https://github.com/AMZ-Driverless/fssim) and [FSDS](https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator).
28
+
29
+ ## How It Works
30
+
31
+ Tracks are generated using bounded Voronoi diagrams from uniformly sampled points. Regions are selected using one of three modes (**Expand**, **Extend**, or **Random**), then interpolated with cubic splines to create smooth, realistic racing lines.
32
+
33
+ <p float="middle">
34
+ <img src="img/voronoi.png" width="50%" />
35
+ </p>
36
+
37
+ ## Installation
38
+
39
+ ```bash
40
+ uv sync
41
+ ```
42
+
43
+ ## Usage
44
+
45
+ ### Generate a random track
46
+
47
+ ```python
48
+ from random_track_generator import generate_track
49
+
50
+ track = generate_track(
51
+ n_points=60, # Voronoi points
52
+ n_regions=20, # Regions to select
53
+ min_bound=0., # Minimum x/y bound [m]
54
+ max_bound=150., # Maximum x/y bound [m]
55
+ mode="extend", # Generation mode
56
+ seed=42 # Optional: for reproducibility
57
+ )
58
+
59
+ cones_left, cones_right = track.as_tuple()
60
+ ```
61
+
62
+ #### Generation Modes
63
+
64
+ - **`"expand"`** - Selects nearest neighbors for roundish tracks
65
+ - **`"extend"`** - Selects regions along a random line for elongated tracks
66
+ - **`"random"`** - Randomly selects regions for large, irregular tracks
67
+
68
+
69
+ > **Note:** Not all parameter combinations produce stable results. Experiment with settings if generation fails.
70
+
71
+ ### Load a preset track
72
+
73
+ ```python
74
+ from random_track_generator import load_track
75
+
76
+ track = load_track("FSG")
77
+ cones_left, cones_right = track.as_tuple()
78
+ ```
79
+
80
+ ### Save to file
81
+
82
+ ```python
83
+ track.save("output/", sim_type="fssim") # YAML for FSSIM
84
+ track.save("output/", sim_type="fsds") # CSV for FSDS
85
+ track.save("output/", sim_type="gpx",
86
+ lat_offset=51.19, lon_offset=5.32) # GPX with coordinates
87
+ ```
88
+
89
+ ## Credits
90
+
91
+ Based on Ian Hudson's [Race-Track-Generator](https://github.com/I-Hudson/Race-Track-Generator).
@@ -0,0 +1,8 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ random_track_generator.egg-info/PKG-INFO
5
+ random_track_generator.egg-info/SOURCES.txt
6
+ random_track_generator.egg-info/dependency_links.txt
7
+ random_track_generator.egg-info/requires.txt
8
+ random_track_generator.egg-info/top_level.txt
@@ -0,0 +1,5 @@
1
+ gpxpy>=1.5.0
2
+ numpy<2.0,>=1.21.0
3
+ pyyaml>=6.0
4
+ scipy>=1.8.1
5
+ shapely>=2.0.1
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+