11#ifndef PREDICTIVE_STANLEY_CONTROLLER_H
12#define PREDICTIVE_STANLEY_CONTROLLER_H
14#include "../../util/GeospatialOperations.hpp"
15#include "../../util/logging/PathTracer.hpp"
16#include "../kinematics/UnicycleModel.hpp"
60 const double dAngularVelocityLimit = 90.0,
61 const int nPredictionHorizon = 5,
62 const double dPredictionTimeStep = 0.01);
71 void SetReferencePath(
const std::vector<geoops::UTMCoordinate>& vReferencePath);
72 void SetReferencePath(
const std::vector<geoops::GPSCoordinate>& vReferencePath);
97 double m_dControlGain;
98 double m_dAngularVelocityLimit;
99 int m_nPredictionHorizon;
100 double m_dPredictionTimeStep;
101 int m_nCurrentReferencePathTargetIndex;
102 std::vector<geoops::Waypoint> m_vReferencePath;
This class implements the Unicycle Model. This model is used to predict the future state of the rover...
Definition UnicycleModel.hpp:35
This class implements the Predictive Stanley Controller. This controller is used to follow a path usi...
Definition PredictiveStanleyController.h:44
double GetControlGain() const
Accessor for the control gain of the stanley controller.
Definition PredictiveStanleyController.cpp:320
void SetAngularVelocityLimit(const double dAngularVelocityLimit)
Setter for the angular velocity limit of the stanley controller.
Definition PredictiveStanleyController.cpp:307
void SetReferencePath(const std::vector< geoops::Waypoint > &vReferencePath)
Sets the path that the controller will follow.
Definition PredictiveStanleyController.cpp:230
void SetControlGain(const double dControlGain)
Setter for the control gain of the stanley controller.
Definition PredictiveStanleyController.cpp:294
DriveVector Calculate(const geoops::RoverPose &stCurrentPose, const double dMaxSpeed=constants::NAVIGATING_MOTOR_POWER)
Calculate an updated steering angle for the rover based on the current pose using the predictive stan...
Definition PredictiveStanleyController.cpp:78
double GetAngularVelocityLimit() const
Accessor for the angular velocity limit of the stanley controller.
Definition PredictiveStanleyController.cpp:333
geoops::Waypoint FindClosestWaypointInPath(const geoops::UTMCoordinate &stCurrentPosition)
Given the current position of the rover, find the point on the reference path that is closest to the ...
Definition PredictiveStanleyController.cpp:375
~PredictiveStanleyController()
Destroy the Predictive Stanley Controller:: Predictive Stanley Controller object.
Definition PredictiveStanleyController.cpp:62
double GetReferencePathTargetIndex() const
Accessor for the current target index in the reference path.
Definition PredictiveStanleyController.cpp:359
std::vector< geoops::Waypoint > GetReferencePath() const
Accessor for the reference path that the controller is following.
Definition PredictiveStanleyController.cpp:346
This namespace stores classes, functions, and structs that are used to implement different controller...
Definition PIDController.cpp:26
Definition PredictiveStanleyController.h:50
This struct is used by the WaypointHandler to provide an easy way to store all pose data about the ro...
Definition GeospatialOperations.hpp:708
This struct stores/contains information about a UTM coordinate.
Definition GeospatialOperations.hpp:211
This struct is used by the WaypointHandler class to store location, size, and type information about ...
Definition GeospatialOperations.hpp:423