Skip to content

Commit

Permalink
fix(planning): del redundant add for cost (#15317)
Browse files Browse the repository at this point in the history
  • Loading branch information
daohu527 committed Mar 1, 2024
1 parent 43922a0 commit e373b20
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ bool ReedShepp::ShortestRSP(const std::shared_ptr<Node3d> start_node,
}

if (j > 0 && path.segs_lengths[j] * path.segs_lengths[j - 1] < 0) {
cost += cost + traj_gear_switch_penalty_;
cost += traj_gear_switch_penalty_;
}
if (j == 0 && start_dire * path.segs_lengths[j] < 0) {
cost += cost + traj_gear_switch_penalty_;
cost += traj_gear_switch_penalty_;
}
}
if (cost < min_cost) {
Expand Down

0 comments on commit e373b20

Please sign in to comment.