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"""!
4Generates a random path which is written to a file for testing
5"""
6
7from random import random
8from random import seed
9from datetime import datetime
10
11seed(datetime.now().timestamp())
12
13f = open("map_250_rng.txt", "w")
14
15for 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
26f.close()