|
AGX Dynamics 2.42.3.1
|
Pure Pursuit is a geometric method for path tracking that can be used for different applications such as e.g. More...
#include <PurePursuit.h>
Inheritance diagram for agxVehicle::PurePursuit:Classes | |
| class | Path |
| Base class for Path implementations that Pure Pursuit will follow. More... | |
| class | SteeringInformation |
| Base class for a vehicle/robot/machine for which pure pursuit should compute steering information. More... | |
Public Member Functions | |
| PurePursuit (const PurePursuit &&other)=delete | |
| PurePursuit (const PurePursuit &other)=delete | |
| PurePursuit (PurePursuit::SteeringInformation *steeringInformation, PurePursuit::Path *path) | |
| Constructor for Pure Pursuit. | |
| virtual | ~PurePursuit ()=default |
| double | computeLookAhead () const |
| Returns the computed lookahead distance. | |
| bool | computeSteeringInformation () |
| Compute steering information for the vehicle. | |
| agx::Vec3 | getLookAheadParameters () const |
| Return the lookahead parameters as components in a Vec3. | |
| size_t | getNumOutputElements () const |
| const double * | getSteeringValues () const |
| PurePursuit & | operator= (const PurePursuit &&other)=delete |
| PurePursuit & | operator= (const PurePursuit &other)=delete |
| void | setLookAhead (double distance) |
| Specify a fixed lookahead distance which must be > 0. | |
| void | setLookAhead (double velocityGain, double minDistance, double maxDistance) |
| Specify a velocity dependant lookahead distance. | |
Public Member Functions inherited from agx::Referenced | |
| Referenced () | |
| Default constructor. | |
| Referenced (const Referenced &) | |
| template<typename T > | |
| T * | as () |
| Subclass casting. | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. | |
| template<typename T > | |
| const T * | asSafe () const |
| int | getReferenceCount () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. | |
| Referenced & | operator= (const Referenced &) |
| Assignment operator. Will increment the number of references to the referenced object. | |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. | |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
Additional Inherited Members | |
Static Public Member Functions inherited from agx::Referenced | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Protected Member Functions inherited from agx::Referenced | |
| virtual | ~Referenced () |
| Destructor. | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
Static Protected Member Functions inherited from agx::Referenced | |
| static DeleteHandler * | getDeleteHandler () |
| static void | setDeleteHandler (DeleteHandler *handler) |
| Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. | |
Protected Attributes inherited from agx::Referenced | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
Pure Pursuit is a geometric method for path tracking that can be used for different applications such as e.g.
autonomous vehicles or mobile robots.
The actor tracks a position on the path that is at a distance ahead of the current position and calculates the curvature (steering) that is needed to reach the tracking point.
The choice of lookahead distance affects how well the actor will follow the path. A large value will lead less precise path tracking with e.g. taking shortcuts in corners. A small value for lookahead can lead to oscillations in the steering and many steering corrections, espcially when the speed increases.
This class requires the AGX-Control license module.
Definition at line 51 of file PurePursuit.h.
| agxVehicle::PurePursuit::PurePursuit | ( | PurePursuit::SteeringInformation * | steeringInformation, |
| PurePursuit::Path * | path | ||
| ) |
Constructor for Pure Pursuit.
| steeringInformation | Abstraction for vehicle type |
| path | Representation of the path that should be followed. |
|
virtualdefault |
|
delete |
|
delete |
| double agxVehicle::PurePursuit::computeLookAhead | ( | ) | const |
Returns the computed lookahead distance.
| bool agxVehicle::PurePursuit::computeSteeringInformation | ( | ) |
Compute steering information for the vehicle.
Updated information can be fetched from getSteeringValues() where getNumOutputElements() value(s) can be read.
For the interpretation of the values, see the computeSteeringInformation documentation matching the PurePursuit::Vechicle class being used.
| agx::Vec3 agxVehicle::PurePursuit::getLookAheadParameters | ( | ) | const |
Return the lookahead parameters as components in a Vec3.
Order of components are (gain, min, max).
| size_t agxVehicle::PurePursuit::getNumOutputElements | ( | ) | const |
| const double * agxVehicle::PurePursuit::getSteeringValues | ( | ) | const |
|
delete |
|
delete |
| void agxVehicle::PurePursuit::setLookAhead | ( | double | distance | ) |
Specify a fixed lookahead distance which must be > 0.
This has the same effect as calling setLookAhead(anything, distance, distance)
| void agxVehicle::PurePursuit::setLookAhead | ( | double | velocityGain, |
| double | minDistance, | ||
| double | maxDistance | ||
| ) |
Specify a velocity dependant lookahead distance.
Resulting lookahead is vehicle base velocity multipled with velocityGain and then clamped to min- and max-distance.