NimbRo ROS Soccer Package
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
wak_beh_state_combined.h
1 // Walk and kick: Combined behaviour state
2 // Author: Philipp Allgeuer <pallgeuer@ais.uni-bonn.de>
3 
4  // Ensure header is only included once
5 #ifndef WAK_BEH_STATE_COMBINED_H
6 #define WAK_BEH_STATE_COMBINED_H
7 
8 // Includes
9 #include <walk_and_kick/wak_beh_state.h>
10 #include <boost/type_traits/is_virtual_base_of.hpp>
11 #include <boost/utility/enable_if.hpp>
12 
13 // Walk and kick namespace
14 namespace walk_and_kick
15 {
21  template<class BS1, class BS2>
22  class WAKBehStateCombined : public boost::enable_if<boost::is_virtual_base_of<WAKBehState, BS1>, BS1>::type, public boost::enable_if<boost::is_virtual_base_of<WAKBehState, BS2>, BS2>::type
23  {
24  public:
25  // Constructor
26  WAKBehStateCombined(WAKConfig& config, const SensorVars& SV, const WAKBehShared& WBS, const WAKGameShared& WGS, int ID) : WAKBehState(config, SV, WBS, WGS, ID), BS1(config, SV, WBS, WGS, ID), BS2(config, SV, WBS, WGS, ID) {}
27  virtual ~WAKBehStateCombined() {}
28 
29  // Execute function
30  virtual void execute(ActuatorVars& AV, const ActuatorVars& lastAV, bool justActivated) { BS1::execute(AV, lastAV, justActivated); BS2::execute(AV, lastAV, justActivated); }
31 
32  protected:
33  // Handle activation function
34  virtual void handleActivation(bool nowActive) { BS1::handleActivation(nowActive); BS2::handleActivation(nowActive); }
35  };
36 }
37 
38 #endif
39 // 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 combines two others (which are assumed to operate independently)...
Definition: wak_beh_state_combined.h:22
The base class for all walk and kick behaviour states.
Definition: wak_beh_state.h:27
A class that shares the required walk and kick variables amongst the behaviour state classes...
Definition: wak_beh_shared.h:48
An interface class for encapsulating all of the data that the walk and kick behaviour states should c...
Definition: wak_actuator_vars.h:22