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 #ifndef ARACTIONGROUPS_H
00027 #define ARACTIONGROUPS_H
00028
00029 #include "ariaTypedefs.h"
00030 #include "ArActionGroup.h"
00031 #include "ArActionColorFollow.h"
00032 #include "ArACTS.h"
00033 #include "ArPTZ.h"
00034
00035 class ArActionInput;
00036 class ArActionJoydrive;
00037 class ArActionDeceleratingLimiter;
00038 class ArActionRatioInput;
00039 class ArRatioInputKeydrive;
00040 class ArRatioInputJoydrive;
00041 class ArRatioInputRobotJoydrive;
00042
00044
00056 class ArActionGroupInput : public ArActionGroup
00057 {
00058 public:
00059 AREXPORT ArActionGroupInput(ArRobot *robot);
00060 AREXPORT virtual ~ArActionGroupInput();
00061 AREXPORT void setVel(double vel);
00062 AREXPORT void setRotVel(double rotVel);
00063 AREXPORT void setHeading(double heading);
00064 AREXPORT void deltaHeadingFromCurrent(double delta);
00065 AREXPORT void clear(void);
00066 AREXPORT ArActionInput *getActionInput(void);
00067 protected:
00068 ArActionInput *myInput;
00069 };
00070
00072
00077 class ArActionGroupStop : public ArActionGroup
00078 {
00079 public:
00080 AREXPORT ArActionGroupStop(ArRobot *robot);
00081 AREXPORT virtual ~ArActionGroupStop();
00082 };
00083
00085
00091 class ArActionGroupTeleop : public ArActionGroup
00092 {
00093 public:
00094 AREXPORT ArActionGroupTeleop(ArRobot *robot);
00095 AREXPORT virtual ~ArActionGroupTeleop();
00096 AREXPORT void setThrottleParams(int lowSpeed, int highSpeed);
00097 protected:
00098 ArActionJoydrive *myJoydrive;
00099 };
00100
00102
00108 class ArActionGroupUnguardedTeleop : public ArActionGroup
00109 {
00110 public:
00111 AREXPORT ArActionGroupUnguardedTeleop(ArRobot *robot);
00112 AREXPORT virtual ~ArActionGroupUnguardedTeleop();
00113 AREXPORT void setThrottleParams(int lowSpeed, int highSpeed);
00114 protected:
00115 ArActionJoydrive *myJoydrive;
00116 };
00117
00119
00124 class ArActionGroupWander : public ArActionGroup
00125 {
00126 public:
00127 AREXPORT ArActionGroupWander(ArRobot *robot, int forwardVel = 400, int avoidFrontDist = 450, int avoidVel = 200, int avoidTurnAmt = 15);
00128 AREXPORT virtual ~ArActionGroupWander();
00129 };
00130
00132
00138 class ArActionGroupColorFollow : public ArActionGroup
00139 {
00140 public:
00141 AREXPORT ArActionGroupColorFollow(ArRobot *robot, ArACTS_1_2 *acts, ArPTZ *camera);
00142 AREXPORT virtual ~ArActionGroupColorFollow();
00143 AREXPORT void setCamera(ArPTZ *camera);
00144 AREXPORT void setChannel(int channel);
00145 AREXPORT void startMovement();
00146 AREXPORT void stopMovement();
00147 AREXPORT void setAcquire(bool acquire);
00148 AREXPORT int getChannel();
00149 AREXPORT bool getAcquire();
00150 AREXPORT bool getMovement();
00151 AREXPORT bool getBlob();
00152 protected:
00153 ArActionColorFollow *myColorFollow;
00154 };
00155
00157
00163 class ArActionGroupRatioDrive : public ArActionGroup
00164 {
00165 public:
00166 AREXPORT ArActionGroupRatioDrive(ArRobot *robot);
00167 AREXPORT virtual ~ArActionGroupRatioDrive();
00168 AREXPORT ArActionRatioInput *getActionRatioInput(void);
00169 AREXPORT void addToConfig(ArConfig *config, const char *section);
00170 protected:
00171 ArActionDeceleratingLimiter *myDeceleratingLimiterForward;
00172 ArActionDeceleratingLimiter *myDeceleratingLimiterBackward;
00173 ArActionRatioInput *myInput;
00174 ArRatioInputKeydrive *myKeydrive;
00175 ArRatioInputJoydrive *myJoydrive;
00176 ArRatioInputRobotJoydrive *myRobotJoydrive;
00177
00178 };
00179
00180
00182
00188 class ArActionGroupRatioDriveUnsafe : public ArActionGroup
00189 {
00190 public:
00191 AREXPORT ArActionGroupRatioDriveUnsafe(ArRobot *robot);
00192 AREXPORT virtual ~ArActionGroupRatioDriveUnsafe();
00193 AREXPORT ArActionRatioInput *getActionRatioInput(void);
00194 AREXPORT void addToConfig(ArConfig *config, const char *section);
00195 protected:
00196 ArActionRatioInput *myInput;
00197 ArRatioInputKeydrive *myKeydrive;
00198 ArRatioInputJoydrive *myJoydrive;
00199 ArRatioInputRobotJoydrive *myRobotJoydrive;
00200
00201 };
00202
00203 #endif // ARACTIONGROUPS_H