Skip to content

Commit

Permalink
Planning: reeds_shepp_path GenerateLocalConfigurations fix
Browse files Browse the repository at this point in the history
修复当segs_lengths元素值为0时生成结果错误的问题

Fixes #15135
  • Loading branch information
Aglargil committed Sep 14, 2023
1 parent a3c851f commit 5059649
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,11 @@ bool ReedShepp::SetRSP(const int size, const double* lengths, const char* types,
bool ReedShepp::GenerateLocalConfigurations(
const std::shared_ptr<Node3d> start_node,
const std::shared_ptr<Node3d> end_node, ReedSheppPath* shortest_path) {
for (size_t i = 0; i < shortest_path->segs_lengths.size(); ++i) {
if (shortest_path->segs_lengths.at(i) == 0) {
shortest_path->segs_lengths.at(i) = 0.0001;
}
}
double step_scaled =
planner_open_space_config_.warm_start_config().step_size() * max_kappa_;

Expand Down

0 comments on commit 5059649

Please sign in to comment.