commit for push

This commit is contained in:
CaiXiang
2025-11-17 09:13:16 +08:00
parent 240b45c8b0
commit b0c4d5c475
6 changed files with 661 additions and 1 deletions

14
src/path_curve_fix.txt Normal file
View File

@@ -0,0 +1,14 @@
} else if (path_points_.size() > 2) {
// 中间点
double dx = path_points_[i + 1].x - path_points_[i - 1].x;
double dy = path_points_[i + 1].y - path_points_[i - 1].y;
path_points_[i].theta = std::atan2(dy, dx);
// 计算曲率(使用三点法)
if (i > 0 && i < path_points_.size() - 1) {
path_points_[i].kappa = computeCurvature(
path_points_[i - 1], path_points_[i], path_points_[i + 1]);
}
}
// 单点情况保持原有的theta和kappa值通常为0
// 不需要额外计算,避免越界访问