Struct ControlState

Struct Documentation

struct ControlState

Stato runtime e componenti di controllo.

Public Members

bool pose_obtained = true

Whether the current speed has been obtained.

bool start_control = false

Whether the control loop should start.

bool mission_correct = false

Flag to allow control commands.

int watchdog_count = 0

Counter for watchdog initialization.

int mission = 0

Current mission number.

int last_nearest_index = 0

Last nearest index in the raceline.

float steer_error_yaw_ = 0.0

Yaw error from steering controller.

float steer_error_cte_ = 0.0

Cross-track error from steering controller.

float setpoint_look_ahead_x_ = 0.0

Look-ahead setpoint X.

float setpoint_look_ahead_y_ = 0.0

Look-ahead setpoint Y.

float torque_error_speed_ = 0.0

Speed error from torque controller.

float torque_error_integral_ = 0.0

Integral error from torque controller.

float torque_term_p_ = 0.0

Proportional term from torque controller.

float torque_term_i_ = 0.0

Integral term from torque controller.

SteeringController steering_controller

PD steering controller.

FeedForwardAction feedforward_action

Feedforward action for steering.

TorqueController torque_controller

Torque controller for speed control.

std::vector<float> raceline_s

Arc length along the raceline.

std::vector<float> raceline_x

X coordinates of the raceline.

std::vector<float> raceline_y

Y coordinates of the raceline.

std::vector<float> raceline_velocity

Velocity along the raceline.

geometry_msgs::msg::Pose current_pose

Current pose of the vehicle.

geometry_msgs::msg::Pose odom_pose

Current odometry pose of the vehicle.

float current_speed = 0.0

Current speed of the vehicle (m/s).

float old_steer_angle = 0.0

Previous steering angle for control loop.

LapPerformance lap_performance

Object for measuring lap performance.

vcu_msgs::msg::Control drive