97 [[nodiscard]]
const std::vector<SplineMotionTelemetry>&
getTelemetry()
const {
return telemetry_; }
103 [[nodiscard]]
double targetHeadingAt(
double s)
const;
106 std::unique_ptr<CatmullRomSpline> spline_;
107 double max_velocity_{0.0};
108 ProfiledPIDController profiled_pid_;
109 std::unique_ptr<foundation::PidController> heading_pid_;
110 bool finished_{
false};
113 Eigen::Vector2d initial_position_m_{Eigen::Vector2d::Zero()};
114 double initial_absolute_heading_rad_{0.0};
117 std::vector<double> heading_arc_lengths_;
118 std::vector<double> all_headings_;
119 bool use_explicit_headings_{
false};
123 bool reverse_{
false};
124 bool hold_heading_{
false};
125 bool rear_first_{
false};
128 double s_measured_{0.0};
131 double prev_s_measured_{0.0};
132 double filtered_velocity_{0.0};
133 static constexpr double kVelocityFilterAlpha{0.3};
134 static constexpr double kSettlingVelocity{0.02};
137 int at_goal_cycles_{0};
138 static constexpr int kAtGoalSettleCycles{30};
141 double speed_scale_{1.0};
142 double heading_scale_{1.0};
143 int unsaturated_cycles_{0};
147 bool off_path_warned_{
false};
148 static constexpr double kOffPathThreshold{0.15};
151 double elapsed_time_{0.0};
152 std::vector<SplineMotionTelemetry> telemetry_;