forked from IntegralPlusPlus/ssl-study-strategy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
49 lines (43 loc) · 1.65 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
"""
Точка входа в стратегию
"""
from strategy_bridge.common import config
from strategy_bridge.processors import RobotCommandsSender, VisionDetectionsCollector
from strategy_bridge.processors.referee_commands_collector import (
RefereeCommandsCollector,
)
from strategy_bridge.runner import Runner
import bridge.processors.const as const
import bridge.processors.strategy as strategy
from bridge.processors.python_controller import SSLController
from bridge.processors.robot_command_sink import CommandSink
if __name__ == "__main__":
# config.init_logging("./logs")
PROCESSORS = [
VisionDetectionsCollector(processing_pause=0.001, should_debug=True),
RefereeCommandsCollector(processing_pause=0.001, should_debug=True),
# SSLController(
# ally_color="y",
# # should_debug=True,
# processing_pause=const.Ts, # type:ignore
# reduce_pause_on_process_time=True,
# dbg_game_status=strategy.GameStates.RUN,
# dbg_state=strategy.States.ATTACK,
# ),
SSLController(
ally_color=const.COLOR,
# should_debug=True,
processing_pause=const.Ts, # type:ignore
reduce_pause_on_process_time=True,
dbg_game_status=strategy.GameStates.RUN,
dbg_state=strategy.States.ATTACK,
),
CommandSink(processing_pause=const.Ts / 2), # , should_debug=True
RobotCommandsSender(
processing_pause=const.Ts / 2,
should_debug=True,
reduce_pause_on_process_time=True,
),
]
RUNNER = Runner(processors=PROCESSORS)
RUNNER.run()