CARLA
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Attributes | List of all members
carla::agents::navigation::VehiclePIDController Class Reference

Combined longitudinal + lateral PID controller. More...

#include <PIDController.h>

Classes

struct  LateralArgs
 
struct  LongitudinalArgs
 

Public Member Functions

void ChangeLateralPID (const LateralArgs &args)
 
void ChangeLongitudinalPID (const LongitudinalArgs &args)
 
rpc::VehicleControl RunStep (float target_speed_kmh, SharedPtr< client::Waypoint > wp)
 Drives towards wp at target_speed_kmh and returns the resulting VehicleControl.
 
void SetOffset (float offset)
 
 VehiclePIDController (SharedPtr< client::Vehicle > vehicle, const LateralArgs &lateral, const LongitudinalArgs &longitudinal, float offset=0.0f, float max_throttle=0.75f, float max_brake=0.30f, float max_steering=0.80f)
 

Private Attributes

PIDLateralController _lat_controller
 
PIDLongitudinalController _lon_controller
 
float _max_brake
 
float _max_steering
 
float _max_throttle
 
float _past_steering
 
SharedPtr< client::Vehicle > _vehicle
 

Detailed Description

Combined longitudinal + lateral PID controller.

Mirrors agents.navigation.controller.VehiclePIDController.

Definition at line 80 of file agents/navigation/PIDController.h.

Constructor & Destructor Documentation

◆ VehiclePIDController()

carla::agents::navigation::VehiclePIDController::VehiclePIDController ( SharedPtr< client::Vehicle >  vehicle,
const LateralArgs &  lateral,
const LongitudinalArgs &  longitudinal,
float  offset = 0.0f,
float  max_throttle = 0.75f,
float  max_brake = 0.30f,
float  max_steering = 0.80f 
)

Definition at line 179 of file PIDController.cpp.

Member Function Documentation

◆ ChangeLateralPID()

void carla::agents::navigation::VehiclePIDController::ChangeLateralPID ( const LateralArgs &  args)

◆ ChangeLongitudinalPID()

void carla::agents::navigation::VehiclePIDController::ChangeLongitudinalPID ( const LongitudinalArgs &  args)

◆ RunStep()

rpc::VehicleControl carla::agents::navigation::VehiclePIDController::RunStep ( float  target_speed_kmh,
SharedPtr< client::Waypoint >  wp 
)

◆ SetOffset()

void carla::agents::navigation::VehiclePIDController::SetOffset ( float  offset)

Member Data Documentation

◆ _lat_controller

PIDLateralController carla::agents::navigation::VehiclePIDController::_lat_controller
private

Definition at line 123 of file agents/navigation/PIDController.h.

Referenced by ChangeLateralPID(), RunStep(), and SetOffset().

◆ _lon_controller

PIDLongitudinalController carla::agents::navigation::VehiclePIDController::_lon_controller
private

Definition at line 122 of file agents/navigation/PIDController.h.

Referenced by ChangeLongitudinalPID(), and RunStep().

◆ _max_brake

float carla::agents::navigation::VehiclePIDController::_max_brake
private

Definition at line 119 of file agents/navigation/PIDController.h.

Referenced by RunStep().

◆ _max_steering

float carla::agents::navigation::VehiclePIDController::_max_steering
private

Definition at line 120 of file agents/navigation/PIDController.h.

Referenced by RunStep().

◆ _max_throttle

float carla::agents::navigation::VehiclePIDController::_max_throttle
private

Definition at line 118 of file agents/navigation/PIDController.h.

Referenced by RunStep().

◆ _past_steering

float carla::agents::navigation::VehiclePIDController::_past_steering
private

Definition at line 121 of file agents/navigation/PIDController.h.

Referenced by RunStep().

◆ _vehicle

SharedPtr<client::Vehicle> carla::agents::navigation::VehiclePIDController::_vehicle
private

Definition at line 117 of file agents/navigation/PIDController.h.


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