Function speed_steer_and_fov
- Defined in File simple_speed.hpp 
Function Documentation
- 
float speed_steer_and_fov(float steering_angle, std::vector<float> ranges, float max_steering, float max_speed, float min_speed, float brake_gain, float speed_distance_gain, float front_deg, float angle_increment)
- Calculates the speed of a vehicle based on steering angle and LIDAR front ranges. - This function computes the speed by considering the steering angle and adjusting it based on the LIDAR ranges within a specified field of view (FOV). The speed is influenced by the distance to obstacles (from LIDAR data), a braking gain, and a speed-distance gain. - Parameters:
- steering_angle – The current steering angle of the vehicle. 
- ranges – A vector of float values representing the distances measured by the LIDAR sensor. 
- max_steering – The maximum steering angle the vehicle can achieve. 
- max_speed – The maximum speed the vehicle can achieve. 
- min_speed – The minimum speed the vehicle can achieve. 
- brake_gain – A gain factor that influences the braking effect based on obstacle distance. 
- speed_distance_gain – A gain factor that influences the speed based on obstacle distance. 
- front_deg – The field of view in degrees to consider in front of the vehicle [deg]. 
- angle_increment – The angular resolution of the LIDAR sensor [rad]. 
 
- Returns:
- The calculated speed of the vehicle.