-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #240 from Ericsii/feat/grid_map
Add grid_map and its dependencies
- Loading branch information
Showing
4 changed files
with
25 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
diff --git a/include/grid_map_cv/GridMapCvConverter.hpp b/include/grid_map_cv/GridMapCvConverter.hpp | ||
index 233c28a..6f785ba 100644 | ||
--- a/include/grid_map_cv/GridMapCvConverter.hpp | ||
+++ b/include/grid_map_cv/GridMapCvConverter.hpp | ||
@@ -262,8 +262,10 @@ public: | ||
imageIndex(0), | ||
imageIndex(1))[++channel] = imageValue; | ||
} | ||
- if (hasAlpha) { | ||
- image.at<cv::Vec<Type_, NChannels_>>(imageIndex(0), imageIndex(1))[++channel] = imageMax; | ||
+ if constexpr (NChannels_ >= 4) { | ||
+ if (hasAlpha) { | ||
+ image.at<cv::Vec<Type_, NChannels_>>(imageIndex(0), imageIndex(1))[++channel] = imageMax; | ||
+ } | ||
} | ||
} | ||
} |
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