-
Notifications
You must be signed in to change notification settings - Fork 679
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(autoware_probabilistic_occupancy_grid_map): cuda accelerated imp…
…lementation (#9542) * feat: implemented a cuda accelerated ogm Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]> * chore: fixed cspells Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]> * chore: unused header and variable names Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]> * chore: cspell fixes Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]> * chore: cppcheck fix attempt Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]> * fix: attempting to fix ci/cd regarding the cuda library Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]> * chore: fixed the order of the cuda check in the cmakelist Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]> * fix: removed cuda as a required dep for cpu only builds Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]> * fix: missing cuda linking (?) Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]> * feat: fixed single mode, added streams, and added the restrict keyword Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]> * chore: replaced a potential indetermination using an epsilon Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]> * Update perception/autoware_probabilistic_occupancy_grid_map/lib/updater/log_odds_bayes_filter_updater_kernel.cu Co-authored-by: Yoshi Ri <[email protected]> * Update perception/autoware_probabilistic_occupancy_grid_map/lib/updater/log_odds_bayes_filter_updater_kernel.cu Co-authored-by: Yoshi Ri <[email protected]> * style(pre-commit): autofix * chore: added bound checkings in the update origin kernel Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]> * chore: disabled tests since universe does not support cuda in ci/cd Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]> * chore: added me as a maintainer Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]> * fix: missedn the end in the cmake Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]> * chore: moved the boudnary checks to only the cuda version since the cpu version uses the upstream logic Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]> --------- Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]> Co-authored-by: Yoshi Ri <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
874dbdd
commit 165be35
Showing
33 changed files
with
2,288 additions
and
901 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
.../autoware/probabilistic_occupancy_grid_map/costmap_2d/occupancy_grid_map_fixed_kernel.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// Copyright 2021 Tier IV, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#ifndef AUTOWARE__PROBABILISTIC_OCCUPANCY_GRID_MAP__COSTMAP_2D__OCCUPANCY_GRID_MAP_FIXED_KERNEL_HPP_ | ||
#define AUTOWARE__PROBABILISTIC_OCCUPANCY_GRID_MAP__COSTMAP_2D__OCCUPANCY_GRID_MAP_FIXED_KERNEL_HPP_ | ||
|
||
#include "autoware/probabilistic_occupancy_grid_map/utils/utils_kernel.hpp" | ||
|
||
#include <Eigen/Core> | ||
|
||
#include <cstdint> | ||
|
||
namespace autoware::occupancy_grid_map | ||
{ | ||
namespace costmap_2d::map_fixed | ||
{ | ||
|
||
void prepareTensorLaunch( | ||
const float * input_pointcloud, const std::size_t num_points, const std::size_t points_step, | ||
const std::size_t angle_bins, const std::size_t range_bins, const float min_height, | ||
const float max_height, const float min_angle, const float angle_increment_inv, | ||
const float range_resolution_inv, const Eigen::Matrix3f * rotation_map, | ||
const Eigen::Vector3f * translation_map, const Eigen::Matrix3f * rotation_scan, | ||
const Eigen::Vector3f * translation_scan, std::uint64_t * points_tensor, cudaStream_t stream); | ||
|
||
void fillEmptySpaceLaunch( | ||
const std::uint64_t * points_tensor, const std::size_t angle_bins, const std::size_t range_bins, | ||
const float map_resolution_inv, const float scan_origin_x, const float scan_origin_y, | ||
const float map_origin_x, const float map_origin_y, const int num_cells_x, const int num_cells_y, | ||
std::uint8_t empty_value, std::uint8_t * costmap_tensor, cudaStream_t stream); | ||
|
||
void fillUnknownSpaceLaunch( | ||
const std::uint64_t * raw_points_tensor, const std::uint64_t * obstacle_points_tensor, | ||
const float distance_margin, const std::size_t angle_bins, const std::size_t range_bins, | ||
const float map_resolution_inv, const float scan_origin_x, const float scan_origin_y, | ||
const float map_origin_x, const float map_origin_y, const int num_cells_x, const int num_cells_y, | ||
std::uint8_t free_space_value, std::uint8_t no_information_value, std::uint8_t * costmap_tensor, | ||
cudaStream_t stream); | ||
|
||
void fillObstaclesLaunch( | ||
const std::uint64_t * points_tensor, const float distance_margin, const std::size_t angle_bins, | ||
const std::size_t range_bins, const float map_resolution_inv, const float map_origin_x, | ||
const float map_origin_y, const int num_cells_x, const int num_cells_y, | ||
std::uint8_t obstacle_value, std::uint8_t * costmap_tensor, cudaStream_t stream); | ||
|
||
} // namespace costmap_2d::map_fixed | ||
} // namespace autoware::occupancy_grid_map | ||
|
||
#endif // AUTOWARE__PROBABILISTIC_OCCUPANCY_GRID_MAP__COSTMAP_2D__OCCUPANCY_GRID_MAP_FIXED_KERNEL_HPP_ |
Oops, something went wrong.