守门员基础版 + 进阶意图层 + 关键帧技能
守门员基础版: - 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:
@@ -1,5 +1,8 @@
|
||||
from behaviors.custom.keyframe.get_up.get_up import GetUp
|
||||
from behaviors.custom.keyframe.keyframe import KeyframeSkill
|
||||
from behaviors.custom.keyframe.poses.goalie_set.goalie_set import GoalieSet
|
||||
from behaviors.custom.keyframe.poses.low_block_left.low_block_left import LowBlockLeft
|
||||
from behaviors.custom.keyframe.poses.low_block_right.low_block_right import LowBlockRight
|
||||
from behaviors.custom.keyframe.poses.neutral.neutral import Neutral
|
||||
from behaviors.behavior import Behavior
|
||||
from behaviors.custom.reinforcement.walk.walk import Walk
|
||||
@@ -22,7 +25,7 @@ class BehaviorManager:
|
||||
Each skill is indexed by its class name.
|
||||
"""
|
||||
|
||||
classes: list[type[Behavior]] = [Walk, Neutral, GetUp]
|
||||
classes: list[type[Behavior]] = [Walk, Neutral, GoalieSet, LowBlockLeft, LowBlockRight, GetUp]
|
||||
|
||||
# instantiate each Skill and store in the skills dictionary
|
||||
self.skills = {cls.__name__: cls(agent=self.agent) for cls in classes}
|
||||
@@ -33,6 +36,9 @@ class BehaviorManager:
|
||||
raise KeyError(f"No skill found with the name '{name}'")
|
||||
return self.skills[name]
|
||||
|
||||
def has_skill(self, name: str) -> bool:
|
||||
return name in self.skills
|
||||
|
||||
def execute(self, skill_name: str, *args, **kwargs) -> bool:
|
||||
"""
|
||||
Executes one step of the specified skill.
|
||||
|
||||
Reference in New Issue
Block a user