This is a ROS node for object detection and segmentation from 2D image to 3D point cloud. The detection is based on YOLO-v2. The segmentation is based on SegmenterLight.
The RGBD camera is Astra of ORBBEC and the ROS SDK is supposed to be installed first.
Note that more details about the instructions and the code of ROS-YOLO can be found here. Sorry for the confusion.
Download the the pretrained model from YOLO-v2 under the path ./darknet
and ./data
.
Change the path on line 231 in the file image.c
in ./darknet/src
to your own path.
Replace all XXX/catkin_ws
path in the file ros_yolo_test.cpp
and test_detector.h
with your own ROS workspace path.
Compile the darknet module.
cd darknet
make
Run the following commands to compile and install. Change the topic name to registered_cloud
on line 244 in pcl_create.cpp
.
cd SegmenterLight
mkdir build
cd build
cmake ..
make
sudo make install
Compile the ros_yolo
node and ros_seg
node: catkin_make
.
roscore
Run Astra ROS SDK.
roslaunch astra_launch astra.launch
Run the YOLO node.
rosrun ros_yolo ros_yolo_test
Check the published YOLO message.
rostopic echo /yolo_ret
Register the point cloud to image and create the segmented object point cloud.
rosrun ros_seg registered
rosrun ros_seg pcl_create