CARLA
Loading...
Searching...
No Matches
FAckermannController Class Reference

#include <AckermannController.h>

Public Member Functions

void ApplySettings (const FAckermannControllerSettings &Settings)
 FAckermannController ()=default
FAckermannControllerSettings GetSettings () const
void Reset ()
void RunLoop (FVehicleControl &Control)
void SetTargetPoint (const FVehicleAckermannControl &AckermannControl)
void UpdateVehiclePhysics (const ACarlaWheeledVehicle *Vehicle)
void UpdateVehicleState (const ACarlaWheeledVehicle *Vehicle)
 ~FAckermannController ()

Private Member Functions

void RunControlAcceleration ()
bool RunControlFullStop ()
void RunControlReverse ()
void RunControlSpeed ()
void RunControlSteering ()
void UpdateVehicleControlCommand ()

Private Attributes

float AccelControlPedalDelta = 0.0f
float AccelControlPedalTarget = 0.0f
PID AccelerationController = PID(0.01f, 0.0f, 0.01f)
float Brake = 0.0f
bool bReverse = false
float DeltaTime = 0.0f
float LastVehicleAcceleration = 0.0f
float LastVehicleSpeed = 0.0f
float MaxAccel = 3.0f
float MaxDecel = 8.0f
float SpeedControlAccelDelta = 0.0f
float SpeedControlAccelTarget = 0.0f
PID SpeedController = PID(0.15f, 0.0f, 0.25f)
float Steer = 0.0f
float TargetAcceleration = 0.0
float TargetJerk = 0.0
float TargetSpeed = 0.0
float TargetSteer = 0.0
float TargetSteerSpeed = 0.0
float Throttle = 0.0f
FVehicleAckermannControl UserTargetPoint
float VehicleAcceleration = 0.0f
float VehicleMaxSteering = 0.0f
float VehicleSpeed = 0.0f
float VehicleSteer = 0.0f

Detailed Description

Definition at line 81 of file AckermannController.h.

Constructor & Destructor Documentation

◆ FAckermannController()

◆ ~FAckermannController()

FAckermannController::~FAckermannController ( )

Definition at line 14 of file AckermannController.cpp.

Member Function Documentation

◆ ApplySettings()

◆ GetSettings()

◆ Reset()

◆ RunControlAcceleration()

void FAckermannController::RunControlAcceleration ( )
private

◆ RunControlFullStop()

bool FAckermannController::RunControlFullStop ( )
private

◆ RunControlReverse()

void FAckermannController::RunControlReverse ( )
private

◆ RunControlSpeed()

void FAckermannController::RunControlSpeed ( )
private

◆ RunControlSteering()

void FAckermannController::RunControlSteering ( )
private

Definition at line 102 of file AckermannController.cpp.

References DeltaTime, Steer, TargetSteer, TargetSteerSpeed, and VehicleSteer.

Referenced by FAckermannController(), and RunLoop().

◆ RunLoop()

◆ SetTargetPoint()

◆ UpdateVehicleControlCommand()

void FAckermannController::UpdateVehicleControlCommand ( )
private

Definition at line 179 of file AckermannController.cpp.

References AccelControlPedalTarget, Brake, bReverse, and Throttle.

Referenced by FAckermannController(), and RunLoop().

◆ UpdateVehiclePhysics()

void FAckermannController::UpdateVehiclePhysics ( const ACarlaWheeledVehicle * Vehicle)

◆ UpdateVehicleState()

Member Data Documentation

◆ AccelControlPedalDelta

float FAckermannController::AccelControlPedalDelta = 0.0f
private

Definition at line 141 of file AckermannController.h.

Referenced by Reset(), and RunControlAcceleration().

◆ AccelControlPedalTarget

float FAckermannController::AccelControlPedalTarget = 0.0f
private

◆ AccelerationController

PID FAckermannController::AccelerationController = PID(0.01f, 0.0f, 0.01f)
private

Definition at line 116 of file AckermannController.h.

Referenced by ApplySettings(), GetSettings(), Reset(), and RunControlAcceleration().

◆ Brake

float FAckermannController::Brake = 0.0f
private

◆ bReverse

bool FAckermannController::bReverse = false
private

◆ DeltaTime

float FAckermannController::DeltaTime = 0.0f
private

◆ LastVehicleAcceleration

float FAckermannController::LastVehicleAcceleration = 0.0f
private

Definition at line 155 of file AckermannController.h.

Referenced by Reset(), and UpdateVehicleState().

◆ LastVehicleSpeed

float FAckermannController::LastVehicleSpeed = 0.0f
private

Definition at line 154 of file AckermannController.h.

Referenced by Reset(), and UpdateVehicleState().

◆ MaxAccel

float FAckermannController::MaxAccel = 3.0f
private

Definition at line 128 of file AckermannController.h.

Referenced by RunControlSpeed().

◆ MaxDecel

float FAckermannController::MaxDecel = 8.0f
private

Definition at line 129 of file AckermannController.h.

Referenced by RunControlSpeed().

◆ SpeedControlAccelDelta

float FAckermannController::SpeedControlAccelDelta = 0.0f
private

Definition at line 138 of file AckermannController.h.

Referenced by Reset(), and RunControlSpeed().

◆ SpeedControlAccelTarget

float FAckermannController::SpeedControlAccelTarget = 0.0f
private

Definition at line 139 of file AckermannController.h.

Referenced by Reset(), RunControlAcceleration(), and RunControlSpeed().

◆ SpeedController

PID FAckermannController::SpeedController = PID(0.15f, 0.0f, 0.25f)
private

Definition at line 115 of file AckermannController.h.

Referenced by ApplySettings(), GetSettings(), Reset(), and RunControlSpeed().

◆ Steer

float FAckermannController::Steer = 0.0f
private

Definition at line 132 of file AckermannController.h.

Referenced by Reset(), RunControlSteering(), and RunLoop().

◆ TargetAcceleration

float FAckermannController::TargetAcceleration = 0.0
private

Definition at line 124 of file AckermannController.h.

Referenced by RunControlSpeed(), and SetTargetPoint().

◆ TargetJerk

float FAckermannController::TargetJerk = 0.0
private

Definition at line 125 of file AckermannController.h.

Referenced by SetTargetPoint().

◆ TargetSpeed

float FAckermannController::TargetSpeed = 0.0
private

Definition at line 123 of file AckermannController.h.

Referenced by RunControlReverse(), RunControlSpeed(), and SetTargetPoint().

◆ TargetSteer

float FAckermannController::TargetSteer = 0.0
private

Definition at line 121 of file AckermannController.h.

Referenced by RunControlSteering(), and SetTargetPoint().

◆ TargetSteerSpeed

float FAckermannController::TargetSteerSpeed = 0.0
private

Definition at line 122 of file AckermannController.h.

Referenced by RunControlSteering(), and SetTargetPoint().

◆ Throttle

float FAckermannController::Throttle = 0.0f
private

◆ UserTargetPoint

FVehicleAckermannControl FAckermannController::UserTargetPoint
private

Definition at line 118 of file AckermannController.h.

Referenced by RunControlFullStop(), RunControlReverse(), and SetTargetPoint().

◆ VehicleAcceleration

float FAckermannController::VehicleAcceleration = 0.0f
private

Definition at line 152 of file AckermannController.h.

Referenced by Reset(), RunControlAcceleration(), and UpdateVehicleState().

◆ VehicleMaxSteering

float FAckermannController::VehicleMaxSteering = 0.0f
private

◆ VehicleSpeed

float FAckermannController::VehicleSpeed = 0.0f
private

◆ VehicleSteer

float FAckermannController::VehicleSteer = 0.0f
private

Definition at line 150 of file AckermannController.h.

Referenced by RunControlSteering(), and UpdateVehicleState().


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