
Rubik's cube solver
http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/f2018/sg739_jpc324/sg739_jpc324/sg739_jpc324/sg739_jpc324/index.html
Our project was creating a rubiks cube solving robot that utilized image processing, Kociemba's algorithm, and servos acting as claws/arms to turn the cube. We had a goal of being completely self contained and would not need any human interaction after the initial cube placement. In order to achieve this, we needed a way to take in the input of our initial state of the cube. This required taking pictures of the cube and using an image processing script we wrote using the openCV package in python. This program worked by checking for red, green, blue, orange, white, and yellow and taking an average of the color at each position to figure out which of those it is. After processing the 6 images, our code then passed in the input to our algorithm. We used an algorithm named Kociemba's algorithm. This algorithm works for a solution by breaking up solving the cube into two steps. It is important to note that Kociemba's algorithm doesn't offer the optimal solution, but instead offers a "reasonable" solution that is usually within 25 moves or less. The optimal solution algorithm could take a very long time to run so we opted to go with Kociemba. After we got our list of moves, our plan was to send this over serial to the pic32. The chip then decodes this string and stores the moves in an array to keep track of them. Four claws consisting of two servos that allow the claw to rotate (actually turning the cube) and extend/retract, allowing you to move the claws without moving the cube. Getting the claws to line up correctly took a few tries but after a tremendous amount of calibration, they seemed to be working fine without much human assistance
