11#ifndef PREDICTIVE_STANLEY_CONTROLLER_H
12#define PREDICTIVE_STANLEY_CONTROLLER_H
14#include "../../util/GeospatialOperations.hpp"
15#include "../../util/logging/PathTracer2D.hpp"
16#include "../kinematics/BicycleModel.hpp"
61 const double dSteeringAngleLimit,
62 const double dWheelbase,
63 const int nPredictionHorizon,
64 const double dPredictionTimeStep);
73 void SetReferencePath(
const std::vector<geoops::UTMCoordinate>& vReferencePath);
74 void SetReferencePath(
const std::vector<geoops::GPSCoordinate>& vReferencePath);
101 double m_dControlGain;
102 double m_dSteeringAngleLimit;
104 int m_nPredictionHorizon;
105 double m_dPredictionTimeStep;
106 int m_nCurrentReferencePathTargetIndex;
107 std::vector<double> m_vReferencePathCurvature;
108 std::vector<geoops::Waypoint> m_vReferencePath;
This class implements the Bicycle Model. This model is used to predict the future state of the rover ...
Definition BicycleModel.hpp:35
This class implements the Predictive Stanley Controller. This controller is used to follow a path usi...
Definition PredictiveStanleyController.h:44
double GetSteeringAngleLimit() const
Accessor for the steering angle limit of the stanley controller.
Definition PredictiveStanleyController.cpp:387
double GetWheelbase() const
Accessor for the wheelbase of the stanley controller.
Definition PredictiveStanleyController.cpp:400
double GetControlGain() const
Accessor for the control gain of the stanley controller.
Definition PredictiveStanleyController.cpp:374
void SetReferencePath(const std::vector< geoops::Waypoint > &vReferencePath)
Sets the path that the controller will follow.
Definition PredictiveStanleyController.cpp:203
void SetSteeringAngleLimit(const double dSteeringAngleLimit)
Setter for the steering angle limit of the stanley controller.
Definition PredictiveStanleyController.cpp:348
void SetControlGain(const double dControlGain)
Setter for the control gain of the stanley controller.
Definition PredictiveStanleyController.cpp:335
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:100
void SetWheelbase(const double dWheelbase)
Setter for the wheelbase of the stanley controller.
Definition PredictiveStanleyController.cpp:361
~PredictiveStanleyController()
Destroy the Predictive Stanley Controller:: Predictive Stanley Controller object.
Definition PredictiveStanleyController.cpp:84
double GetReferencePathTargetIndex() const
Accessor for the current target index in the reference path.
Definition PredictiveStanleyController.cpp:426
geoops::Waypoint FindClosestWaypointInPath(const geoops::UTMCoordinate &stCurrentPosition, const double dCurrentHeading)
Given the current position of the rover, find the point on the reference path that is closest to the ...
Definition PredictiveStanleyController.cpp:442
PredictiveStanleyController()
Construct a new Predictive Stanley Controller:: Predictive Stanley Controller object.
Definition PredictiveStanleyController.cpp:37
std::vector< geoops::Waypoint > GetReferencePath() const
Accessor for the reference path that the controller is following.
Definition PredictiveStanleyController.cpp:413
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:677
This struct stores/contains information about a UTM coordinate.
Definition GeospatialOperations.hpp:195
This struct is used by the WaypointHandler class to store location, size, and type information about ...
Definition GeospatialOperations.hpp:392