Automated Billiard Ball Machine Implemented with Manipulator and 3D Computer-Vision in High Accuracy:
Create a system combined with manipulator and depth-camera to play billiard ball automatically. The system includes Image-processing (Mask, Opening, Hough Circle Transformation) and AI (Simple Object Detection with Tensorflow) to apply object detection, Robot-Vision (Camera Calibration, Hand-Eye Calibration),Algorithm designed by ourselves to find the optimal solution to win the game, and Manipulator Kinematics to apply coordinate transformation.
💡 Note: To see the final demonstration without reading the description, you can goto our Youtube watching the demonstration video!
python /eye_hand/camera_eye_hand.py
python main.py
Connect to the manipulator and turn on the "SMON"
Pose controlling Robot Manipulator to take pictures of “ChAruco Board”
Get the extrinstic matrix between the end-effector and the camera
Get the intrinstic matrix and the distortion factor
align_depth2color.take_pic()
💡 Note: the left is RGB image, the right is depth image
test_undistort.undistort()
💡 Note: the obvious black lines around the picture are the consequence of the correction of distortion
a. Apply green mask to the color image(bitwise_and)
b. Detect the edge of the table, using the picture above
c. Apply opening to reduce the image noise and save the image(mask.png)
Applying Hough Circle Transformation to find the coordinates of the table holes from the mask.png Find Holes coordinates of the table with Hough Circle Transformation
findHole_new.findHole()
hough_circle_test.findBall()
a. Apply bitwise_and between the color image and mask.png
b. Apply Hough Circle Transformation to find the balls' coordinates
num_ball, isConvex = hit_ball_strategy.hit_ball_strategy()
The best solution to the case will be visualize on the image.
💡 Note: To see the rules of the strategy, you can turn to the Readme in the "algorithm/"
8. Coordinate Transformation from Image Coordinate to Robot Base Coordinate(World Coordinate) and Hit the Ball !
The coordinate of the cue ball(image coordinate) will be transformed into Robot-Base coordinate, and the manipulator will hit the ball with the Pneumatic cylinder.
coordinate_transformation.coordinate_transformation(num_ball, isConvex)
👉 Our Yutube Channel: https://youtu.be/1msCYlrSwBo