Slashdot Mirror


When Lego Meet Rubik

Credit goes to memepool for bringing you word of Lego robot that solves Rubik's Cubes. This is one of the most jaw-dropping things I've ever seen. Dedication is defined as rebuilding "left and right grabbers six times (and the bottom grabber four times) trying elastic bands, Technic shocks, and pneumatics" in order to grasp that little cube.

9 of 144 comments (clear)

  1. Mindstorms by All+Dat · · Score: 2, Informative

    Very cool. Ever notice how it's getting farther and farther apart when REAL cool stuff happens? I remember just a little while ago when "things" happened all the time. :)

    It would be very interested to see a mindstorms project that can open a combination lock (or a bank vault! LOL)

    Great work on the cube. I can't imagine the time that one took. Like I said before...

    very cool.

    --


    3-Server OC-3 Linux Counter-Strike Cluster
    www.rnp.ca
  2. Re:....And.. by cavemanf16 · · Score: 3, Informative
    I got a chance to skim the article b4 the slashbanging occurred.

    Yes, as stated in the article, the major obstacle was apparently the image recognition, as the creator of this marvelous work had to optimize some Logitech code used for the optical probe he was using (can't remember it's name). He also stated that because it was pretty error prone, he had to throw in code to allow the user to tweak the color values and/or confirm the colors that the probe picked up. He did use an already developed algorithm and code that he found online for solving the cube.

    He also had to lube up the Rubik's cube so that the Lego's could manipulate it easily enough. Still, I find this kind of dedication to robotics and simple plastic bricks quite astounding! With this guys' skills, maybe he should build a Battlebot to manipulate the hell out of Son of Wayachi...

  3. Re:'meet' rubik? by Masem · · Score: 2, Informative
    "Lego" is considered to be the plural by the company. That is, you "play with Lego", not "play with Legos". The singular form is "Lego brick".

    This has been another Useless fact.

    --
    "Pinky, you've left the lens cap of your mind on again." - P&TB
    "I can see my house from here!" - ST:
  4. Rubik links by uigrad_2000 · · Score: 5, Informative
    First, a Yahoo club to discuss the fastest algorithm to solve the cube.

    Second, a best fast algorithm for solving the cube with downloadable source code

    And last, a Description of how a 4d rubik hypercube would function along with a solver program for the hypercube.

    --
    Free unix account: freeshell.org
  5. Re:That's the hard way of solving the RB by kisrael · · Score: 3, Informative

    Given the time energy and persistence most people will put into the cube, this is no different than the real cube.

    Anyone remember the old "RATE YOUR MIND PLA"? One of the first time the "15" sliding puzzle was brought to the public's attention (15 tiles on a 4x4 grid, slide around to make a certain pattern) by Sam Lloyd, it was impossible to solve, and the best you could do was spell out "RATE YOUR MIND PLA" instead of "RATE YOUR MIND PAL" (though according to this page, it might be able to work if you can interchange the two R tiles...)

    Buy yeah, disassembling the blocks gave better results than swapping the stickers. Hofstadter (in Metamagical Themas) points out how damn clever the internal mechanism is, so taking it apart is a bit educational to boot.

    --
    SO YOU'RE GOING TO DIE: The Comic for Dealing with Death
  6. Re:....And.. by zulux · · Score: 4, Informative

    Here's the text, modified to get past the lameness filter. The robot itself is squat and well built, it envelopes the cube, except for the top and front, the grippers have a sturdy look to them.

    CubeSolver_1b

    - PREAMBLE -

    This robot solves a 3x3x3 Rubik's Cube.*

    I started to think about this problem about seven months ago. Then fellow Mindstormer AGIECCO announced his intention to work on a robotic solution and, simultaneously, I saw that Rubik's Cubes were on sale at www.target.com. So I bought a couple of cubes and started getting down to business...

    I produced a "late beta" version in mid-April 2001 that was a little clunky. The final version -presented here is smooth and reliable. The good news is that LEGO liked it so much they asked me to make some copies for them, so there's a decent chance that you'll be able to see one on a Mindstorms road show in the coming year.

    - MECHANICAL DETAILS -

    Two RCXs are used to manipulate the cube and implement the solution. The solution is generated by scanning each face of the cube in turn with the video camera from Vision Command, calculating a solution onboard a PC, and then downloading the move sequence for the solution to an array in the top RCX.

    TOP RCX -master RCX controls the side grabbers which can rotate 90, either independently or simultaneously...

    - OUT_A rotates the green grabber -one motor.
    - OUT_B opens/closes the yellow and green grabbers simultaneously -two motors: one for each grabber.
    - OUT_C rotates the yellow grabber -one motor.

    - IN_1 two touch sensors, one at each end of the 90 limit of the green grabber's turn -arms UP-DOWN or arms FRONT-BACK.
    - IN_2 two touch sensors, one on the green grabber and one on the yellow grabber, detect when the grabbers are open.
    - IN_3 two touch sensors, one at each end of the 90 limit of the yellow grabber's turn -arms UP-DOWN or arms FRONT-BACK.

    BOTTOM RCX -slaved to top RCX via IR messages controls the bottom grabber which can rotate back-and-forth 90. Two touch sensors report when the bottom turntable has reached its limit of travel -arms perpendicular to the LR grabbers, or arms parallel to the LR grabbers.

    - OUT_A opens/closes the BOTTOM grabber -one motor.
    - OUT_B rotates the BOTTOM grabber -one motor.
    - OUT_C -
    - IN_1 Touch sensor -arms perpendicular to LR grabbers.
    - IN_2 Touch sensor -arms parallel to LR grabbers.
    - IN_3 Rotation sensor, tracks the open/close state of the bottom grab.

    To achieve a cube solution, you must be able to rotate the whole cube by 90 in two orthogonal axes, *and* be able to turn a face by 90 relative
    to the rest of the cube.

    I opted to use the left and right grabbers to turn the faces; the yellow grabber can rotate the left face by an 90; the green grabber can rotate the
    right face by 90; or they can both turn simultaneously while the bottom grab is open to rotate the whole cube through 90.

    The bottom gabber holds the center 'slice' of the cube when the left or right grabber is turning a single face, and also provides a 90 turn for
    rotating the whole cube.

    The tricky part is to bring the correct face into a position where the left or right grabber can grip it. For instance, to turn the UP face -white face of the
    photo shown here, the sequence is as follows:

    - The side grabbers engage, the bottom grabber releases, and the side grabbers rotate the whole cube 90 so that what was the UP face is now
    facing the LEGO Cam.

    - The bottom grabber re-engages, the side grabbers open, and the BOTTOM grabber turns 90 anticlockwise; what was initially the UP face is now
    facing the yellow grabber -and what was the DOWN face is now facing the green grabber.

    - Unfortunately, the fingers of the BOTTOM grabber are now in the way, so we rotate the side grabbers back 90 and re-engage them to hold the
    cube and then open the BOTTOM grabber.

    - The cube is now securely held by the side grabbers, with the BOTTOM grab open, so we turn the bottom grabber back 90 clockwise and re-engage it. Now we are all set to turn the face which was facing UP at the start of the operation...

    If you find this all a little hard to visualize, there are some additional photos at

    http://albums.photopoint.com/j/AlbumIndex?u=1273 48 3&a=13576975

    - PROBLEMS SOLVED -

    1. The cube faces are generally too stiff for LEGO elements to turn.

    This problem was solved by a tip I found on Lars Petrus's Speed Cubing page -http://ng.netgate.net/~mette/lars/cubedude/speed. html - lubricate the
    cube with silicone spray lubricant. I got an aerosol can of LubriMatic Heavy Duty Silicone Lubricant from my local ACE hardware store. The can comes
    with a long, thin red tube to direct the spray. Using the tube, I directed a brief squirt of lubricant into the cube at each of the four corners of the center 'cubelet' of each face -I recommend doing this on newspaper - it's a fairly messy job. After wiping off the excess spray, the result is a fairly slick cube.

    However, I found that the cubes were still a little sticky owing to the springs inside the cubes being stiff, so I pushed some wedges in between the facelets and left them over night to force the springs inside the cube to loosen up. After this treatment the cubes handled very well.

    2. Getting enough torque

    Even with a treated cube, getting enough torque to turn the cube faces was going to be a problem. I remembered the system that Jin Sato used on
    the thigh joints of MIBO - worm gear to the outer 56t ring of the large Technic turntable. This gives torque to spare for turning the faces of a treated
    cube.

    3. LEGO grabbers don't grip strongly enough

    My early attempts at building a cube solver were all stymied by grips that slipped. The worm-56t gave enough torque to turn, but the fingers couldn't
    hang on and the grip was simply pried apart as the grabber rotated around the stationary cube face. I thought about changing the device's name to
    "ButterFingers".

    I rebuilt the left and right grabbers six times -and the bottom grabber four times trying elastic bands, Technic shocks, and pneumatics, before I came
    up with an adequate grip mechanism. In the present version, an axle runs from a motor through the center of the large Technic turntable to a worm
    screw. The worm screw turns two 24t gears mounted inside the body of the grabber, one each side of the worm. Each end of the 24t axles terminates
    with an 8t gear outside the body of the grabber, and these 8ts engage with 24t-s on either end of the axle which drives a grabber arm. This system can
    be strained quite tight without risk of gear slippage, and also allows the large turntables to rotate 180 without any significant loss of grip.

    For the bottom grabber I had to use a slightly different arrangement -same gear combinations because the fingers of the green and yellow grabs
    kept catching on the external 24ts of the bottom grab. Eventually I managed to work out how to mount all the gears internally in the 4-stud width of
    large Technic turntable.

    The result of using all these worm drives -rotating, and opening/closing the grabbers is to give a slow, deliberate feel to the movements which I now
    quite like: instead of snapping from one position to another like a karate expert the movement is more like t'ai ch'i master - full of controlled energy.

    4. Precision of movement.

    As I mentioned before - the grabbers were rebuilt more than once. Part of the problem was getting a strong enough grip; the other part was getting the
    'fingers' of the grabbers out of the way of each other when the whole cube was being rotated -you'll notice that the left and right grabbers hold the cube
    near the edge to keep the fingers short. Having solved these problems, there was still the problem of 'slop' or 'gear lash' in the left and right drive trains.
    Most of this was absorbed by putting the rotation sensors on the worm drive axles. However, the worm screws are a *tiny* bit too short to fit snugly -
    they travel a little when the motor direction is reversed. To cure this I tried a suggestion from John Barnes -http://news.lugnet.com/robotics/?n=14854
    and cut thin shims out of the plastic insert tray from inside a LEGO box. Two shims on each drive axle fixed the worm gear nicely in position so that the
    gear lash -although still just detectable was *nearly* within the tolerance of the cube for repeated turning.

    The final problem is making sure that the faces of the cube are kept in orthogonal alignment. A standard Rubik's Cube has side dimensions *just* larger
    than 7 LEGO studs. Fortunately there is enough flex in the joints of LEGO Technic to absorb the tiny additional dimension. Each grabber arm is fitted
    with reverse slopes that force the cube into the correct orthogonal alignment as the grabbers close. However, the rotation sensors for the LEFT
    and RIGHT grabbers occasionally lost track of their position and had to be manually tweaked during a solution. There was a also a problem that the
    rotation sensors were on the same axle as the worm screw turning the turntable. When the cube was a little stiff, even if the worm screw had performed the correct number of rotations to turn the cube face 90, the LEGO pieces of the grabber had enough flex that the grabber was slightly twisted and the face did not make it all the way around to the 90 point. Therefore I scrapped the rotation sensors and put two touch sensors at the limits of the quarter turn of the turntable -similar to the bottom grabber. I built a "toucher" attached to the rotating part of the large turntable, and this seemed to compensate better for the twisting of the other LEGO elements of the grabber during stiff turns.

    The disadvantage of the touch sensor approach, of course, is that the grabbers can no longer make a full 180 turn, so there is more time taken repositioning the side grabbers. The robot averages one face rotation every 30 seconds.

    5. Inputting the initial -unsolved state of the cube.

    The longest part of the this project involved writing the color recognition software. I downloaded the Logitech Quick Cam SDK from the Logitech site -the Vision Cam is a repackaged Logitech Quick Cam and used VB5 to write a fairly decent program -good enough to distribute if anyone wants a copy. The color recognition is reasonably robust -about one error every two cubes so I incorporated a feature that requires you to confirm that each face has been correctly scanned -and, optionally, allows you to correct the input manually before it scans the next face. The software requires calibration with a solved cube under the particular lighting conditions, and it is quite finicky about changes in lighting conditions. I also left in the earlier manual input option so that you can get a solved cube for calibration, or in case anyone who doesn't have a Vision Cam wants to try this.

    Briefly, the software sends a message to the top RCX asking it to present one face of the cube to the video camera. The computer captures a frame from the video camera, and scans a 50x50 pixel area of each color patch to find the median red, green and blue -RGB color values for each color patch on the face. The RGB values are converted to D55 compensated CIE L*a*b* coordinates, and then the CIE values are trigonometrically compared to the calibration values to find the closest match. The computer then asks the robot to show it the next face, and the process is repeated until all the faces have been scanned.

    6. General solution to the Rubik's cube.

    There are any many general solutions to the 3^3 Rubik's Cube on the internet -http://www.rubikscube.com/cubesolutionother.html. However, most of these produce a sequence of moves involving 50 or 60 face rotations. Given that my bot moves quite slowly, I wanted a relatively short sequence of moves. Fortunately, I found some C source code by Michael Reid on the internet -ftp://ftp.cdrom.com/.2/sac/educult/miker.zip which implements Herbert Kociemba's solution method: it provides short solutions - 40 face rotations quite quickly. I ported this code to Microsoft Visual C++ and recompiled it as an OCX for use in Visual Basic. I must say that Mike did a pretty decent job with his code - move sequences are usually less than 30 moves.

    NOTE: The NQC source code files for the two RCXs is are too large to upload to the invention slot here in Mindstorms - apparently there's a 15k limit, while the code for RCX1 alone is 19k. Anyone who wants the NQC source can e-mail me -envcons at ameritech dot net.

    -
    * Rubik and Rubik's Cube are Registered Trademarks of Seven Towns Limited.

    --

    Moneyed corporations, non-working 'poor' and criminal prisoners are turning productive citizens into tax-slaves.

  7. Re:The correct name for these bricks is LEGOS by Monte · · Score: 4, Informative

    With an 'S'. Its a plural.

    If the word "lego" were a noun, you'd be on to something. However, it's a adjective. Saying "I have a lot of Legos" is like saying "I have a lot of wets".

    The machine isn't make of Legos, it's made of bricks. Lego bricks.

  8. Re:The correct name for these bricks is LEGOS by Anonymous Coward · · Score: 1, Informative

    Well, im a dane and i have alot of lego :)

    So to specify, for me "legoer" (which would be the most correct plural) sounds very wrong.
    And i have newer heard people talk about lego otherwise than just "lego"

    So if _I_ should say it in english, it would still be lego

  9. Re:And don't forget the lubricant by Gorimek · · Score: 4, Informative

    Thanx for posting my site! I feel honorbound to point out that I'm the Swedish champion, but only came 4th in the world championships. Many people seem to make a shortcut and claim I'm the world champion...

    Also, I've moved my site but not redirected the old one (I really should get that done...), so an updated version of that page with some speed quicktime videos is available here: http://lar5.com/cube/speed.html

    BTW, some people (most of whom were hardly born at the time of the first championship) are working on putting together the second World Championships next year. More info on http://www.speedcubing.com. These kids are really fast, so I don't expect to win, but I'll definitely be there.