Rubik's Cube Solving Robot

bhouston

Canada

I found this robot on Thingiverse; www.thingiverse.com/thing:2471044 and thought it would be a fun project. Check it out they've really created a great robot. Printing it takes about 70 hrs. and then you need to go shopping for baking supplies (Raspberry Pi's and such). So I thought why not make it run with EZ-Robot hardware (most people here have lots of that) and software. I modified the camera holder to accept an EZ-Robot camera and the arms to accept EZ-Robot HDD servo horns and connected everything to an IoTiny. Building it was pretty straight forward. Programing it to solve the cube was another matter, so I got ahold of forum member ptp and asked if he would be interested in helping out and he was. He doesn't have a 3D printer however so I built him the robot and sent it to him. He has been busy working on an EZ-Robot plug-in to solve the cube as well as calibrate the arms and grippers. We are hoping to have the Plug-in ready to share by the end of the month, so start printing. This would be a fun project for both kids and adults. We'll keep you posted.

By — Last update

ARC Pro

Upgrade to ARC Pro

Elevate your robot's capabilities to the next level with Synthiam ARC Pro, unlocking a world of possibilities in robot programming.

PRO
USA
#9  

Welcome back:)

This is Bob's Idea, thanks to him i have another project to spend my time:)

The main objective is to use only EZ-Robot hardware, and the HDD servos are the best fit.

Regarding your tip seems very interesting for a good price, although i don't know if they have the standard servo dimensions, serial is nice less cables, and the feedback is very interesting but so far no need for them but 240 rotation degrees would help the gripper to rotate both sides (CW & CCW).

Parallax released a new Continuous servo with 360 degree feedback, very interesting you can run multiple turns and obtain an absolute position of 0 to 360, OR if you hack the servo and reprogram the sensor you can obtain 12 bit resolution 0-4095 positions. I'm working on a parallax propeller firmware and an EZB/ARC skill plugin.

Bob is working on the gripper model to be able to obtain full 180 degrees.

An update is coming soon...

#10  

For the cube solver, I just used DS3218 and HS311

PRO
Canada
#11  

@69developer I took a look at the LewanSoul LX-16A looks like it uses a proprietary bus controller, were you able to get EZB to talk to their bus controller (looks like the bus controller supports TX RX Serial connect so theoretically we should be able to connect via the UART port) or could you get the servos to work direct off EZB controller ( dynamixel compatible ?)

Edit: I ordered a starter pack (5 servo's and controllers) from Amazon for $110 Canadian (on amazon.com it's $89 US) The servo's are $20 CDN each if you buy separately or in US ($14). I will report back with findings but if they work off EZB direct would be huge and would solve a lot of problems.

PRO
USA
#12  

@Nink, Those servos are not new here in the forum, the first time i spot them was this thread: https://synthiam.com/Community/Questions/10643

To avoid hijack Bob's thread (Cube) let's use the above thread for information related to the LewanSoul servo.

Today I'm in the Kitchen cooking (Thanksgiving) so limited computer access.

PRO
USA
#13  

Testing Color Detection:

ARC Project: TestCubeVision01.EZB

Automatic Color Detection is not easy.

No servos are needed to run this project.

Feedback is welcome.

Soon I'll start again on the Rubik's cube (ROBOT).

I would like to thank:

  1. Bob for the new Grippers , I damaged the initial ones.

  2. A member of the forum for a generous donation : EZ-Robot Camera and 2 HDD Servos.

The above tests have been done with a Microsoft USB Camera, the next step is to test the new EZR Camera (I'll be more careful this time!)

Thanks for reading!

PRO
Synthiam
#14  

Are you using the multicolor rob or ycbr color detection? Try enabling histogram on those detections - that'll assist with lighting conditions and angles.

The good news is that the camera and cube would always be the same angle in the real version - unlike holding it with your hand at random angles. So lighting would be more consistent.

#15  

I am looking forward to seeing an Inmov solving the puzzle?

PRO
USA
#16  

@DJ, The detection is done for each square.

I'm using HSV colors:

User-inserted image

User-inserted image

Hue is 360/2 = 0..179 (byte)

Challenges:

  1. detect red-orange-yellow: They are very close e.g. The distance between Orange and Red and Yellow is only 7.5 points.

  2. White There is no white on the wheel, so need to look for saturation and value too, that is the reason why Blue is being recognized as White.

  3. Middle cube with the brand sticker. Is not only a color issue but a contour issue too... What a pin in the neck.

I didn't tried combining the HSL model:

User-inserted image

Regarding the Angles: Assuming 0 is the middle, i need to detect the perspective, the problem is left or right, i need to review the calculation, I'm using an average angle, but after a specific rotation (cube corners (TL-BR) swap direction) and the global perspective is affected.

Quote:

The good news is that the camera and cube would always be the same angle in the real version - unlike holding it with your hand at random angles. So lighting would be more consistent.

Correct I'm trying the worst scenario.

Regarding the colors the problem is not finding 6 different colors the main problem is calling them a name.

I saw some internet rubik's cube videos, and they scan the 6 faces and the color clustering is done after, so is more easy to divide to color 1-6 (color distance) and present a BGR square color in the screen versus identifying the color.

I believe i'll handle both approaches:

A) Cube Robot: Color Distances (A-B-C-D-E-F) for solving.

B) Free movements, Color Recognition. If i can't find an automatic model, the user will need to adjust the intervals.

This is like magic... If you solve the cube without naming the colors, you have the idea the Robot recognizes identifies the color.