LIBRCSC Docs
Documentation for HELIOS's BASE LIBRCSC library for RoboCup 2D Simulation League.
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
coach_intercept_predictor.h
Go to the documentation of this file.
1// -*-c++-*-
2
8/*
9 *Copyright:
10
11 Copyright (C) Hidehisa AKIYAMA
12
13 This code is free software; you can redistribute it and/or
14 modify it under the terms of the GNU Lesser General Public
15 License as published by the Free Software Foundation; either
16 version 3 of the License, or (at your option) any later version.
17
18 This library is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 Lesser General Public License for more details.
22
23 You should have received a copy of the GNU Lesser General Public
24 License along with this library; if not, write to the Free Software
25 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26
27 *EndCopyright:
28 */
29
31
32#ifndef RCSC_COACH_PLAYER_INTERCEPT_H
33#define RCSC_COACH_PLAYER_INTERCEPT_H
34
35#include <vector>
36
37namespace rcsc {
38
39class CoachBallObject;
40class CoachPlayerObject;
41class PlayerType;
42class Vector2D;
43
49private:
50
51 std::vector< Vector2D > M_ball_cache;
52
53 // not used
54 CoachInterceptPredictor() = delete;
56 CoachInterceptPredictor & operator=( const CoachInterceptPredictor & ) = delete;
57
58public:
59
64 explicit
66
67 int predict( const CoachPlayerObject & player ) const;
68
69private:
70
71 int predictReachStep( const CoachPlayerObject & player,
72 const bool goalie ) const;
73 int predictMinStep( const CoachPlayerObject & player,
74 const PlayerType & ptype,
75 const double control_area ) const;
76
77 bool canReachAfterTurnDash( const int total_step,
78 const int penalty_step,
79 const CoachPlayerObject & player,
80 const PlayerType & ptype,
81 const double control_area,
82 const Vector2D & ball_pos ) const;
83
84 int predictTurnCycle( const int total_step,
85 const int penalty_step,
86 const CoachPlayerObject & player,
87 const PlayerType & ptype,
88 const double control_area,
89 const Vector2D & ball_pos ) const;
90
91
92 bool canReachAfterDash( const int penalty_step,
93 const int n_turn,
94 const int n_dash,
95 const CoachPlayerObject & player,
96 const PlayerType & ptype,
97 const double control_area,
98 const Vector2D & ball_pos ) const;
99
100 int predictFinal( const int penalty_step,
101 const CoachPlayerObject & player,
102 const PlayerType & ptype,
103 const double control_area ) const;
104
105};
106
107}
108
109#endif
ball information for coath/trainer
Definition: coach_ball_object.h:44
player intercept cycle predictor for coach
Definition: coach_intercept_predictor.h:48
CoachInterceptPredictor(const CoachBallObject &ball)
create ball position cache
player information for coath/trainer
Definition: coach_player_object.h:55
heterogeneous player parametor class
Definition: player_type.h:50
2D point vector class
Definition: vector_2d.h:46