Skip to content

Commit

Permalink
fix(autoware_freespace_planning_algorithms): fix bugprone-errors (#9670)
Browse files Browse the repository at this point in the history
* fix: bugprone-error

Signed-off-by: kobayu858 <[email protected]>

* fix: bugprone-error

Signed-off-by: kobayu858 <[email protected]>

---------

Signed-off-by: kobayu858 <[email protected]>
  • Loading branch information
kobayu858 authored Dec 20, 2024
1 parent 0b2bbe8 commit a88e90e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ void AbstractPlanningAlgorithm::setMap(const nav_msgs::msg::OccupancyGrid & cost
std::vector<bool> is_obstacle_table;
is_obstacle_table.resize(nb_of_cells);
for (uint32_t i = 0; i < nb_of_cells; ++i) {
const int cost = costmap_.data[i];
const int cost = costmap_.data[i]; // NOLINT
if (cost < 0 || planner_common_param_.obstacle_threshold <= cost) {
is_obstacle_table[i] = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ double AstarSearch::getExpansionDistance(const AstarNode & current_node) const
double AstarSearch::getSteeringCost(const int steering_index) const
{
return planner_common_param_.curve_weight *
(abs(steering_index) / planner_common_param_.turning_steps);
(static_cast<double>(abs(steering_index)) / planner_common_param_.turning_steps);
}

double AstarSearch::getSteeringChangeCost(
Expand Down

0 comments on commit a88e90e

Please sign in to comment.