apollo icon indicating copy to clipboard operation
apollo copied to clipboard

fem_pos_deviation_sqp_osqp_interface计算曲率违反约束代码计算 ,尝试进行了修改到符合公式与逻辑

Open floodsource opened this issue 1 year ago • 0 comments

Describe the bug file : apollo/modules/planning/planning_base/math/discretized_points_smoothing/fem_pos_deviation_sqp_osqp_interface.cc 部分代码与公式推导不符,导致fem_sqp 外环曲率判断条件不符合逻辑

546 row: double cviolation = curvature_constraint_sqr - (-2.0 * x_m + x_f + x_l) * (-2.0 * x_m + x_f + x_l) + (-2.0 * y_m + y_f + y_l) * (-2.0 * y_m + y_f + y_l); 这部分计算完之后在 195 row 判断逻辑有问题,若求解的轨迹符合曲率约束,不一定能够跳出

我认为应该改为 double cviolation = (-2.0 * x_m + x_f + x_l) * (-2.0 * x_m + x_f + x_l) + (-2.0 * y_m + y_f + y_l) * (-2.0 * y_m + y_f + y_l) - curvature_constraint_sqr ;

测试了几次 修改之后求解成功率提高 曲率约束限制符合逻辑

floodsource avatar Jan 18 '24 09:01 floodsource