Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
pid_steering_motor.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <rclcpp/rclcpp.hpp>
4
6
8private:
9 double integral_ = 0.0; // Integral term accumulator
10 double previous_error_ = 0.0; // Previous error for derivative calculation
11 rclcpp::Time last_update = rclcpp::Time(0, 0);
12
13public:
16
24 double compute_steering_rate(double current_steering, double steering_goal) override;
25};
double compute_steering_rate(double current_steering, double steering_goal) override
Computes the change in steering angle based on PID control.
PIDSteeringMotor(const common_lib::car_parameters::CarParameters &car_parameters)