Class SpeedProfileGenerator
Defined in File speed_profile_generator.hpp
Nested Relationships
Nested Types
Inheritance Relationships
Base Type
public SpeedGenerator(Class SpeedGenerator)
Class Documentation
-
class SpeedProfileGenerator : public SpeedGenerator
Online preventive speed profile for raceline following.
Implements a simplified online two-pass speed profile:
Forward scan (get_preview_curvature): scans the raceline ahead to find the worst upcoming curvature within a speed-scaled preview window.
Rate limiter (target_speed_calc): enforces max acceleration/deceleration per control cycle, approximating the backward pass of a full two-pass profile.
All tunable parameters are held in DummyControllerParameters and exposed via YAML.
Public Functions
-
SpeedProfileGenerator(control_structs::NodeConfig &config, control_structs::ControlState &state, control_structs::DummyControllerParameters &dummy, control_structs::SpeedProfileParameters &speed_params)
-
virtual float generate(int nearest_index)
Compute the target speed for this control cycle.
- Parameters:
nearest_index – Nearest raceline index to the car (generate by the caller).
preview_k_out – Curvature value used this cycle (for logging).
- Returns:
Rate-limited target speed [m/s].
-
virtual float get_preview_k_()