Main Page | Modules | Class Hierarchy | Class List | Class Members | Examples

ArPathPlanningTask Class Reference

#include <ArPathPlanningTask.h>

Inheritance diagram for ArPathPlanningTask:

ArASyncTask ArThread List of all members.

Detailed Description

Task that performs path planning and path following in a seperate asynchronous thread.

The path planning task uses a grid based search to compute the shortest and safe path from the present robot pose to any reachable point in the given robot enviroment map. It then enables an action that follows the planned path, all the while using the dynamic window method to avoid unmapped obstacles in its path. The path planning thread requires fairly accurate robot location. Hence a localization task (ArLocalizationTask or ArSonarLocalizationTask) must also be run concurrently with the path planning task.

See PathPlanning for an overview of path planning and following in ARNL.

Note:
ArPathPlanningTask::ArPathPlanningTask will start the new thread automatically when an object is created, so you must not call ArASyncTask::runAsync() on an ArPathPlanningTask object.
Examples:

guiServer.cpp, and justPathPlanningGuiServer.cpp.


Public Types

enum  PathPlanningState {
  NOT_INITIALIZED, PLANNING_PATH, MOVING_TO_GOAL, REACHED_GOAL,
  FAILED_PLAN, FAILED_MOVE, ABORTED_PATHPLAN, INVALID
}
 State of the path plan (accessible using getState()). More...
enum  LocalPlanningState {
  NO_LOCAL_PLAN, GOAL_OCCUPIED, NO_MOVE, OBSTACLE_TOO_CLOSE,
  COMPLETELY_BLOCKED, GOT_PLAN_AND_VEL_HEADING, GOT_PLAN_AND_VELS
}
 State of the local motion plan. More...
enum  RangeType { NEITHER, CURRENT, CUMULATIVE, BOTH }
 How to incorporate the range device data. More...

Public Member Functions

 ArPathPlanningTask (ArRobot *robot, ArSick *laser, ArRangeDevice *sonar, ArMap *m)
 ArPathPlanningTask (ArRobot *robot, ArRangeDevice *sonar, ArMap *map)
 ~ArPathPlanningTask (void)
 Base destructor.
bool pathPlanToPose (ArPose goal, bool headingFlag, bool printFlag=true)
 Set a new destination pose for the path planning task thread to plan to.
bool pathPlanToGoal (const char *goalname, bool strictGoalTypeMatching=true)
 Set a new goal (from the map) for the path planning task thread to plan to.
ArActionPlanAndMoveToGoalgetPathPlanAction (void)
 Gets just the path planning/following action object.
ArActionGroupgetPathPlanActionGroup (void)
 Gets the path planning action/following group (move, stall recovery etc).
void setPathPlanActionGroup (ArActionGroup *group, bool takeOwnershipOfGroup=false)
 Sets the path planning action/following group.
bool loadParamFile (const char *file)
 Load the path planning params from config file.
double getSafeCollisionRange (void)
 Gets the minimum distance it must look for the speed at which it is going (mostly internal use).
bool saveParams (char *filename)
 Saves the default params to the filename.
void addGoalDoneCB (ArFunctor1< ArPose > *functor)
 Adds a callback which will be called when goal reached.
void remGoalDoneCB (ArFunctor1< ArPose > *functor)
 Removes a callback which used to be called when goal reached.
void addGoalFailedCB (ArFunctor1< ArPose > *functor)
 Adds a callback which will be called when goal failed.
void remGoalFailedCB (ArFunctor1< ArPose > *functor)
 Removes a callback which used to be called when goal failed.
void addGoalInterruptedCB (ArFunctor1< ArPose > *functor)
 Adds a callback which will be called when goal is interrupted.
void remGoalInterruptedCB (ArFunctor1< ArPose > *functor)
 Removes a callback which used to be called when goal is interrupted.
void addNewGoalCB (ArFunctor1< ArPose > *functor)
 Adds a callback which will be called when there is a new goal.
void remNewGoalCB (ArFunctor1< ArPose > *functor)
 Removes a callback which used to be called when there is a new goal.
void addGoalFinishedCB (ArFunctor *functor)
 Adds a callback for when the goal is done, failed, or intterupted.
void remGoalFinishedCB (ArFunctor *functor)
 Removes a callback for when the goal is done, failed, or intterupted.
void trackingFailed (int failedTimes)
 If localization fails, then call this to alert path planning.
void cancelPathPlan (void)
 Cancel any current path following.
void setVerboseFlag (bool f)
 Set the verbose flag.
ArPose getCurrentGoal ()
 Get the current goal of the path plan.
bool getInitializedFlag (void)
 Get the value of path plan initialized flag.
bool getVerboseFlag (void)
 Get the verbose flag. (debugging only).
PathPlanningState getState (void)
 Gets the state of path planning.
void getFailureString (char *str, size_t len)
 Gets a textual description of failure or current planning status.
void getStatusString (char *str, size_t len)
 Gets a textual description of failure or current planning status.
std::list< ArPosegetCurrentPath (ArPose from, bool local=false)
 Gets the list of path points as poses.
ArMapgetAriaMap (void)
 Gets the Aria map used in the path planning.
void goalFailed (ArPose goal, const char *failureString="Failed going to goal", PathPlanningState state=FAILED_MOVE)
double getLastMoveTime (void)
 Get the time robot was not moving.
double getLastLinearMoveTime (void)
 Get the time robot was not moving.
void setLastMoveTime (double t)
 Set the time the robot was not moving.
void setLastLinearMoveTime (double t)
 Set the time the robot was not moving.
double computeProgress (ArPose robotPose)
 Compute the progress from start to present pose.
double estimateTimeToGoal (ArPose robotPose)
 Estimates an approximate time to goal in seconds..
double estimateDistanceToGoal (ArPose robotPose)
 Estimates an approximate distance to goal in mm.
ArPathPlan::LocalPathState getLocalPathState (void)
 Returns the last local path planning result.
ArPathPlan::SearchVelocityState getDWAState (void)
 Returns the last velocity search state from the DWA.
double getCost (void)
 Returns cost of the robots cell in the occupancy grid.
double getUtil (void)
 Returns util of the robots cell in the occupancy grid.
std::list< ArPosegetPathFromTo (ArPose from, ArPose to)
 Returns just the grid based search path from a point to another.
void addStateChangeCB (ArFunctor *cb)
 Add a callback to be notified when planning state changes.
void remStateChangeCB (ArFunctor *cb)
 Remove a callback to be notified when planning state changes.
std::list< ArPose > * getObsListPtr (void)
 Get the pointer to the list of obstacle points used for path planning.
void addBlockedPathCB (ArFunctor1< const std::list< ArPose > * > *cb)
 Add a callback function from the list to call when path blocked.
void remBlockedPathCB (ArFunctor1< const std::list< ArPose > * > *cb)
 Remove a callback function from the list to call when path blocked.
void invokeBlockedPathCB (void)
bool getWaitingToFailFlag (void)
 Get the waiting to fail flag.
Accessors for current configuration values
These values are normally set via ArConfig (the "Path Planning" section) by loading a file or other means, or by calling the modifier functions below.

bool getUseLaserFlag (void)
 Get the use laser flag.
bool getUseSonarFlag (void)
 Get the use sonar flag.
bool getMapChangedFlag (void)
 Gets the map changed flag to trigger reloading of map for path planning.
bool getUseOneWaysFlag (void)
 Gets the use one way flag.
bool getUseResistanceFlag (void)
 Gets the use resistance flag.
double getMarkOldPathFactor (void)
 Gets the mark old path factor (mostly internal use).
short getResistance (void)
 Gets the resistance for restrictive sectors (mostly internal use).
double getMaxSpeed (void) const
 Gets the maximum speed for the robot.
double getMaxRotSpeed (void) const
 Gets the maximum rotational speed for the robot.
double getCollisionRange (void) const
 Gets the maximum obstacle range for collision avoidance.
double getSlowSpeed (void) const
 Gets the slow speed.
double getFastSpeed (void) const
 Gets the fast speed.
double getSideClearanceAtSlowSpeed (void) const
 Gets the side clearance at slow speed.
double getSideClearanceAtFastSpeed (void) const
 Gets the side clearance at fast speed.
double getFrontClearance (void) const
 Gets the front clearance.
double getFrontPaddingAtSlowSpeed (void) const
 Gets the front padding at slow speed.
double getFrontPaddingAtFastSpeed (void) const
 Gets the front padding at high speed.
double getSuperMaxTransDecel (void) const
 Gets the decel allowed when there is still +ve clearance + padding.
double getEmergencyMaxTransDecel (void) const
 Gets the emergency max decel allowed for collision avoidance.
double getWidth (void) const
 Gets the robot width.
double getLength (void) const
 Gets the robot length.
double getPlanMapResolution (void) const
 Gets the path planning map resolution.
double getPlanFreeSpace (void) const
 Gets the distance from the side of the robot to obstacles to plan with.
double getHeadingWt (void) const
 Gets the heading weight.
double getDistanceWt (void) const
 Gets the distance weight.
double getVelocityWt (void) const
 Gets the velocity weight.
int getLinVelIncrements (void) const
 Gets the linear velocity increments.
int getRotVelIncrements (void) const
 Gets the rotational velocity increments.
int getSmoothSize (void) const
 Gets the smoothing window size.
double getObsThreshold (void) const
 Gets the obstacle threshold.
double getMaxExpansionFactor (void) const
 Gets the maximum expansion factor when local planning fails.
bool getUseCollisionRangeForPlanningFlag (void) const
 Gets the flag which decides if collision range is used for planning.
double getGoalDistanceTolerance (void) const
 Gets the distance tolerance to goal in mm.
double getGoalAngleTolerance (void) const
 Gets the angle tolerance to goal in mm.
double getGoalSpeed (void) const
 Gets the speed for end move.
double getGoalRotSpeed (void) const
 Gets the rotational speed for end move.
double getGoalTransAccel (void) const
 Gets the accel for end move.
double getGoalRotAccel (void) const
 Gets the rotational accel for end move.
double getGoalTransDecel (void) const
 Gets the decel for end move.
double getGoalRotDecel (void) const
 Gets the rotational decel for end move.
double getGoalSwitchTime (void) const
 Gets the time to allow for slowing down.
bool getGoalUseEncoderFlag (void) const
 Gets the use encoder pose for end move.
double getHeadingRotSpeed (void) const
 Gets the rotational speed for end move.
double getHeadingRotAccel (void) const
 Gets the rotational accel for end move.
double getHeadingRotDecel (void) const
 Gets the rotational decel for end move.
int getSecsToFail (void) const
 Gets the secs for local path search to fail in.
double getAlignAngle (void) const
 Gets the min angle to local dest to go to align mode.
double getAlignSpeed (void) const
 Gets the max speed at which to go to align mode.
int getSplineDegree (void) const
 Gets the degree of the spline.
int getNumSplinePoints (void) const
 Gets the increments in path to set control points.
bool getPlanEverytimeFlag (void) const
 Gets the use encoder pose for end move.
bool getClearOnFailFlag (void) const
 Get the clear on fail flag.
bool getUseEStopFlag (void) const
 Gets use emergency stop if collision imminent flag.
Modifiers for configuration values.
Normally these values are automatically set via ArConfig (e.g. by loading them from a file or other source) in the "Path Planning" section, and these methods would only be used internally by ARNL to set stored values from ArConfig.

void setUseLaserFlag (bool f)
 Sets the use laser flag.
void setUseSonarFlag (bool f)
 Sets the use sonar flag.
void setMapChangedFlag (bool f)
 Sets the map changed flag to trigger reloading of map for path planning.
void setUseOneWaysFlag (bool f)
 Sets the use one way flag.
void setUseResistanceFlag (bool f)
 Sets the use restrictive areas flag.
void setMarkOldPathFactor (double f)
 Sets the mark old path factor.
void setResistance (short f)
 Sets the reisistance.
void setPlanDoneCallBack (ArFunctor *prcb)
 Sets the callback which will be called after planning and before action.
void setPlanEverytimeFlag (bool f)
 Set the plan everytime flag.
void setClearOnFailFlag (bool f)
 Set the clear on fail flag.
void setUseEStopFlag (bool f)
 Set the emergency stop flag.
void setUseCollisionRangeForPlanningFlag (bool f)
 Gets the flag which decides if collision range is used for planning.
void setMaxSpeed (double f)
 Sets the maximum speed during path following.
void setMaxRotSpeed (double f)
 Sets the maximum rotational speed during path following.
void setCollisionRange (double f)
 Sets the maximum range for obstacles in sensor view.
void setSlowSpeed (double f)
 Sets the slow speed for dynamic clearance computation.
void setFastSpeed (double f)
 Sets the fast speed for dynamic clearance computation.
void setSideClearanceAtSlowSpeed (double f)
 Sets the side clearance at slow speed.
void setSideClearanceAtFastSpeed (double f)
 Sets the side clearance at fast speed.
void setFrontClearance (double f)
 Sets the front clearance.
void setFrontPaddingAtSlowSpeed (double f)
 Sets the front padding at slow speed.
void setFrontPaddingAtFastSpeed (double f)
 Sets the front padding at fast speed.
void setSuperMaxTransDecel (double f)
 Sets the deceleration to be used to avoid obstacles inside padding.
void setEmergencyMaxTransDecel (double f)
 Set the deceleration to be used when obstacles inside clearance.
void setWidth (double f)
 Sets the robot width used for path planning.
void setLength (double f)
 Sets the robot length used for path planning.
void setPlanMapResolution (double f)
 Sets the grid size for the path planning map.
void setPlanFreeSpace (double f)
 Sets the distance from obstacles beyond which costs equal free space.
void setHeadingWt (double f)
 Sets the heading weight for DWA.
void setDistanceWt (double f)
 Sets the distance weight for DWA.
void setVelocityWt (double f)
 Sets the velocity weight for DWA.
void setLinVelIncrements (int f)
 Sets the linear velocity increments for the DWA table.
void setRotVelIncrements (int f)
 Sets the rotational velocity increments for the DWA table.
void setSmoothWinSize (int f)
 Sets the smooth windows size for the DWA.
void setObsThreshold (double f)
 Sets the threshold above which a cell is considered an obstacle.
void setMaxExpansionFactor (double f)
 Sets the factor to which the search will expand if it fails.
void setGoalDistanceTolerance (double f)
 Sets the distance from goal within which end move will kick in.
void setGoalAngleTolerance (double f)
 Sets the orientation from goal angle within which end move will kick in.
void setGoalSpeed (double f)
 Sets the speed at which end move will be executed.
void setGoalRotSpeed (double f)
 Sets the rotational speed at which end move will be executed.
void setGoalTransAccel (double f)
 Sets the acceleration at which goal will be attempted.
void setGoalRotAccel (double f)
 Sets the rotational acceleration at which goal will be attempted.
void setGoalTransDecel (double f)
 Sets the deceleration at which goal will be attempted.
void setGoalRotDecel (double f)
 Sets the rotational deceleration at which goal will be attempted.
void setGoalSwitchTime (double f)
 Sets the extra time beyond computed slow down time to do the end move.
void setGoalUseEncoderFlag (bool f)
 Sets the flag to allow encoder pose for the end move.
void setHeadingRotSpeed (double f)
 Sets the rotation speed for the Aria heading command.
void setHeadingRotAccel (double f)
 Sets the rotation accel for the Aria heading command.
void setHeadingRotDecel (double f)
 Sets the rotation decel for the Aria heading command.
void setSecsToFail (int f)
 Sets the no of seconds the local planning will keep retrying a fail.
void setAlignAngle (double f)
 Sets the minimum angle from the path orientation to allow linear motion.
void setAlignSpeed (double f)
 Sets the minimum speed at which align to path orient will take place.
void setSplineDegree (int f)
 Sets the degree of the smoothing spline.
void setNumSplinePoints (int f)
 Sets the distance between knot points on the path to smooth with.
void setPlanParams (double robotWidth, double robotLength, double frontClearance, double sideClearance, double obsThreshold, double maxLinAcc, double maxRotAcc, double maxLinDec, double maxRotDec, double maxLinVel, double maxRotVel, double headingWt, double distanceWt, double velocityWt, double gridRes, int nli, int nri, int sws, double maxObsDistance, double goalDistTol, double goalAngTol, double PlanFreeSpace, int secsToFail, double alignAngle, double alignSpeed, int splineDegree, int numSplinePoints, double goalOccupiedFailDistance, double curvatureSpeedFactor, bool useCollisionRangeForPlanningFlag, double oneWayCost, double centerAwayCost, double localPathFailDistance, short resistance, double markOldPathFactor)
 Sets path plan parameters which affect obstacle avoidance & tracking (for internal use).
void setMovementParams (double maxLinAcc, double maxRotAcc, double maxLinDec, double maxRotDec, double maxLinVel, double maxRotVel)
 Sets only the dynamic motion params (for internal use).
Modify the set of range devices used by ARNL.
void addRangeDevice (ArRangeDevice *device, RangeType type)
 Adds a range sensing device.
void addGlobalReplanningRangeDevice (ArRangeDevice *device, RangeType type)
 Adds a global range device.
void remRangeDevice (const char *name, RangeType type)
 Remove a range device from the robot's list, by name.
void remRangeDevice (ArRangeDevice *device, RangeType type)
 Remove a range device from the robot's list, by instance.
void remGlobalReplanningRangeDevice (const char *name, RangeType type)
 Remove a global range device from the robot's list, by name.
void remGlobalReplanningRangeDevice (ArRangeDevice *device, RangeType type)
 Remove a global range device from the robot's list, by instance.
std::list< ArRangeDevice * > * getRangeDeviceList (void)
 Gets the range device list.
std::list< ArRangeDevice * > * getCumRangeDeviceList (void)
 Gets the cumulative range device list.
std::list< ArRangeDevice * > * getGlobalReplanningRangeDeviceList (void)
 Gets the global range device list.
std::list< ArRangeDevice * > * getGlobalReplanningCumRangeDeviceList (void)
 Gets the global range device list.
void clearRangeDevices (void)
 Clears the range devices.
void clearGlobalReplanningRangeDevices (void)
 Clears the global range devices.
void clearGlobalReplanningCumRangeDevices (unsigned int cyt)
 Clears the global cum range devices.
void clearCumRangeDevices (unsigned int cyt)
 Clears the cumulative range devices.
ArNetworking callback methods
(used by server classes in ArServerClasses.cpp)

void drawSearchRectangle (ArServerClient *client, ArNetPacket *packet)
 Draws the local search rectangle.
void drawNewPoints (ArServerClient *client, ArNetPacket *packet)
 Draws the points seen by the sensor and not in the map.
void drawGridPoints (ArServerClient *client, ArNetPacket *packet)
 Draws the local special points.
void drawTangent (ArServerClient *client, ArNetPacket *packet)
 Draws the local special points.
void drawPathPoints (ArServerClient *client, ArNetPacket *packet)
 Draws the local path points.
void drawObsPoints (ArServerClient *client, ArNetPacket *packet)
 Draws the local obstacle points.
void drawVelocityPath (ArServerClient *client, ArNetPacket *packet)
 Draws the display points.
void drawRobotBounds (ArServerClient *client, ArNetPacket *packet)
 Draws the robot boundary.

Protected Member Functions

virtual void * runThread (void *ptr)
 Function used to run the task as a thread.
void robotCallBack (void)
 The sensor interpretation callback. Called every 100msec.
bool configureLaser (void)
 Needed if the laser does not connect first.
bool getActionFireFlag (void)
 Get the action fire flag.
bool getGoalReachedFlag (void)
 Get the goal reached flag.
bool getSensorSetFlag (void)
 Get the sensor set flag indicating new range data (set every 100ms).
bool getPlanFailedFlag (void)
 Get the plan failed flag.
bool getGoalAlteredFlag (void)
 Get the goal altered flag.
bool getGoalSetFlag (void)
 Get the goal set flag.
bool getGoalPlannedFlag (void)
 Get the goal planned flag.
bool getGoalHeadingFlag (void)
 Get the goal heading flag.
bool getReplanGlobalPathFlag (void)
 Get the path is blocked flag.
unsigned int getLastPlanTime (void)
 Return time of last replanning.
void setActionFireFlag (bool f)
 Set the goal set Flag.
void setCurrentGoal (ArPose p)
 Set the current goal for path planning.
void setSensorSetFlag (bool f)
 Set the value of flag indicating new sensor data.
void setInitializedFlag (bool f)
 Set the value of initialized flag.
void setGoalReachedFlag (bool f)
 Set the goal reached flag.
void setPlanFailedFlag (bool f)
 Set the plan failed flag.
void setGoalSetFlag (bool f)
 Set the goal set Flag.
void setGoalPlannedFlag (bool f)
 Set the goal planned Flag.
void setGoalHeadingFlag (bool f)
 Set the goal heading Flag.
void setGoalAlteredFlag (bool f)
 Set the goal heading Flag.
void setReplanGlobalPathFlag (bool f)
 Set the blocked path flag.
void setWaitingToFailFlag (bool f)
 Set the waiting to failsecs flag.
void setLastPlanTime (void)
 Set the time of last plan.
void setState (PathPlanningState s, const char *failureString=NULL)
 Sets the state of path planning.
void setProgressNow (double p)
 Sets the progress and time to now.
bool planAndSetupAction (ArPose from, bool sensorSeesBlock=false)
 Set up the path planning stuff and follow.
LocalPlanningState computeLocalMotion (ArPose robotPose, ArPose goalPose, double &linVel, double &rotVel, double &heading, double searchFactor, bool replan)
 Actually drives the robot along the planned path.
bool clearMapAndObsList (double cd, ArPose rp)
 Wrapper to get to ArPathPlan to clear its obs point list and map.
void clearRangeMap (void)
 Clears all transient readings.
bool incorporateRangeIntoMap (ArRangeDevice *rangeDev, double rangeDist, ArPose robotPose, bool useSensorMap, bool notCumulative)
 Incorporates the sensor readings into the local map for obstacle avoid.
bool incorporateGlobalReplanningRangeSensors (ArPose rp)
 Incorporate all the global range sensors.
bool hasGlobalReplanningRangeSensors (void)
 Checks whether there are any global range sensors.
bool pathEqualsStraightLine (void)
 Checks to see if path to goal is a straight line.
void setVariableClearances (double lvel, double avel, double &front, double &side)
 Sets the clearances according to speed and return those vals.
void fillLocalObstacleList (double lvel, double avel, ArPose robotPose)
 Fills the local obstacle list.
double findDistanceToCollision (double lvel, double avel, ArPose robotPose)
 Find the closest obstacle within collision range.
void goalDone (ArPose goal)
 What to do when goal is reached.
void goalInterrupted (ArPose goal)
 What to do when goal was interrupted.
bool reconfigurePathPlanning (void)
 Needed if the params are changed or loaded again.
void setupPathPlanningParams (void)
 Setup the path planing params with the aria config thing.
void mapChanged (void)
 Function for the things to do if map changes.
double getMaxLinDecel (void)
 Get the linear deceleration.
ArPoseWithTime getProgress (void)
 Get the progress with time.
void doSanityCheck (double width, double length, double robotVel, double robotRotVel, double robotRotAccel, double robotRotDecel, double robotAccel, double robotDecel)
 Do a sane check on the param values.


Member Enumeration Documentation

enum ArPathPlanningTask::LocalPlanningState
 

State of the local motion plan.

Enumeration values:
NO_LOCAL_PLAN  Failed to plan a path to goal.
GOAL_OCCUPIED  Goal is occupied.
NO_MOVE  Failed to reach goal after plan obtained.
OBSTACLE_TOO_CLOSE  Obstacle too close for move.
COMPLETELY_BLOCKED  All directions blocked.
GOT_PLAN_AND_VEL_HEADING  Plan obtained with heading and vel.
GOT_PLAN_AND_VELS  Plan obtained with lin and ang velocities.

enum ArPathPlanningTask::PathPlanningState
 

State of the path plan (accessible using getState()).

Enumeration values:
NOT_INITIALIZED  Task not initialized.
PLANNING_PATH  Planning the inital path.
MOVING_TO_GOAL  Moving to the goal.
REACHED_GOAL  Reached the goal.
FAILED_PLAN  Failed to plan a path to goal.
FAILED_MOVE  Failed to reach goal after plan obtained.
ABORTED_PATHPLAN  Aborted plan before done.
INVALID  Invalid state.

enum ArPathPlanningTask::RangeType
 

How to incorporate the range device data.

Enumeration values:
NEITHER  No current and no cumulative.
CURRENT  Current buffer only.
CUMULATIVE  Cumulative buffer only.
BOTH  Both buffers.


Constructor & Destructor Documentation

ArPathPlanningTask::ArPathPlanningTask ArRobot robot,
ArSick laser,
ArRangeDevice sonar,
ArMap m
 

Constructor for a robot with two typical range devices (SICK LRF and Sonar or other less accurate range device) and the map. Use addRangeDevice() to add additional range devices. Parameters are set to default values and state is initialized, then the path planning task thread is automatically started.

ArPathPlanningTask::ArPathPlanningTask ArRobot robot,
ArRangeDevice sonar,
ArMap map
 

Constructor for a robot with just sonar (or other comparable range device) and map. Use addRangeDevice() to add additional range devices. Parameters are set to default values and state is initialized, then the path planning task thread is automatically started.


Member Function Documentation

void ArPathPlanningTask::goalFailed ArPose  goal,
const char *  failureString = "Failed going to goal",
PathPlanningState  state = FAILED_MOVE
 

What to do when goal cannot be reached.

For internal use only.

void ArPathPlanningTask::invokeBlockedPathCB void   ) 
 

Invoke all the callbacks after a replan due to path block.

For internal use only.

void ArPathPlanningTask::setMovementParams double  maxLinAcc,
double  maxRotAcc,
double  maxLinDec,
double  maxRotDec,
double  maxLinVel,
double  maxRotVel
 

Sets only the dynamic motion params (for internal use).

For internal use only.

void ArPathPlanningTask::setPlanParams double  robotWidth,
double  robotLength,
double  frontClearance,
double  sideClearance,
double  obsThreshold,
double  maxLinAcc,
double  maxRotAcc,
double  maxLinDec,
double  maxRotDec,
double  maxLinVel,
double  maxRotVel,
double  headingWt,
double  distanceWt,
double  velocityWt,
double  gridRes,
int  nli,
int  nri,
int  sws,
double  maxObsDistance,
double  goalDistTol,
double  goalAngTol,
double  PlanFreeSpace,
int  secsToFail,
double  alignAngle,
double  alignSpeed,
int  splineDegree,
int  numSplinePoints,
double  goalOccupiedFailDistance,
double  curvatureSpeedFactor,
bool  useCollisionRangeForPlanningFlag,
double  oneWayCost,
double  centerAwayCost,
double  localPathFailDistance,
short  resistance,
double  markOldPathFactor
 

Sets path plan parameters which affect obstacle avoidance & tracking (for internal use).

For internal use only.


Generated on Tue Feb 20 10:56:29 2007 for Arnl by  doxygen 1.4.0