]> rtime.felk.cvut.cz Git - hubacji1/iamcar2.git/commitdiff
Accomply to pep8
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Tue, 14 Mar 2023 08:28:32 +0000 (09:28 +0100)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Tue, 14 Mar 2023 14:38:08 +0000 (15:38 +0100)
scripts/generate_simple_json_scenario.py

index ce084d756faa8842cde4b4fdf2687727b28790d1..d8bfb2e54602e8dfbc69075eb3c5cb2bfeb11b43 100644 (file)
@@ -8,7 +8,7 @@ The scenario contains at least:
 
 - `obst` -- the list of (convex polygon) obstacles.
 """
-from json import dumps, loads
+from json import dumps
 from math import cos, pi, sin
 from random import random, uniform
 
@@ -23,11 +23,13 @@ OBST_L = 2
 OBST_W = 2
 OBST_COUNT = 8
 
+
 def gen_init():
     """Generate car init position."""
     # TODO if changed, change ``gen_slot`` accordingly
     return (0, 0, 0)
 
+
 def gen_slot(l=5.3, w=2.4):
     """Generate parking slot."""
     parallel = True if random() < 0.5 else False
@@ -83,6 +85,7 @@ def gen_slot(l=5.3, w=2.4):
             ],
         ]
 
+
 def gen_obst():
     """Generate obstacles array."""
     obstacles = []
@@ -119,6 +122,7 @@ def gen_obst():
         ])
     return obstacles
 
+
 if __name__ == "__main__":
     init = gen_init()
     slot = gen_slot()