Skip to content

Commit 7b4041c

Browse files
authored
1 parent 28cda49 commit 7b4041c

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

src/software/ai/navigator/path_planner/hrvo/simulated_hrvo_test.py

+19-11
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def __repr__(self):
111111
) = create_validation_types(HRVORobotEntersRegionAndStops)
112112

113113

114-
def get_zig_zag_params(
114+
def create_zig_zag_path_test_params(
115115
front_wall_x: int, robot_y_delta: float, num_walls: int, wall_height: float
116116
):
117117
"""
@@ -146,7 +146,7 @@ def get_zig_zag_params(
146146
)
147147

148148

149-
def get_robot_circle_pos(radius: float, num_robots: int, start: bool):
149+
def create_robot_circle_pos_params(radius: float, num_robots: int, start: bool):
150150
"""
151151
Gets the test params to position robots in a circle and have them move
152152
along each diameter
@@ -384,11 +384,11 @@ def hrvo_setup(
384384
False,
385385
),
386386
# robot moving in a zig zag path around enemy robots
387-
get_zig_zag_params(-2, 0.3, 3, 5),
387+
create_zig_zag_path_test_params(-2, 0.3, 3, 5),
388388
# friendly robots in a circle moving along each diameter
389389
(
390-
get_robot_circle_pos(1.5, 8, True),
391-
get_robot_circle_pos(1.5, 8, False),
390+
create_robot_circle_pos_params(1.5, 8, True),
391+
create_robot_circle_pos_params(1.5, 8, False),
392392
[],
393393
[],
394394
[],
@@ -398,8 +398,8 @@ def hrvo_setup(
398398
# friendly robots in a circle moving along each diameter
399399
# while turning from 0 to 180 degrees
400400
(
401-
get_robot_circle_pos(1.5, 8, True),
402-
get_robot_circle_pos(1.5, 8, False),
401+
create_robot_circle_pos_params(1.5, 8, True),
402+
create_robot_circle_pos_params(1.5, 8, False),
403403
[tbots.Angle.fromRadians(math.pi) for i in range(8)],
404404
[],
405405
[],
@@ -410,12 +410,16 @@ def hrvo_setup(
410410
(
411411
[
412412
pos
413-
for index, pos in enumerate(get_robot_circle_pos(1.5, 8, True))
413+
for index, pos in enumerate(
414+
create_robot_circle_pos_params(1.5, 8, True)
415+
)
414416
if index % 2 == 0
415417
],
416418
[
417419
pos
418-
for index, pos in enumerate(get_robot_circle_pos(1.5, 8, False))
420+
for index, pos in enumerate(
421+
create_robot_circle_pos_params(1.5, 8, False)
422+
)
419423
if index % 2 == 0
420424
],
421425
[],
@@ -427,12 +431,16 @@ def hrvo_setup(
427431
# so when displayed, the destination positions look correct since they have been flipped for blue
428432
[
429433
pos
430-
for index, pos in enumerate(get_robot_circle_pos(1.5, 8, True))
434+
for index, pos in enumerate(
435+
create_robot_circle_pos_params(1.5, 8, True)
436+
)
431437
if index % 2 == 1
432438
],
433439
[
434440
pos
435-
for index, pos in enumerate(get_robot_circle_pos(1.5, 8, True))
441+
for index, pos in enumerate(
442+
create_robot_circle_pos_params(1.5, 8, True)
443+
)
436444
if index % 2 == 1
437445
],
438446
10,

0 commit comments

Comments
 (0)