Base
The gaps allow the gripper to grasp from all directions and turn the bottom face of the cube.
Gripper
Using default grippers with rubber to stably grasp the cube.
Webcam (Logitech C922 Pro Stream)
Generate Rubik's cube configuration by scanning each side of the cube using this webcam.
controller_command_lib.py
This file contains all the robot motions that we need for scanning the configuration of the cube and solving the cube by using Cartesian path planning. Functions include pick & place and rotation.
Vision.py
This node will request a service from controller_vision_server.py to bring the face of the cube we needs to scan to the camera and lift the cube above the base. Then, use the functions in VisionHelper.py to scan the color of the current face and record the face config. After scanning all the faces, it will publish the cube config to the corressponding topic.
controller_vision_server.py
Includes the procedures to bring each face of the cube to the camera.
VisionHelper.py
In order to detect the config, we wrote a python program using OpenCV. The program takes an image, then use Canny edge detection and Hough Transform to map the lines in the image, then we can use these lines to locate the cube in the image. Last, we use the least square method to classify the color of each cell.
controller.py
This node will subscribe the topic from vision.py. Using the Kociemba algorithm, we can pass in the cube config to get a solution procedures of the cube. Last, it will translate the solution procedures to the robot motions in controller_command_lib.py.