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.

13 of 144 comments (clear)

  1. That's the hard way of solving the RB by Rosco+P.+Coltrane · · Score: 4, Funny

    This Lego machine is great, but it's an overkill : anybody who has played with a Rubik's Cube knows the best way to solve it is to peel off all the colored stickers and glue them back on in the right order.

    --
    "A door is what a dog is perpetually on the wrong side of" - Ogden Nash
    1. Re:That's the hard way of solving the RB by tmark · · Score: 4, Funny

      I always liked disassembling the blocks and putting them back in such a way that the cube could not be solved at all, then leaving it for someone to try and solve.

    2. Re:That's the hard way of solving the RB by Komi · · Score: 4, Interesting

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

      Actually it's almost more clever than solving the cube itself. I know several people (including myself) who can solve a Rubik's Cube, but all of them (including myself) learned how to solve it by reading the solution out of a book, or off the web. But since this was something new, it took real ingenuity to figure it out.

      Hofstadter (in Metamagical Themas) points out how damn clever the internal mechanism is

      You should see the 4x4x4 and 5x5x5 cubes. The 5x5 has a similar mechanism to the 3x3 because it has a central square on each side. But it has to hold in more edge pieces and eight middle pieces surrounding the center square.

      The 4x4x4 is a totally different mechanism, since it has no middle square. It's core is a ball with grooves in it, and all the pieces can slide around on it. (Note: Don't try to picture it based on my description. You'd have to open one up to really find out.)

      And in response to your parent post, trying to solve a cube that's put together wrong takes about as much time to figure out as it does to solve it. Once you're putting the final pieces in place you notice that one piece is rotated in a way it shouldn't be. Then you know immediately it's impossible.

      Komi

      --
      The ultimate goal of science is to unify all forces of nature to a single law that can be silk-screened onto a T-shirt.
    3. Re:That's the hard way of solving the RB by Puk · · Score: 5, Funny

      I, for instance, did my rubik's cube three times in the two minutes it took me to write this post. Without looking. Beat that.

      I've had sex. With a girl.

      In the two minutes it took him to write that post? Definitely slashdot material.

      -Puk

  2. Finally by wbav · · Score: 4, Funny

    Some source code to solve my cube! I've been working on it (off an on) for years. It's really a problem when I get 5 sides and someone comes in and trys to solve the last side for me.

    --

    =================
    Unix is very user friendly, it's just picky about who its friends are.
  3. See? I'm not a nerd. by kingrat · · Score: 4, Funny

    I can solve a cube...have been able to since I was like 8. Now I know I'm not a nerd.

    No.

    A Nerd will build a Lego robot to solve the cube for him.

    /me reconsiders visiting /. again, as he now knows he's not a nerd.

    :)

  4. LEGO Mindstorm Professional, v8.2 by ptutko · · Score: 5, Funny

    September 7, 2006: Billig, Denmark, (AP) - LEGO announced today version 8.2 of the popular Mindstorms robotic kit, targeted for the home consumer. Previous versions sold to industry have had great success in automatic pencil sharpening robots, latte-fetching robots, and the now popular PDA-linked Mindstorm with vision sensors that can manuver underneath desks (link to: Corporate Workers Protest Upskirt Robots).

    This version of the Mindstorms robotic kit comes with grapple features including metric socket wrenches, screwdriver, and air-hammer attachments. LEGO hopes that these new features and applications for home repair use can continue to spur the market need for these "little home helpers," as the New York Daily News called them.

    "Who knew," said Margaret Whipple, mother of three and currently a stay-at-home, neighborhood, home owners association attorney, "that when I bought my initial Mindstorms kit to walk the dog, that I could now have a second kit to rotate the tires on my car!"

    LEGO sees the home repair market as enormous, according to Lars Ulford, managing director of LEGO's newly formed Mindstorms For The Home division. "You will be able to download home repair programs over your wireless PDA, and uplink them to your home robots. These little buggers can then fix your faucets, rewire the electrical panel, and change lightbulbs. All this frees the consumer from those dreary, everyday household tasks."

    In a related story, LEGO denies the rumors that they have developed a semi-sentient Mindstorms "dog" that attacked the CEO on a walking tour last week. "It was just a minor electrical short," says LEGO technician Hans Trachet.

  5. 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
  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:Why is this suprising? by Ronin+Developer · · Score: 4, Interesting

    In 1980, I had written a cube solver for the TRS-80. It took several minutes to enter the data for each face and then 20 seconds to run with a resulting solution around 40 moves.

    My HS nerdy friends and I would have contents on who could solve the puzzle the fastest. By hand, I could solve the puzzle, if I remember correctly, in under a minute.

    Drove my parents nuts in the car with its incidious grinding noise. But, silicon spray was a bad idea....the solvent that held the silicon disolved the cube's plastic workings. We opted to open it up, squirt in a glob of Vaseline, put it back together, work with it a while, and then wipe of the excess. My cube, now twenty years old still spins smoothly (but doesn't get used much anymore).

  9. homemade solver by Pink+Daisy · · Score: 4, Interesting

    I've some friends who built a similar machine, but with more primitive construction materials. They did it for a second year design course at the University of Toronto. Details available here.

    --

    If you are modding me down because you disagree with me, use the "Flamebait" category, not the "Troll" one.
  10. 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.