Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

ArActionGroups.h

00001 /*
00002 ActivMedia Robotics Interface for Applications (ARIA)
00003 Copyright (C) 2004,2005 ActivMedia Robotics, LLC
00004 
00005 
00006      This program is free software; you can redistribute it and/or modify
00007      it under the terms of the GNU General Public License as published by
00008      the Free Software Foundation; either version 2 of the License, or
00009      (at your option) any later version.
00010 
00011      This program is distributed in the hope that it will be useful,
00012      but WITHOUT ANY WARRANTY; without even the implied warranty of
00013      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014      GNU General Public License for more details.
00015 
00016      You should have received a copy of the GNU General Public License
00017      along with this program; if not, write to the Free Software
00018      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 
00020 If you wish to redistribute ARIA under different terms, contact 
00021 ActivMedia Robotics for information about a commercial version of ARIA at 
00022 robots@activmedia.com or 
00023 ActivMedia Robotics, 19 Columbia Drive, Amherst, NH 03031; 800-639-9481
00024 
00025 */
00026 
00027 #ifndef ARACTIONGROUPS_H
00028 #define ARACTIONGROUPS_H
00029 
00030 #include "ariaTypedefs.h"
00031 #include "ArActionGroup.h"
00032 #include "ArActionColorFollow.h"
00033 #include "ArACTS.h"
00034 #include "ArPTZ.h"
00035 
00036 class ArActionInput;
00037 class ArActionJoydrive;
00038 class ArActionDeceleratingLimiter;
00039 class ArActionRatioInput;
00040 class ArRatioInputKeydrive;
00041 class ArRatioInputJoydrive;
00042 class ArRatioInputRobotJoydrive;
00043 
00045 
00055 class ArActionGroupInput : public ArActionGroup
00056 {
00057 public:
00058   ArActionGroupInput(ArRobot *robot);
00059   virtual ~ArActionGroupInput();
00060   void setVel(double vel);
00061   void setRotVel(double rotVel);
00062   void setHeading(double heading);
00063   void deltaHeadingFromCurrent(double delta);
00064   void clear(void);
00065   ArActionInput *getActionInput(void);
00066 protected:
00067   ArActionInput *myInput;
00068 };
00069 
00071 
00076 class ArActionGroupStop : public ArActionGroup
00077 {
00078 public:
00079   ArActionGroupStop(ArRobot *robot);
00080   virtual ~ArActionGroupStop();
00081 };
00082 
00084 
00090 class ArActionGroupTeleop : public ArActionGroup
00091 {
00092 public:
00093   ArActionGroupTeleop(ArRobot *robot);
00094   virtual ~ArActionGroupTeleop();
00095   void setThrottleParams(int lowSpeed, int highSpeed);
00096 protected:
00097   ArActionJoydrive *myJoydrive;
00098 };
00099 
00101 
00107 class ArActionGroupUnguardedTeleop : public ArActionGroup
00108 {
00109 public:
00110   ArActionGroupUnguardedTeleop(ArRobot *robot);
00111   virtual ~ArActionGroupUnguardedTeleop();
00112   void setThrottleParams(int lowSpeed, int highSpeed);
00113 protected:
00114   ArActionJoydrive *myJoydrive;
00115 };
00116 
00118 
00123 class ArActionGroupWander : public ArActionGroup
00124 {
00125 public:
00126   ArActionGroupWander(ArRobot *robot, int forwardVel = 400, int avoidFrontDist = 450, int avoidVel = 200, int avoidTurnAmt = 15);
00127   virtual ~ArActionGroupWander();
00128 };
00129 
00131 
00137 class ArActionGroupColorFollow : public ArActionGroup
00138 {
00139 public:
00140   ArActionGroupColorFollow(ArRobot *robot, ArACTS_1_2 *acts, ArPTZ *camera);
00141   virtual ~ArActionGroupColorFollow();
00142   void setCamera(ArPTZ *camera);
00143   void setChannel(int channel);
00144   void startMovement();
00145   void stopMovement();
00146   void setAcquire(bool acquire);
00147   int getChannel();
00148   bool getAcquire();
00149   bool getMovement();
00150   bool getBlob();
00151 protected:
00152   ArActionColorFollow *myColorFollow;
00153 };
00154 
00156 
00162 class ArActionGroupRatioDrive : public ArActionGroup
00163 {
00164 public:
00165   ArActionGroupRatioDrive(ArRobot *robot);
00166   virtual ~ArActionGroupRatioDrive();
00167   ArActionRatioInput *getActionRatioInput(void);
00168   void addToConfig(ArConfig *config, const char *section);
00169 protected:
00170   ArActionDeceleratingLimiter *myDeceleratingLimiterForward;
00171   ArActionDeceleratingLimiter *myDeceleratingLimiterBackward;
00172   ArActionRatioInput *myInput;
00173   ArRatioInputKeydrive *myKeydrive;
00174   ArRatioInputJoydrive *myJoydrive;
00175   ArRatioInputRobotJoydrive *myRobotJoydrive;
00176 
00177 };
00178 
00179 
00181 
00187 class ArActionGroupRatioDriveUnsafe : public ArActionGroup
00188 {
00189 public:
00190   ArActionGroupRatioDriveUnsafe(ArRobot *robot);
00191   virtual ~ArActionGroupRatioDriveUnsafe();
00192   ArActionRatioInput *getActionRatioInput(void);
00193   void addToConfig(ArConfig *config, const char *section);
00194 protected:
00195   ArActionRatioInput *myInput;
00196   ArRatioInputKeydrive *myKeydrive;
00197   ArRatioInputJoydrive *myJoydrive;
00198   ArRatioInputRobotJoydrive *myRobotJoydrive;
00199 
00200 };
00201 
00202 #endif // ARACTIONGROUPS_H

Generated on Wed Oct 19 12:56:34 2005 for Aria by  doxygen 1.4.0