Skip to content

Commit

Permalink
シナリオスクリプトを直接実行可能に (#530)
Browse files Browse the repository at this point in the history
  • Loading branch information
HansRobo authored Aug 17, 2024
1 parent 771ee0e commit 91f0322
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scenario_test/STOP_AVOID_BALL.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,10 @@ def check(x: float, y: float, vx: float = 0.0, vy: float = 0.0):
check(0, 0)
check(3.5, 0)
check(3.5, 0, vx=-2.0)


if __name__ == "__main__":
rcst_comm = Communication()
test_avoid_ball(rcst_comm)
rcst_comm.close()
print("STOP_AVOID_BALL test passed")
7 changes: 7 additions & 0 deletions scenario_test/STOP_ROBOT_SPEED.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,10 @@ def yellow_robot_did_not_move(
assert success is True

assert rcst_comm.observer.customized().get_result("yellow_robot_did_not_move") is False


if __name__ == "__main__":
rcst_comm = Communication()
test_robot_speed(rcst_comm)
rcst_comm.close()
print("STOP_ROBOT_SPEED test passed")
7 changes: 7 additions & 0 deletions scenario_test/emit_from_penalty_01.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,10 @@ def test_emit_from_penalty_01(rcst_comm: Communication):
rcst_comm.observer.get_world().get_ball().x, rcst_comm.observer.get_world().get_ball().y
)
assert success is True


if __name__ == "__main__":
rcst_comm = Communication()
test_emit_from_penalty_01(rcst_comm)
rcst_comm.close()
print("emit_from_penalty_01 test passed")

0 comments on commit 91f0322

Please sign in to comment.