NimbRo ROS Soccer Package
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
beh_go_behind_ball.h
1 // Walk and kick behaviour state: Go behind ball
2 // Author: Philipp Allgeuer <pallgeuer@ais.uni-bonn.de>
3 
4  // Ensure header is only included once
5 #ifndef BEH_GO_BEHIND_BALL_H
6 #define BEH_GO_BEHIND_BALL_H
7 
8 // Includes
9 #include <walk_and_kick/wak_beh_state.h>
10 #include <walk_and_kick/beh_states/gaze_beh_look_for_ball.h>
11 
12 // Walk and kick namespace
13 namespace walk_and_kick
14 {
21  {
22  public:
23  // Constructor
24  BehGoBehindBall(WAKConfig& config, const SensorVars& SV, const WAKBehShared& WBS, const WAKGameShared& WGS, int ID);
25 
26  // Execute function
27  virtual void execute(ActuatorVars& AV, const ActuatorVars& lastAV, bool justActivated);
28 
29  // Get functions
30  BAType ballActionTip() const { return m_ballActionTip; }
31  bool useRightFoot() const { return m_useRightFoot; }
32 
33  protected:
34  // Handle activation function
35  virtual void handleActivation(bool nowActive);
36 
37  private:
38  // Constants
39  static const float MinReqBallDirX;
40  static const float MinRadius;
41 
42  // Helper functions
43  float minDesiredBallDist(float ballAngle, float reqBallDirX) const;
44 
45  // State variables
46  bool m_useRightFoot;
47  TheWorm m_changeToRightFoot;
48  Counter m_unforceFoot;
49  Counter m_stuck;
50  BAType m_ballActionTip;
51 
52  // Misc variables
53  Vec2fArray m_path; // Not part of the behaviour state => This is only used temporarily for plotting to avoid constant memory allocations
54  };
55 }
56 
57 #endif
58 // EOF
Configuration struct for the walk and kick node.
Definition: wak_config.h:20
An interface class for encapsulating all of the ROS input data to the walk and kick node...
Definition: wak_sensor_vars.h:29
A class that shares the required walk and kick variables amongst the game state classes.
Definition: wak_game_shared.h:31
A walk and kick behaviour state that lines up the robot with the ball and a target.
Definition: beh_go_behind_ball.h:20
A simple counter class for counting events.
Definition: wak_utils.h:63
A walk and kick gaze behaviour state that looks for the ball.
Definition: gaze_beh_look_for_ball.h:20
A class that shares the required walk and kick variables amongst the behaviour state classes...
Definition: wak_beh_shared.h:48
A class that implements the worm, for making a live decision between two opposites.
Definition: wak_utils.h:83
An interface class for encapsulating all of the data that the walk and kick behaviour states should c...
Definition: wak_actuator_vars.h:22