question about piecewise jerk problem
Why should the maximum steering angle rate be divided by an additional 2 when calculating the dddx bound? Is it for safety margin considerations? Why should dddx be multiplied by an additional delta_s when placed in the boundary matrix?
const double max_yaw_rate =
veh_param.max_steer_angle_rate() / veh_param.steer_ratio() / 2.0;
const double jerk_bound = EstimateJerkBoundary(
std::fmax(init_state.first[1], 1.0), axis_distance, max_yaw_rate);
for (int i = 0; i + 1 < n; ++i) {
variables[2 * n + i].emplace_back(constraint_index, -1.0);
variables[2 * n + i + 1].emplace_back(constraint_index, 1.0);
lower_bounds->at(constraint_index) =
dddx_bound_.first * delta_s_ * scale_factor_[2];
upper_bounds->at(constraint_index) =
dddx_bound_.second * delta_s_ * scale_factor_[2];
++constraint_index;
}
- jerk_bound calculation has changed in Apollo 9.0
double PathOptimizerUtil::EstimateJerkBoundary(const double vehicle_speed) {
const auto& veh_param =
common::VehicleConfigHelper::GetConfig().vehicle_param();
const double axis_distance = veh_param.wheel_base();
const double max_yaw_rate =
veh_param.max_steer_angle_rate() / veh_param.steer_ratio();
return max_yaw_rate / axis_distance / vehicle_speed;
}
- The state is $X=(x, x^{'}, x^{''})$ in the QP problem. So how to apply dddx_bound to X? Use the implicit formula $x_{n->n+1}^{'''}=(x_{n+1}^{''}-x_{n}^{''})/{\Delta}t$, which introduces a delta_s multiplying dddx_bound.
2. problem
thank you my friend, but i still confused about the second question. Isn't the delta_t already included by vehicle_speed? $$\frac{d^3l}{ds^3}=\frac{d\frac{d^2l}{ds^2}}{dt}\cdot\frac{dt}{ds}$$ $$\frac{d^2l}{ds^2}\approx\kappa-\kappa_{ref}=\frac{tan(\alpha)}{L}-\kappa_{ref}\approx\frac{\alpha}{L}-\kappa_{ref}$$ $$\frac{d^3l}{ds^3}=\frac{\alpha'}{Lv}<\frac{\alpha'_{max}}{Lv}$$
The variable delta_t is unrelated to delta_s. Below is the discretized formula incorporating a delta_s into the jerk bound: $$l_{n}^{'''}=\frac{l_{n}^{''}-l_{n-1}^{''}}{\Delta s}<\frac{\alpha_{max}^{'}}{Lv}$$ It should be noted that the jerk bound is applied to $l^{''}$, indicating that the actual bound set in the piecewise jerk problem corresponds to the right-hand side of the inequality presented below: $$l_{n}^{''}-l_{n-1}^{''}<\Delta s\frac{\alpha_{max}^{'}}{Lv}$$
The variable delta_t is unrelated to delta_s. Below is the discretized formula incorporating a delta_s into the jerk bound: ln‴=ln″−ln−1″Δs<αmax′Lv It should be noted that the jerk bound is applied to l″, indicating that the actual bound set in the piecewise jerk problem corresponds to the right-hand side of the inequality presented below: ln″−ln−1″<Δsαmax′Lv
OMG, you are so niubi. Thank you my friend, it really helps. Can I add your wechat to chat chat.