Conversation
Copies SignedDistance2d.{hpp,cpp}, Utils.hpp, and PixelBorderDistance.hpp
verbatim from master, where they were introduced by 91ba880, and adds the
new translation unit to grid_map_sdf's add_library list.
No behavioral changes to existing code. Pure additions; only external
symbol referenced by the new files is grid_map_core/TypeDefs.hpp, already
a dep of grid_map_sdf.
Utils.hpp uses std::numeric_limits without including <limits>, relying on it arriving transitively. The four SignedDistance2d files were backported from master, which is formatted to a different standard than the kilted release branch, so cpplint and uncrustify rejected them. Reformat with the ament config this package already tests against, and move the over-long trailing comments onto their own lines. (cherry picked from commit 3b56b13)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Backports the 2D-from-occupancy SDF helpers (
grid_map::signed_distance_field::signedDistanceFromOccupancy) frommasterontokilted.The four files are copied verbatim from
master, where they were introduced by 91ba880:grid_map_sdf/include/grid_map_sdf/SignedDistance2d.hppgrid_map_sdf/include/grid_map_sdf/Utils.hppgrid_map_sdf/include/grid_map_sdf/PixelBorderDistance.hppgrid_map_sdf/src/SignedDistance2d.cppgrid_map_sdf/CMakeLists.txtis updated to add the new translation unit toadd_library.Motivation
signedDistanceFromOccupancyonly exists onmaster. Downstream consumers on thekilteddistro need it to compute a 2D SDF from abooloccupancy grid. The headers' only external symbol isgrid_map_core/TypeDefs.hpp, which is already agrid_map_sdfdependency, so no new transitive deps are introduced.Companion PR
A matching backport against
rollingis filed separately: see #536 (rolling).Build verification
Built clean against
kiltedin a downstream ROS 2 workspace;grid_map_sdf(and the rest of thegrid_mapgraph) compiles andsignedDistanceFromOccupancyis callable from consumer code.Notes for maintainers
testSignedDistance2d.cppif it compiles cleanly under this branch's CMakeLists; let me know if you'd like it included.