refactor(depth): keep DepthCameraObstacleLayer, drop the legacy depth clearing
Two depth-image clearing designs lived in this package: the frustum ray
clearing inherited from dev_cam_intel (DepthCameraData sources of
ObstacleLayer/VoxelLayer, frustum_* and column_* keys) and the observed_volume
evidence clearing (ROC) on top of it. Both are replaced on the robot by
DepthCameraObstacleLayer, a port of costmap_depth_camera that takes the
filtered PointCloud2 directly, so both are removed and the tree is rebuilt
from main (a63c084) plus the plugin.
- observation.h / observation_buffer: DepthFrustumConfig, DepthCameraObservation
and the depth buffering API are gone; buffers hold point clouds only.
- ObstacleLayer/VoxelLayer: no frustum ray casting, column clearing or depth
ray cache. A DepthCameraData source or frustum_clearing_enabled: true now
fails at startup with a message pointing to DepthCameraObstacleLayer
instead of silently dropping the camera; DepthCameraData reaching the layer
through the gateway is ignored.
- copyParentParameters no longer forwards the frustum_* / column_* keys.
- ROC files (depth_evidence_store, depth_visibility, depth_frame_pairer) and
their tests are not carried over; CloudProcessingConfig goes with them.
- PCL is needed by the plugin library only. The plugin test moves under
BUILD_COSTMAP_TESTS; BUILD_DEPTH_MARKING_TESTS is gone.
- README documents DepthCameraObstacleLayer and its known limits.
The plugin code is unchanged from the version running on the KIT robot.
This commit is contained in:
@@ -23,7 +23,8 @@ find_package(Boost REQUIRED COMPONENTS system thread filesystem)
|
||||
# still configure. The test block below requires it where it is actually used.
|
||||
find_package(GTest QUIET)
|
||||
find_package(yaml-cpp REQUIRED)
|
||||
# kdtree/search/segmentation: DepthCameraObstacleLayer (kd-tree clearing, Euclidean clustering).
|
||||
# DepthCameraObstacleLayer only (voxel grid, kd-tree clearing, Euclidean clustering); the core
|
||||
# library and the other layers do not use PCL.
|
||||
find_package(PCL REQUIRED COMPONENTS common filters kdtree search segmentation)
|
||||
|
||||
if (NOT BUILDING_WITH_CATKIN)
|
||||
@@ -109,17 +110,12 @@ add_library(robot_costmap_2d SHARED
|
||||
src/array_parser.cpp
|
||||
src/costmap_2d.cpp
|
||||
src/observation_buffer.cpp
|
||||
src/depth_visibility.cpp
|
||||
src/depth_evidence_store.cpp
|
||||
src/layer.cpp
|
||||
src/layered_costmap.cpp
|
||||
src/costmap_math.cpp
|
||||
src/footprint.cpp
|
||||
src/costmap_layer.cpp
|
||||
)
|
||||
target_include_directories(robot_costmap_2d SYSTEM PRIVATE ${PCL_INCLUDE_DIRS})
|
||||
target_compile_options(robot_costmap_2d PRIVATE ${PCL_DEFINITIONS})
|
||||
target_link_libraries(robot_costmap_2d PRIVATE ${PCL_LIBRARIES})
|
||||
|
||||
if(BUILDING_WITH_CATKIN)
|
||||
add_dependencies(robot_costmap_2d ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
|
||||
@@ -184,7 +180,7 @@ add_library(plugins SHARED
|
||||
plugins/unpreferred_layer.cpp
|
||||
plugins/depth_camera_obstacle_layer.cpp
|
||||
)
|
||||
# PCL stays private to the plugin library, like robot_costmap_2d: no PCL type in public headers.
|
||||
# PCL stays private to the plugin library: no PCL type in public headers.
|
||||
target_include_directories(plugins SYSTEM PRIVATE ${PCL_INCLUDE_DIRS})
|
||||
target_compile_options(plugins PRIVATE ${PCL_DEFINITIONS})
|
||||
target_link_libraries(plugins PRIVATE ${PCL_LIBRARIES})
|
||||
@@ -293,25 +289,6 @@ endif()
|
||||
option(BUILD_COSTMAP_TESTS "Build robot_costmap_2d test executables"
|
||||
${BUILDING_WITH_CATKIN})
|
||||
|
||||
option(BUILD_DEPTH_MARKING_TESTS "Build depth observation buffer regression tests" OFF)
|
||||
if(BUILD_DEPTH_MARKING_TESTS)
|
||||
find_package(GTest REQUIRED)
|
||||
add_executable(depth_observation_buffer_test test/depth_observation_buffer_test.cpp)
|
||||
target_compile_definitions(depth_observation_buffer_test PRIVATE
|
||||
DEPTH_MARKING_TEST_PLUGIN_PATH="$<TARGET_FILE:plugins>")
|
||||
target_link_libraries(depth_observation_buffer_test PRIVATE
|
||||
plugins robot_costmap_2d GTest::GTest GTest::Main)
|
||||
add_executable(depth_visibility_test test/depth_visibility_test.cpp)
|
||||
target_link_libraries(depth_visibility_test PRIVATE
|
||||
plugins robot_costmap_2d GTest::GTest GTest::Main)
|
||||
add_executable(depth_evidence_store_test test/depth_evidence_store_test.cpp)
|
||||
target_link_libraries(depth_evidence_store_test PRIVATE
|
||||
robot_costmap_2d GTest::GTest GTest::Main)
|
||||
add_executable(depth_camera_obstacle_layer_test test/depth_camera_obstacle_layer_test.cpp)
|
||||
target_link_libraries(depth_camera_obstacle_layer_test PRIVATE
|
||||
plugins robot_costmap_2d GTest::GTest GTest::Main)
|
||||
endif()
|
||||
|
||||
if(BUILD_COSTMAP_TESTS)
|
||||
find_package(GTest REQUIRED)
|
||||
find_package(Boost REQUIRED COMPONENTS system thread filesystem)
|
||||
@@ -354,4 +331,14 @@ if(BUILD_COSTMAP_TESTS)
|
||||
${TF3_LIBRARY}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/test/depth_camera_obstacle_layer_test.cpp)
|
||||
add_executable(depth_camera_obstacle_layer_test test/depth_camera_obstacle_layer_test.cpp)
|
||||
target_link_libraries(depth_camera_obstacle_layer_test PRIVATE
|
||||
plugins
|
||||
robot_costmap_2d
|
||||
GTest::GTest
|
||||
GTest::Main
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user