Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
random_points.py
Go to the documentation of this file.
1
# pylint: skip-file
2
# mypy: ignore-errors
3
"""!
4
Generates a random path which is written to a file for testing
5
"""
6
7
from
random
import
random
8
from
random
import
seed
9
from
datetime
import
datetime
10
11
seed(datetime.now().timestamp())
12
13
f = open(
"map_250_rng.txt"
,
"w"
)
14
15
for
i
in
range(266):
16
if
random() >= 0.5:
17
color =
"blue_cone"
18
else
:
19
color =
"yellow_cone"
20
21
x = 100 * random()
22
y = 100 * random()
23
24
f.write(str(x) +
" "
+ str(y) +
" "
+ color +
"\n"
)
25
26
f.close()
src
planning
tracks
random_points.py
Generated by
1.9.8