00001 #include <limits>
00002
00003 #include "Crew/PilotRequest.h"
00004 #include "Motion/WaypointList.h"
00005
00006 namespace DualCoding {
00007
00008 PilotRequest::PilotRequest(PilotTypes::RequestType_t _type) :
00009 requestType(_type),
00010 dx(0), dy(0), da(0), forwardSpeed(0), strafeSpeed(0), turnSpeed(0), walkParameters(""),
00011 collisionAction(PilotTypes::collisionStop),
00012 waypointList(), clearWaypoints(false),
00013 landmarkExtractor(NULL), landmarkExitTest(NULL),
00014 searchObjectExtractor(NULL), searchExitTest(NULL), searchRotationAngle(0),
00015 targetShape(), targetHeading(std::numeric_limits<float>::quiet_NaN()),
00016 objectShape(), objectExtractor(NULL), objectMatcher(NULL),
00017 obstacleInflation(3*25.4f),
00018 avoidCliffs(false), cliffThreshold(200), avoidObstacles(false), obstacleThreshold(100),
00019 trackRequest(NULL),
00020 displayParticles(50), displayIndividualParticles(0), displayPath(true), displayTree(false), displayObstacles(false),
00021 maxRRTIterations(4000), executePath(true), landmarks(),
00022
00023
00024
00025
00026
00027 requestingBehavior(NULL), requestID(PilotTypes::invalid_Pilot_ID) {}
00028
00029 PilotRequest::PilotRequest(const PilotRequest &req) :
00030 requestType(req.requestType),
00031 dx(req.dx), dy(req.dy), da(req.da),
00032 forwardSpeed(req.forwardSpeed), strafeSpeed(req.strafeSpeed), turnSpeed(req.turnSpeed),
00033 walkParameters(req.walkParameters),
00034 collisionAction(req.collisionAction),
00035 waypointList(req.waypointList), clearWaypoints(req.clearWaypoints),
00036 landmarkExtractor(req.landmarkExtractor), landmarkExitTest(req.landmarkExitTest),
00037 searchObjectExtractor(req.searchObjectExtractor), searchExitTest(req.searchExitTest),
00038 searchRotationAngle(req.searchRotationAngle),
00039 targetShape(req.targetShape), targetHeading(req.targetHeading),
00040 objectShape(req.objectShape), objectExtractor(req.objectExtractor), objectMatcher(req.objectMatcher),
00041 obstacleInflation(req.obstacleInflation),
00042 avoidCliffs(req.avoidCliffs), cliffThreshold(req.cliffThreshold),
00043 avoidObstacles(req.avoidObstacles), obstacleThreshold(req.obstacleThreshold),
00044 trackRequest(req.trackRequest),
00045 displayParticles(req.displayParticles), displayIndividualParticles(req.displayIndividualParticles),
00046 displayPath(req.displayPath), displayTree(req.displayTree), displayObstacles(req.displayObstacles),
00047 maxRRTIterations(req.maxRRTIterations), executePath(req.executePath),landmarks(req.landmarks),
00048
00049
00050
00051
00052
00053 requestingBehavior(req.requestingBehavior), requestID(req.requestID) {}
00054
00055 PilotRequest& PilotRequest::operator=(const PilotRequest &other) {
00056 requestType = other.requestType;
00057 dx = other.dx;
00058 dy = other.dy;
00059 da = other.da;
00060 forwardSpeed = other.forwardSpeed;
00061 strafeSpeed = other.strafeSpeed;
00062 turnSpeed = other.turnSpeed;
00063 walkParameters = other.walkParameters;
00064 collisionAction = other.collisionAction;
00065 waypointList = other.waypointList;
00066 clearWaypoints = other.clearWaypoints;
00067 landmarkExtractor = other.landmarkExtractor;
00068 landmarkExitTest = other.landmarkExitTest;
00069 searchObjectExtractor = other.searchObjectExtractor;
00070 searchExitTest = other.searchExitTest;
00071 searchRotationAngle = other.searchRotationAngle;
00072 targetShape = other.targetShape;
00073 targetHeading = other.targetHeading;
00074 objectShape = other.objectShape;
00075 objectExtractor = other.objectExtractor;
00076 objectMatcher = other.objectMatcher;
00077 obstacleInflation = other.obstacleInflation;
00078 avoidCliffs = other.avoidCliffs;
00079 cliffThreshold = other.cliffThreshold;
00080 avoidObstacles = other.avoidObstacles;
00081 obstacleThreshold = other.obstacleThreshold;
00082 trackRequest = other.trackRequest;
00083 displayParticles = other.displayParticles;
00084 displayIndividualParticles = other.displayIndividualParticles;
00085 displayPath = other.displayPath;
00086 displayTree = other.displayTree;
00087 displayObstacles = other.displayObstacles;
00088 maxRRTIterations = other.maxRRTIterations;
00089 executePath = other.executePath;
00090 landmarks = other.landmarks;
00091 return *this;
00092 }
00093
00094 }