CARLA
Loading...
Searching...
No Matches
Namespaces | Functions
PIDController.h File Reference
#include <algorithm>
#include <cmath>
#include "carla/trafficmanager/Constants.h"
#include "carla/trafficmanager/DataStructures.h"

Go to the source code of this file.

Namespaces

namespace  carla
 This file contains definitions of common data structures used in traffic manager.
 
namespace  carla::traffic_manager
 
namespace  carla::traffic_manager::PID
 

Functions

float carla::traffic_manager::PID::RelativeVelocityDeviation (const float reference_velocity, const float vehicle_speed, const float target_velocity)
 The target is exactly zero behind a stopped vehicle; the floor avoids a 0/0 NaN that the derivative term would turn into a NaN steering command.
 
ActuationSignal carla::traffic_manager::PID::RunStep (StateEntry present_state, StateEntry previous_state, const std::vector< float > &longitudinal_parameters, const std::vector< float > &lateral_parameters, const float vehicle_speed, const float control_dt=DT, const float lateral_pursuit_steer=0.0f, const float lateral_damping_scale=1.0f, const float steer_authority_correction=1.0f)
 This function calculates the actuation signals based on the resent state change of the vehicle to minimize PID error.
 
float carla::traffic_manager::PID::ShapeReferenceVelocity (const float previous_reference, const float vehicle_speed, const float target_velocity, const float control_dt, const bool emergency_stop)
 Reference speed that closes on target_velocity at COMFORT_ACCELERATION instead of stepping to it.
 
void carla::traffic_manager::PID::SmoothActuation (const StateEntry &previous_state, const float control_dt, const float vehicle_speed, ActuationSignal &actuation_signal)
 A zero pedal demand bypasses the deadband, so pedals rest exactly at zero and nothing here delays a deceleration.