Monday, February 20, 2006

Why Lego Mindstorms (bis)

Over on Jim's blog, in the comments, there was an interesting question on what has made Lego Mindstorms a success. I'd like to take that a step further, and say why I believe Lego Mindstorms NXT may be an even bigger hit than the old Mindstorms RCX (RIS). As you know, I am not affiliated with Lego in any way, so everything here are just my personal thoughts.

A bit of background. As you see in my about me, I was founder of Robonetics. We used to build all sorts of robots, many of them for the mass market. Contrary to what you might think, this was not our mission. Robonetics was founded as a robot software company, which fits my background as software engineer. Unfortunately, clients never come with a ready-made robot and ask to build software for it. It wouldn’t even be a good idea, because there is a close link between the shape of the body and the complexity of the control software. So we ended up building prototypes for commercial toy robots.

We first tried building the body and brain in Lego. This didn’t work well. The Lego Mindstorms RCX, with just 3 motors and 3 sensors, was too limited. Since it didn’t have servo motors, it required sensors just to control the position of the motors, which left next to no sensor inputs for the real work.

So we used the BasicStamp, in combination with HiTec servo motors and wooden/polymer bodies. This approach worked well enough to produce the desired results, but it was expensive in man hours. Moreover, there was no easy way to reposition the sensors to try something else. As a result, we had a full time mechanical engineer who did nothing but modify the body of the prototype robots, and keep them up and running. The good thing about using the BasicStamp is that we had all the sensors we needed: ultrasonic, infrared, light, tilt, … Most of these sensors were not available for Lego at the time.

For us, cost of the kit was not the issue. A solution that allowed building robots faster would have been great. A solution that allowed to software engineers to modify the body would have been even better. Lego is amazing because it can be put together very quickly, is easily changed without an engineering background, and yet the design does not fall apart easily. Even if the robot ran full force into the wall upon a sensor error. That’s why we later started to work our way back in the direction of Lego, by sticking our BasicStamp, servos and sensors on top of Lego Technic bricks. Unfortunately, our main customer was not very reliable, and has gone bankrupt since, and we were forced to close our doors.

As you can imagine, that didn’t make my passion for robotics go away. When Lego announced Mindstorms NXT, I was immediately swept off my feet. Here was the Lego kit that had all the things Robonetics was working toward. For instance, we used close loop angle sensing on the servo motors to measure its actual angle. To understand this, you need to realize that normal servo’s are fed a position and then you hope they achieve this position. There is no way to know whether they actually got there. On a model airplane, when you are moving the flaps, the motors are only working against the wind and so the only concern is the power of the motor versus the power of the wind. But when you start building walking robots, obstacles blocking the legs are a real issue. That’s why it is really important to know what angle the motor actually achieved.

Close loop motors also allow servo’s to run slower. The way to achieve this to send the motor to angle 1°, then to angle 2°, and so forth, at the pace you like the motor to turn. The new Lego Mindstorms NXT has closed loop motor control right out of the box. That is really a big help when building robots. Plus, it leaves the four sensor ports wide open for real sensing.

The new Lego Mindstorms NXT also had an ultrasonic (US) range finder right out of the box. US sensors are a great thing when building robots. They are like eyes in the sense that they detect distances to obstacles, but they are very easy to process. US sensors have poor angular resolution, but with some clever mechanical/software tricks, you can make a really high resolution map of the world in front of the robot. I'll write about that sometime, maybe when I get my hands on the actual Lego sensors?

But it’s also the little things that got me exited about Lego Mindstorms NXT. An ultrasonic range finder doesn’t work on very distances. For that, you need a light sensor. The light of the built-in LED reflects on surfaces. If there is a lot of light, then there is an obstacle, otherwise, the obstacle is further away or not there. By turning the light sensor downward, you can detect if the table “obstacle” is there. If you stop detecting the table, and you don’t want to drop off the table, you best stop or reverse the robot! The same light sensor can be used to follow a dark line on paper, because light reflects better on white paper than on the dark line. All you have to do is keep your robot where the light is not very strong.

The little thing I was referring to is that with the Lego light sensor, you can also switch off the LED. That is cool. Here’s how you’d use it: when our old Gupi toy robot got scared from loud sounds, it ran for the closest dark spot (e.g. under the sofa). After a while, it gently came back toward the light, cautiously leaving its safe spot under the sofa. Lego Mindstorms NXT not only has the right light sensor for the job, it also has the sound sensor, and can distinguish between loud and gentle sounds.

At the time, a different product was going to be able to communicate with other robots over the Internet. Again, Lego Mindstorms NXT is perfect because using its wireless Bluetooth, we can achieve this easily via a PC-connection.

The Bluetooth also allows using unlimited processing power. If the processor onboard is not powerful enough, run the software on a nearby PC and send the instructions to the robot for execution. Bluetooth also provides a great way to debug the robot by seeing on the PC screen what the robot sees, and to remote control it to test sensors.

I guess I could go on, but the essence of what I am saying, is that we could actually build every single research robot we’ve built at Robonetics, both toys and real-duty robots, with the Lego part of Mindstorms NXT, especially when you factor in all the parts from other Lego Technic sets, the parts from third parties like HiTechnic and PC-based control via Bluetooth. Lego Mindstorms NXT is more than a toy, or an educational kit. It is, in my opinion, the easiest to use and most powerful kit to build advanced robots. And any parts missing today, like a tilt sensor or infrared sensor, will undoubtedly be available as a plug-and-play brick within a year after the launch of Mindstorms NXT. But that's just my guess.

The most amazing thing of it all is that both kids and adults will understand this set. They will be able to play and build these robots themselves. And with the help of libraries I hope to help provide, they may build really advanced robots. Maybe, one day in math class, they may realize that trigonometry isn’t as useless as it first seemed to them.

1 Comments:

At February 20, 2006 11:24 PM , Blogger James Floyd Kelly (Jim) said...

Enjoyed reading your thoughts, Filip...

Jim

 

Post a Comment

Subscribe to Post Comments [Atom]

<< Home