www.pudn.com > Product_Submit2004.rar > LocomotionCommand.h, change:2004-07-01,size:3668b


#ifndef LOCOMOTIONCOMMAND_H 
#define LOCOMOTIONCOMMAND_H 
 
class LocomotionCommand { 
  public: 
    enum { 
      TP_ENDKICK = -1, 
      TP_WALK = 0, 
      TP_WALKWITHOUTFRONT = 1, 
      TP_SINGLEWALK = 2, 
      TP_SINGLEWALKWITHOUTFRONT = 3, 
      TP_WALKTURNKICK = 4, 
      TP_SINGLEWALKTURNKICK = 5, 
      TP_DONOTHING = 10, 
      TP_CHEST_PUSH = 11, 
      TP_CHEST_DIVE = 12, 
      TP_PAW_KICK = 13, 
      TP_HEAD_LUNGE = 14, 
      TP_HEAD_LUNGE_RIGHT = 15, 
      TP_HEAD_LUNGE_LEFT = 16, 
      TP_HEAD_KICK_RIGHT = 17, 
      TP_HEAD_KICK_LEFT = 18, 
      TP_HEAD_KICK_FORWARDS = 19, 
      TP_HEAD_KICK_BACK_RIGHT= 20, 
      TP_HEAD_KICK_BACK_LEFT= 21, 
      TP_GRAB = 22, 
      TP_SPIN_KICK_RIGHT = 23, 
      TP_SPIN_KICK_LEFT = 24,   
      TP_BACK_KICK_RIGHT = 25, 
      TP_BACK_KICK_LEFT = 26, 
      TP_JESUS = 27, 
      TP_GRAB_TEST = 28, 
      TP_POST_GRAB_POSITION = 29, 
      TP_BACK_LEFT_150 = 30, 
      TP_BACK_RIGHT_150 = 31, 
      TP_BACK_LEFT_110 = 32, 
      TP_BACK_RIGHT_110 = 33, 
      TP_MINI_HEAD_LUNGE = 34, 
      TP_SUPER_HEAD_LUNGE = 35, 
      TP_UTS = 36, 
      TP_GOALIE_BLOCK = 40, 
      TP_GOALIE_RIGHT = 41, 
      TP_GOALIE_LEFT = 42, 
      TP_GETUP_FRONT = 50, 
      TP_GETUP_LEFT = 51, 
      TP_GETUP_RIGHT = 52, 
      TP_GETUP_BACK = 53, 
      TP_SLAP_RIGHT_LOW = 64, 
      TP_SLAP_LEFT_LOW = 65, 
      TP_SLAP_RIGHT = 114, 
      TP_SLAP_LEFT = 115, 
      TP_TURN_RIGHT = 116, 
      TP_TURN_LEFT = 117, 
      TP_GETUP = 99 
    }; 
    enum { 
      L_TRAPEZOID = 0, 
      L_RECTANGLE = 1, 
      L_ELLIPSE = 2, 
      L_ARBITRARY = 3 
    }; 
 
    // 'basic' parameters 
    int motionType; 
    double stepFrequency; 
    double frontStrideLength; 
    double backStrideLength; 
    double turn; 
    double strafe; 
    double odomTurn; 
 
    // 'advanced' parameters 
    double frontStrideHeight; 
    double frontForwardOffset; 
    double frontSideOffset; 
    double frontHeight; 
 
    double backStrideHeight; 
    double backForwardOffset; 
    double backSideOffset; 
    double backHeight; 
 
    int locusType; 
 
    // very advanced parameter :) 
    // used so left and right turns can be made symmetric... 
    bool offsetWalk; 
 
    // !?? deprecated i think 
    bool allowHeadUse; 
 
    void Reset() {Set(LocomotionCommand::TP_WALK,0.0,0.0,0.0,0.0,1.0); odomTurn = -1000;}; 
    void Set(int _type, double  _frontStrideLength, double _backStrideLength, double _turn, double _strafe, double _stepFrequency, double _frontHeight, double _frontStrideHeight, double _frontForwardOffset, double _frontSideOffset, double _backHeight, double _backStrideHeight, double _backForwardOffset, double _backSideOffset); 
    void Set(int _type, double _frontStrideLength, double _backStrideLength, double _turn, double _strafe, double _stepFrequency); 
    void SetKick(int _type, bool allowHeadUse); 
    void CombineLocomotionCommands(LocomotionCommand* first, LocomotionCommand* second, double x); 
 
    static void SetDefaults(double _frontHeight, double _frontStrideHeight, double _frontForwardOffset, double _frontSideOffset, double _backHeight, double _backStrideHeight, double _backForwardOffset, double _backSideOffset, int _locusType); 
 
  public: 
    static double defaultFrontStrideHeight; 
    static double defaultFrontForwardOffset; 
    static double defaultFrontSideOffset; 
    static double defaultFrontHeight; 
 
    static double defaultBackStrideHeight; 
    static double defaultBackForwardOffset; 
    static double defaultBackSideOffset; 
    static double defaultBackHeight; 
 
    static int defaultLocusType; 
}; 
#endif // LOCOMOTIONCOMMAND_H