00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef ARACTIONBUMPERS_H
00028 #define ARACTIONBUMPERS_H
00029
00030 #include "ariaTypedefs.h"
00031 #include "ArAction.h"
00032
00034
00043 class ArActionBumpers : public ArAction
00044 {
00045 public:
00047 AREXPORT ArActionBumpers(const char *name = "bumpers",
00048 double backOffSpeed = 100, int backOffTime = 3000,
00049 int turnTime = 3000, bool setMaximums = false);
00051 AREXPORT virtual ~ArActionBumpers();
00052 AREXPORT virtual ArActionDesired *fire(ArActionDesired currentDesired);
00053 AREXPORT virtual ArActionDesired *getDesired(void) { return &myDesired; }
00054 #ifndef SWIG
00055 AREXPORT virtual const ArActionDesired *getDesired(void) const
00056 { return &myDesired; }
00057 #endif
00058 AREXPORT double findDegreesToTurn(int bumpValue, int whichBumper);
00059 protected:
00060 ArActionDesired myDesired;
00061 bool mySetMaximums;
00062 double myBackOffSpeed;
00063 int myBackOffTime;
00064 int myTurnTime;
00065
00066 bool myFiring;
00067 double mySpeed;
00068 double myHeading;
00069 int myBumpMask;
00070 ArTime myStartBack;
00071
00072 };
00073
00074 #endif // ARACTIONBUMPERS