ROS wrapper for CUDA Visual Library by RPG.
Tested with ROS melodic with custom OpenCV installation. (3.4.10)
The following packages are required for the vilib_ros wrapper.
Ensure that the CUDA toolkit has been installed: https://developer.nvidia.com/cuda-toolkit
The library could be found here, follow the installation steps to install the library.
- vision_opencv:
$ sudo apt install ros-melodic-vision-opencv
- image pipeline:
$ sudo apt install ros-melodic-image-pipeline
There are 2 nodes for this package, which are:
- vilib_ros_node: FAST corner detection via the vilib FAST library
- vilib_ros_tracker: Lucas - Kanade Feature Tracking via the vilib FAST library
vilib_ros_node
Input image from camera.
FAST feature keypoints detected from the image.
Image overlayed with detected keypoints.
vilib_ros_tracker
Input image from camera.
Track points detected from the image.
Image overlayed with detected tracking points.
A custom msg type is used to publish the various feature keypoints in the /fast_pts
topic. The structure is as follows:
time stamp: The timestamp when the topic is published.
geometry_msgs/Point[] points: The FAST features detected, stored as an array of geometry_msgs/Point.
int32 size: The number of points detcted in the current frame.
Note: The z parameter of the geometry_msgs/Point in
vilib_ros_node
is not used, whereas the z parameter of the geometry_msgs/Point invilib_ros_tracker
is used as the tracking point ID.
This wrapper supports dynamic reconfiguration of the various parameters for the nodes! Launch rqt_reconfigure
and adjust the parameters accordingly.
$ rosrun rqt_reconfigure rqt_reconfigure
- PYRAMID_LEVELS: Pyramid level
- FAST_EPSILON: Threshold for feature detection
- FAST_MIN_ARC_LENGTH: Threshold for feature detection
- FAST_SCORE: FAST_SCORE Setter (Sum of absolute differences/Maximum threshold value)
- HORIZONTAL_BORDER: Horizontal image detection padding
- VERTICAL_BORDER: Vertical image detection padding
- CELL_SIZE_WIDTH: NMS cell width
- CELL_SIZE_HEIGHT: NMS cell height
- FRAME_IMAGE_PYRAMID_LEVELS: Image pre-processing pyramid level
- FEATURE_DETECTOR_CELL_SIZE_WIDTH: NMS cell width
- FEATURE_DETECTOR_CELL_SIZE_HEIGHT{32}: NMS cell height
- FEATURE_DETECTOR_MIN_LEVEL: Image pre-processing pyramid level (Minimum)
- FEATURE_DETECTOR_MAX_LEVEL: Image pre-processing pyramid level (Maximum)
- FEATURE_DETECTOR_HORIZONTAL_BORDER: Horizontal image detection padding
- FEATURE_DETECTOR_VERTICAL_BORDER: Vertical image detection padding
- FEATURE_DETECTOR_FAST_EPISLON: Threshold for feature detection
- FEATURE_DETECTOR_FAST_ARC_LENGTH: FAST arc length
- FEATURE_DETECTOR_FAST_SCORE: FAST_SCORE Setter (Sum of absolute differences/Maximum threshold value)
- If there is compilaion issue of cv_bridge caused by the being unable to locate the OpenCV path, the cv_bridge cmake have to be updated to point to the new path. For example, updating the path
if(NOT "include;/usr/include;/usr/include/opencv" STREQUAL " ")
set(cv_bridge_INCLUDE_DIRS "")
set(_include_dirs "include;/usr/include;/usr/include/opencv")
to
if(NOT "include;/usr/local;/usr/local/opencv/include" STREQUAL " ")
set(cv_bridge_INCLUDE_DIRS "")
set(_include_dirs "include;/usr/local/opencv/include;/usr/local/opencv/include/opencv2")
Licensed under the MIT License.