Skip to content

Commit

Permalink
add get_index_to_table func to occupancy_grid_utils
Browse files Browse the repository at this point in the history
Signed-off-by: Autumn60 <[email protected]>
  • Loading branch information
Autumn60 committed Aug 25, 2024
1 parent c9dcf9c commit 565de82
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,17 @@ tier4_autoware_utils::Point2d index_to_point(
index_y * parameters->resolution() - parameters->width_2()};
}

std::vector<tier4_autoware_utils::Point2d> get_index_to_point_table(
const OccupancyGridParameters::SharedPtr parameters)
{
std::vector<tier4_autoware_utils::Point2d> table;
table.reserve(parameters->grid_num());
for (int i = 0; i < parameters->grid_num(); ++i) {
table.push_back(index_to_point(parameters, i));
}
return table;
}

} // namespace booars_utils::nav::occupancy_grid_utils

#endif // BOOARS_UTILS__NAV__OCCUPANCY_GRID_UTILS_HPP_

0 comments on commit 565de82

Please sign in to comment.