5 #ifndef WAK_BEH_SHARED_H
6 #define WAK_BEH_SHARED_H
9 #include <walk_and_kick/wak_common.h>
10 #include <walk_and_kick/wak_config.h>
11 #include <walk_and_kick/wak_game_vars.h>
12 #include <walk_and_kick/wak_sensor_vars.h>
13 #include <walk_and_kick/wak_actuator_vars.h>
14 #include <walk_and_kick/wak_ros_interface.h>
15 #include <walk_and_kick/wak_utils.h>
16 #include <walk_and_kick/wak_vis.h>
19 namespace walk_and_kick
34 const std::string BATypeName[BA_COUNT] = {
39 inline bool ballActionTypeValid(
int type) {
return (type > BA_UNKNOWN && type < BA_COUNT); }
40 inline bool ballActionTypeValid(BAType type) {
return ballActionTypeValid((
int) type); }
41 inline const std::string& ballActionTypeName(BAType type) {
if(ballActionTypeValid(type))
return BATypeName[type];
else return BATypeName[BA_UNKNOWN]; }
58 plot_msgs::PlotManagerFS& PM;
64 void registerState(
WAKBehState* state,
int ID,
const std::string& name)
const;
70 void updateShared(
const GameVars& GV);
76 BAType ballAction()
const;
79 void setWalkingTarget(
const Vec2f& target,
float tol = -1.0f)
const;
80 void setWalkingTargetTol(
float tol)
const;
83 cycle_t wakCycle()
const;
84 cycle_t stateCycle()
const;
85 float wakTime()
const;
86 float stateTime()
const;
89 float walkToGlobalPose(
ActuatorVars& AV,
float targetX,
float targetY)
const {
return walkToGlobalPose(AV, targetX, targetY, 0.0f,
false); }
90 float walkToGlobalPose(
ActuatorVars& AV,
float targetX,
float targetY,
float targetZ,
bool useZ =
true)
const;
91 bool obstacleAvoidance(Vec3f& GCV,
const Vec2f& walkingTarget)
const;
93 Vec2f calcGcvXY(
float maxGcvX,
float maxGcvY,
float angle)
const;
97 Vec2f reqBallDirLeftKb;
98 Vec2f reqBallDirRightKb;
99 Vec2f reqBallDirLeftDb;
100 Vec2f reqBallDirRightDb;
102 float ballTargetDist;
103 float ballTargetAngle;
104 Vec2f ballToTargetDir;
105 float ballToTargetDist;
106 float ballToTargetAngle;
107 float ballToTargetAngleOffsetKick;
Configuration struct for the walk and kick node.
Definition: wak_config.h:20
Visualisation marker manager for the walk and kick node.
Definition: wak_vis.h:21
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 manages and executes the walk and kick behaviour states.
Definition: wak_beh_manager.h:50
A simple class for abstracting away the source of the field dimensions.
Definition: wak_utils.h:216
The base class for all walk and kick behaviour states.
Definition: wak_beh_state.h:27
An interface class for encapsulating all of the data that the walk and kick game states should comman...
Definition: wak_game_vars.h:21
A class that shares the required walk and kick variables amongst the behaviour state classes...
Definition: wak_beh_shared.h:48
An interface class between the walk and kick and ROS worlds.
Definition: wak_ros_interface.h:54
An interface class for encapsulating all of the data that the walk and kick behaviour states should c...
Definition: wak_actuator_vars.h:22