A version for monitoring whether a camera detects ball or not, and printing out balls' location in an image coordinate.
-
Move to your workspace and clone this repository.
-
catkin_make --pkg core_msgs
-
catkin_make
-
Execute the main node:
rosrun ball_detection ball_detect
OpenCV windows will be printed out. (Of course, a camera launch file should be executed first.) Please check balls are detected well. -
To change parameters related to the detection (i.e. HSV value...) please run
rosrun rqt_reconfigure rqt_reconfigure
and change them in your favor.
-
Before get started, please follow the instruction and run a extrinsic calibration package in syntax: this link
-
While running the package above, execute a node by typing
rosrun ball_detection tf_listener
-
Rotation and translation matrix will be printed out on a terminal. Then, please copy and paste it onto two float type array rotation[9] and translation[3] at ball_detect.h in an include folder.
-
Recompile the whole workspace by commanding
catkin_make