守门员基础版 + 进阶意图层 + 关键帧技能

守门员基础版:
- 1号门将从外场逻辑中分流,具备 HOME/INTERCEPT/CLEAR/PENALTY_READY/RECOVER 状态机
- 门线封角、横移巡逻、禁区内拦截、边路清球、点球站位
- 只依赖 Walk/Neutral/GetUp,不引入真实 catch 或 RL 扑救

守门员进阶意图层:
- GoalieSet 保留为生产姿态
- BLOCK_LEFT/BLOCK_RIGHT 降为意图层,不作为正式比赛动作
- CATCH_* 骨架与计时保留,不发真实协议
- GoalieBlock RL 占位接口预留

新增关键帧技能:
- GoalieSet(生产)、LowBlockLeft/LowBlockRight(实验)
- 注册到 BehaviorManager,has_skill() 接口新增

MonitorClient 改动:
- place_player 支持 yaw 参数
This commit is contained in:
jjh
2026-04-02 21:37:38 +08:00
parent 3d1fc285d3
commit 010567978d
6 changed files with 73 additions and 4 deletions

View File

@@ -0,0 +1,8 @@
import os
from behaviors.custom.keyframe.keyframe import KeyframeSkill
class GoalieSet(KeyframeSkill):
def __init__(self, agent):
super().__init__(agent, os.path.join(os.path.dirname(__file__), "goalie_set.yaml"))

View File

@@ -0,0 +1,8 @@
import os
from behaviors.custom.keyframe.keyframe import KeyframeSkill
class LowBlockLeft(KeyframeSkill):
def __init__(self, agent):
super().__init__(agent, os.path.join(os.path.dirname(__file__), "low_block_left.yaml"))

View File

@@ -0,0 +1,8 @@
import os
from behaviors.custom.keyframe.keyframe import KeyframeSkill
class LowBlockRight(KeyframeSkill):
def __init__(self, agent):
super().__init__(agent, os.path.join(os.path.dirname(__file__), "low_block_right.yaml"))

View File

@@ -0,0 +1,32 @@
import logging
from behaviors.behavior import Behavior
logger = logging.getLogger(__name__)
class GoalieBlock(Behavior):
"""
Placeholder interface for a future RL-based goalkeeper blocking skill.
The production code does not register or call this skill yet.
It exists to lock down the expected execution shape for later training work.
"""
def __init__(self, agent):
super().__init__(agent)
self.last_side: str | None = None
def execute(self, reset: bool, side: str, *args, **kwargs) -> bool:
if reset:
self.last_side = side
logger.warning(
"GoalieBlock.execute(side=%s) was called before an RL model was integrated.",
side,
)
return True
def is_ready(self, *args) -> bool:
return False