![]() |
BoB robotics
The Brains on Board robotics library
|
The controller takes a list of waypoints as a path to follow, then it calculates the optimal turning angle to stay on the path. More...
#include <pure_pursuit_controller.h>
Public Member Functions | |
PurePursuitController (millimeter_t lookahead, millimeter_t wheelBaseLength, millimeter_t stopping_dist) | |
void | setWayPoints (const std::vector< Vector2< millimeter_t > > &wp) |
set waypoints which forms a path to be followed | |
void | addToWayPoint (const Vector2< millimeter_t > wayPoint) |
adds to the list of waypoints | |
void | setlookAheadDistance (const millimeter_t distance) |
void | setWheelBaseLength (const millimeter_t length) |
sets the distance between the car's wheel bases | |
void | setStoppingDistance (const millimeter_t distance) |
sets the stopping distance. If the car is within this distance, the controller stops | |
bool | getTurningAngle (const millimeter_t x, const millimeter_t y, const radian_t heading, degree_t &turningAngle) |
calculates the turning angle needed to follow the path, returns true if there is a valid angle. | |
bool | getLookAheadPoint (const millimeter_t x, const millimeter_t y, const millimeter_t r, Vector2< millimeter_t > &lookaheadPoint) |
calculates the look-ahead point the robot follows. returns true if there is a valid point | |
The controller takes a list of waypoints as a path to follow, then it calculates the optimal turning angle to stay on the path.
!
void BoBRobotics::Robots::PurePursuitController::setlookAheadDistance | ( | const millimeter_t | distance | ) |
sets the lookahead distance. Large values causes the car to cut corners, where small values makes the car follow the path more closely