]> rtime.felk.cvut.cz Git - hubacji1/iamcar2.git/commitdiff
Fix simple scenario generator
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Wed, 19 Jan 2022 13:21:08 +0000 (14:21 +0100)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Wed, 19 Jan 2022 13:21:08 +0000 (14:21 +0100)
scripts/generate_simple_json_scenario.py

index 13e654d749aed20218a22bc851fa3240360baebf..ce084d756faa8842cde4b4fdf2687727b28790d1 100644 (file)
@@ -45,7 +45,7 @@ def gen_slot(l=5.3, w=2.4):
     y = r * sin(angl)
     h = uniform(0, 2 * pi)
     if parallel:
-        return [[
+        return [
             [
                 x + l/2 * cos(h - pi/2 * right),
                 y + l/2 * sin(h - pi/2 * right),
@@ -62,9 +62,9 @@ def gen_slot(l=5.3, w=2.4):
                 x + l/2 * cos(h + pi/2 * right),
                 y + l/2 * sin(h + pi/2 * right),
             ],
-        ]]
+        ]
     else:
-        return [[
+        return [
             [
                 x + w/2 * cos(h - pi/2 * right),
                 y + w/2 * sin(h - pi/2 * right),
@@ -81,7 +81,7 @@ def gen_slot(l=5.3, w=2.4):
                 x + w/2 * cos(h + pi/2 * right),
                 y + w/2 * sin(h + pi/2 * right),
             ],
-        ]]
+        ]
 
 def gen_obst():
     """Generate obstacles array."""