Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use hwcv package to accelerate stereo block matcher #2

Open
wants to merge 3 commits into
base: ros2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion image_proc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ endif() # ROS_VITIS
# image_proc kernel, all kernels smashed into a single xclbin
#
if(ROS_ACCELERATION)
if (DEFINED ROS_VITIS)
if (DEFINED ROS_VITIS AND NOT NO_IMAGE_PROC_KERNEL)
#####################
# Synth
#####################
Expand Down
4 changes: 4 additions & 0 deletions stereo_image_proc/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Forthcoming
-----------
* Add HWCV accelerated Block-matcher support usage in stereo_image_proc

2.2.1 (2020-08-27)
------------------
* remove email blasts from steve macenski (`#596 <https://github.com/ros-perception/image_pipeline/issues/596>`_)
Expand Down
42 changes: 17 additions & 25 deletions stereo_image_proc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,23 @@ find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()

find_package(OpenCV REQUIRED)
find_package(hwcv REQUIRED)

# See note in image_proc/CMakeLists.txt
# add_definitions(-DOPENCV_TRAITS_ENABLE_DEPRECATED)

ament_auto_add_library(${PROJECT_NAME} SHARED
src/${PROJECT_NAME}/stereo_processor.cpp
ament_auto_add_library(
${PROJECT_NAME} SHARED src/${PROJECT_NAME}/stereo_processor.cpp
src/${PROJECT_NAME}/disparity_node.cpp
src/${PROJECT_NAME}/point_cloud_node.cpp
)
target_link_libraries(${PROJECT_NAME}
${OpenCV_LIBRARIES}
)
src/${PROJECT_NAME}/point_cloud_node.cpp)
target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBRARIES} hwcv::hwcv)

rclcpp_components_register_node(${PROJECT_NAME}
PLUGIN "stereo_image_proc::DisparityNode"
EXECUTABLE disparity_node
)
rclcpp_components_register_node(${PROJECT_NAME}
PLUGIN "stereo_image_proc::PointCloudNode"
EXECUTABLE point_cloud_node
)
rclcpp_components_register_node(
${PROJECT_NAME} PLUGIN "stereo_image_proc::DisparityNode" EXECUTABLE
disparity_node)
rclcpp_components_register_node(
${PROJECT_NAME} PLUGIN "stereo_image_proc::PointCloudNode" EXECUTABLE
point_cloud_node)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
Expand All @@ -45,21 +41,17 @@ if(BUILD_TESTING)
endif()

# Test DisparityNode in launch test
add_launch_test("test/test_disparity_node.py"
PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}"
)
add_launch_test("test/test_disparity_node.py" PYTHON_EXECUTABLE
"${PYTHON_EXECUTABLE}")
# TODO(jacobperron): As of Eloquent, they're just plain pytests
# ament_add_pytest_test("test_disparity_node" test/test_disparity_node.py
# PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}"
# )
# PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}" )

# Test PointCloudNode in launch test
add_launch_test("test/test_point_cloud_node.py"
PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}"
)
add_launch_test("test/test_point_cloud_node.py" PYTHON_EXECUTABLE
"${PYTHON_EXECUTABLE}")
# ament_add_pytest_test("test_point_cloud_node" test/test_point_cloud_node.py
# PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}"
# )
# PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}" )

set(PYTHON_EXECUTABLE "${_PYTHON_EXECUTABLE}")
endif()
Expand Down
Empty file removed stereo_image_proc/COLCON_IGNORE
Empty file.
Loading