This is the final project for the course ME 495: Embedded Systems in Robotics.
Juntao He, Peter Sauer, Xiaowei Bi, Yuming Jin
Connect Four is a two-player connection board game, in which the players choose a color and then take turns dropping colored discs into a seven-column, six-row vertically suspended grid. The pieces fall straight down, occupying the lowest available space within the column. The objective of the game is to be the first to form a horizontal, vertical, or diagonal line of four of one's own discs. Connect Four is a solved game. The first player can always win by playing the right moves.
This project is about utilizing a Sawyer robot arm to play the game connect four against a human player.
nodes/camSubscribe.py
Scans the game board and play connect-4 with a human player by placing checkers into desired slots on the board
- This node will go to a set position above the gameboard to check the camera feed from the arm.
- It will then use that information to find the pieces and slots to drop the pieces into using a combination of Hough Line transformations and april tags.
- This node will also use the head camera to the side of the gameboard to analyze the state of the game
launch/JTAS.launch
- Launches the
planning_contect.launch
launchfile from thesawyer_moveit_config
package with pre-defined parameters - Launches the
move_group.launch
launchfile from thesawyer_moveit_config
package - Launches the
joint_trajectory_action_server
node from theintera_interface
package - Launches the
camSubscribe.py
node
For this project, I mainly focused on the game board scanning and analyzing process. Since the head monitor camera views the game board from an upper angle, the image it records is tilted. In order to restore the image into a horizontal parallel view, four apriltags are placed on four corners of the board, and a perspective transformation is performed.