RobotCore
Robot Core Documentation
Classes | Static Public Member Functions | List of all members
pathfinder.Pathfinder Class Reference

The Pathfinder class is used to convert waypoints into a Path that can be used by the PurePursuit class to control the robot so that it follows a specified path. More...

Classes

class  Path
 
class  Segment
 
class  Waypoint
 

Static Public Member Functions

static void setDefaultLookAheadTime (double lookAheadTime)
 
static void setDefaultMinLookAheadDistance (double minLookAheadDist)
 
static void setDefaultMaxSearchTime (double maxSearchTime)
 
static void setDefaultMinSpeed (double minSpeed)
 
static void setDefaultExtendedLookAheadDistance (double distance)
 
static void SetDefaultCurvatureAdjust (double curvatureAdjust)
 
static void printPath (Path path)
 
static Path computePath (final Waypoint[] waypoints_in, int sample_count, double dt, double max_velocity, double max_acceleration, double max_decl, double max_jerk, double wheelBase)
 

Detailed Description

The Pathfinder class is used to convert waypoints into a Path that can be used by the PurePursuit class to control the robot so that it follows a specified path.

Author
John Gaby

Member Function Documentation

◆ computePath()

static Path pathfinder.Pathfinder.computePath ( final Waypoint[]  waypoints_in,
int  sample_count,
double  dt,
double  max_velocity,
double  max_acceleration,
double  max_decl,
double  max_jerk,
double  wheelBase 
)
static

Computes a path from the specified waypoints.

Parameters
waypoints_in- Specifies the waypoints which define the path.
sample_count- Specifies the number of points/bezier curve to generate.
dt- Specifies the time between points on the output path.
max_velocity- Specifies the maximum allowable velocity for either of the wheels.
max_acceleration- Specifies the maximum allowable acceleration.
max_decl- Specifies the maximum allowable deceleration.
wheelbase- Specifies the width of the wheelbase in feet.

◆ printPath()

static void pathfinder.Pathfinder.printPath ( Path  path)
static

Prints the specified path to the console. Useful for debugging.

Parameters
path- Specifies the path to print.

◆ SetDefaultCurvatureAdjust()

static void pathfinder.Pathfinder.SetDefaultCurvatureAdjust ( double  curvatureAdjust)
static

Sets the curvature adjust value that is used when new paths are created. The curvature adjust value is used to force the robot to more (or less) aggressively steer toward the target point. A value of 1 will use the curvature that is computed by the Pure Pursuit algorithm. A value greater than 1 will cause the robot to steer more aggressively towards that point and a value less than will will cause the robot to steer less aggressively.

Parameters
curvatureAdjust- Specifies the adjustment value.

◆ setDefaultExtendedLookAheadDistance()

static void pathfinder.Pathfinder.setDefaultExtendedLookAheadDistance ( double  distance)
static

Sets the default extended lookahead distance that is used when new paths are created.

Parameters
distance- Specifies the extended lookahead distance in feet.

◆ setDefaultLookAheadTime()

static void pathfinder.Pathfinder.setDefaultLookAheadTime ( double  lookAheadTime)
static

Sets the default lookahead time that is used when new paths are created. This is the time that PurePursuit looks ahead on the path to find the point at which to steer.

Parameters
lookAheadTime- Specifies lookahead time in seconds.

◆ setDefaultMaxSearchTime()

static void pathfinder.Pathfinder.setDefaultMaxSearchTime ( double  maxSearchTime)
static

Sets the default max search time when new paths are created. When searching for the closest point on the path to the current robot position, this is that max time from the current time to search.

Parameters
maxSearchTime- Specifies the max search time in seconds.

◆ setDefaultMinLookAheadDistance()

static void pathfinder.Pathfinder.setDefaultMinLookAheadDistance ( double  minLookAheadDist)
static

Sets the default minimum lookahead distance that is used when new paths are created If the distance computed by using the lookAheadTime is less than this value, then this value will be used instead.

Parameters
minLookAheadDist- Specifies the minimum lookahead distance in feet.

◆ setDefaultMinSpeed()

static void pathfinder.Pathfinder.setDefaultMinSpeed ( double  minSpeed)
static

Sets the default minimum speed for the robot when new paths are created.

Parameters
minSpeed- Specifies the minimum speed for the robot in feet/second.

The documentation for this class was generated from the following file: