Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
PilotRequest.hGo to the documentation of this file.00001 //-*-c++-*- 00002 #ifndef INCLUDED_PilotRequest_h_ 00003 #define INCLUDED_PilotRequest_h_ 00004 00005 #include "ShapeRoot.h" 00006 00007 namespace DualCoding { 00008 00009 class MapBuilderRequest; 00010 class LookoutTrackRequest; 00011 00012 //! Request to the @a Pilot for motion or navigation. 00013 00014 class PilotRequest { 00015 friend class Pilot; 00016 00017 public: 00018 enum PilotRequestType_t { 00019 walk, 00020 waypointWalk, 00021 visualSearch, 00022 gotoShape, 00023 gotoTarget, 00024 pushTarget, 00025 creepToShape 00026 }; 00027 00028 //! Constructor 00029 PilotRequest(PilotRequestType_t _type); 00030 00031 PilotRequest(const PilotRequest &req); 00032 00033 PilotRequestType_t getRequestType() const { return requestType; } 00034 00035 PilotRequestType_t requestType; //!< Type of pilot request 00036 float dx; //!< Forward walk distance in mm 00037 float dy; //!< Walking strafe distance in mm 00038 float da; //!< Walking rotation distance in radians 00039 MapBuilderRequest *mapBuilderRequest; //!< MapBuilderRequest to be used for visual search 00040 MapBuilderRequest* (*mapBuilderRequestFn)(); //!< function to return a dynamically-constructed MapBuilderRequest which Pilot will delete 00041 AngSignPi searchRotationAngle; //!< Angle to rotate body to continue a visual search 00042 bool (*exitTest)(); //!< If true, terminate search and post a completion event 00043 ShapeRoot targetShape; //!< Shape to walk to 00044 bool avoidCliffs; //!< If true, use chest IR to avoid walking off a cliff 00045 int cliffThreshold; //!< Maximum tolerable distance to the ground (millimeters) 00046 bool avoidObstacles; //!< If true, use head IR sensors to avoid obstacles 00047 int obstacleThreshold; //!< Minimum tolerable distance to an obstacle (millimeters) 00048 LookoutTrackRequest *trackRequest; //!< Lookout request for tracking objects while walking 00049 int localizationInterval; //!< Time in msec between localization attempts; will execute the mapBuilderRequest, then if localizeTest is true, will call particle filter 00050 bool (*localizationTest)(); //!< If true, local map contains good enough data to try to localize 00051 float localizationDisplayParticles; //!< How many particles to display (number or percentage) 00052 int localizationDisplayInterval; //!< Time in msec between calls to displayParticles() 00053 00054 float safeDistanceAroundTarget; //!< The distance to stay away from the target while circling 00055 AngSignPi subtendAngle; //!< The angle in which to subtend the target while circling 00056 AngSignPi approachAngle; //!< The angle in which to approach the desired position around the target 00057 Point positionRelativeToTarget; //!< The desired position around the target, relative to the target 00058 AngSignPi angleToPushTarget; //!< The angle in which to push the target 00059 void (*buildTargetParamsFn)(bool *buildFrontLeft, bool *buildFrontRight, bool *buildBackLeft, bool *buildBackRight, bool *lookAtCentroid, int *maxRetries); //!< function to return the parameters to build the target 00060 MapBuilderRequest* (*buildTargetMapBuilderRequestFn)(Point point); //!< function to return a dynamically-constructed MapBuilderRequest, given a point to look at, which BuildTarget will use to build the target 00061 00062 private: 00063 unsigned int requestID; 00064 00065 PilotRequest& operator=(const PilotRequest &req); //!< don't call this 00066 }; 00067 00068 } // namespace 00069 00070 #endif |
DualCoding 4.0 |
Generated Thu Nov 22 00:52:36 2007 by Doxygen 1.5.4 |