Tuesday, January 31, 2006

NXT Marketplace

Lego Group CEO Jørgen Vig Knudstorp remarks in his annual report 2004 (page 7) that
The most serious threat, however, is that children are losing interest in traditional toys at a younger age, and that other products in the consumer-electronics sector – such as mobile phones and MP3 music players – are replacing toys to an increasing extent.
I believe robots still best MP3 players when it comes to "coolness factor". NXT is a great move to gain some ground there.

The CEO also remarks that

In 2004, the global market for traditional toys once again was under pressure, and in most countries the profile for total sales was either flat or in decline. In contrast, the market for electronic toys – video consoles and computer games – enjoyed a minor increase. [...]

In spite of [...] improvement, however, the profit/loss [...] remains unsatisfactory.

In my opinion, the profitability of Lego Mindstorms NXT can be improved further by exploiting it as if it were a video game console.

Having the best technical video game console is great, but what really matters is the games that are available. Games are incredibly complex pieces of software, that could never be built by the inspired individual.

With Lego Mindstorms NXT, the same opportunity exists. Once you have bought your NXT set, you can build you own robots, and this should certainly be encouraged. But beyond the educational side of NXT, there is also pure entertainment value. The user buys a "game" for the NXT, and can obviously play with the game. A "game" in this context is a piece of code that runs on the NXT brick, and possibly also on the connected PC. The more engaging the game, the more popular it will be. Robot intelligence would be pushed to new levels, just like video games are now becoming so sophisticated that they are rivalling Hollywood (or becoming intertwinned).

By facilitating "gaming" on the NXT, Lego can win financially in three ways:
  • NXT becomes even more "cool", resulting in more NXT boxes under the Christmas tree;
  • Some games may be more fun when pitting several NXT boxes against each other, resulting in families buying multiple NXT boxes, or friends coming together to game against each other with their NXT. Especially games that allow users to "tune up" their robot are great for challenging each other;
  • Lego could charge for "game" advertising space on their website. In particular, they could provide a marketplace where games are sold, and keep a small percentage per title sold.
I'll admit that the proposal is bold. On the other hand, the risk for Lego is minimal: it merely requires setting up a marketplace page on their site, and charging for titles sold there.

In that light, Jim's speculative discussion of the Mindstorms development environment is interesting. If he is right, there is a direct integration between the Mindstorms website and the development environment. It may be just a small step to providing a direct link to the marketplace as well.

Buy Lego Mindstorms NXT

Lego Mindstorms NXT has arrived in the online Lego shop! Well, you can't put it in your cart yet, but it is there, set 8527. And you can put it in your wish list.

What is also interesting, it to see how prices vary from country to country. There appears to be a magical border across Europe on pricing: 250 euro in the south, 299 in the north.

UPDATE: Athough the kit is on display in the Lego shop, it will not be available for purchase until August 2006.

Monday, January 30, 2006

Why Lego Mindstorms NXT

I believe the success of the PC comes mainly from its ability to run any software you can think up. When the PC was first built, someone created a generic program to imitate a calculator. Doing more complex calculations required complicated programming. Then, years later, someone came up with the idea of the spreadsheet. Spreadsheets are still as useful as ever, but also spawned other applications like project management software and enterprise data warehousing.

The revolution of the PC was in part made possible because most software can run inside the beige box. The only changes in shape of the PC that mattered were the portability of the computer, and the Tablet PC, and even those do not require rewriting your applications, at least not in fundamental ways.

And that is a major difference with robots. With robots, it seems that almost every application can benefit from specific shape alterations, and ever shape alteration changes all the applications running on it. At MIT and many other universities, it has been argued for almost two decades now that building real intelligence requires real bodies. But those universities’ ongoing projects also demonstrate just how incredibly complicated robot intelligence is.

Lego has always been a great way to build and test mobile robots. Before Mindstorms, you had to be an electronic engineer to create your own sensors, and link them to a processor. With Mindstorms RIS, basic sensors were available, but it was still very hard to build robots that knew what they are doing. Rotation sensors for motors were not a standard part, and using too many of them left you with no free connections to add other sensors. That's very different from real muscles, that always provide feedback on their state to the brain.

But all that is changing with Lego Mindstorms NXT. Every motor can sense its own actions out of the box. Ultrasonic “eyes” provide the simplest way for robots to see obstacles without bumping into them. Both USB and a wireless Bluetooth allow external processors to improve brain (and advanced sensor) capacity of the robot. Experimenting with the microphone and sound should be fun. All in all, this is probably the first robot construction kit ever that is capable of building smart robots without requiring you to solder, or know a lot about mechanics or electronics.

I believe Lego Mindstorms NXT may be much more than an incremental step forward. I believe it will represent a qualitative leap forward, and will impact many other domains of robotics and everyday life.

Saturday, January 28, 2006

My First NXT Project

Tags: My-Robots

In the past, my team at Robonetics and I designed a toy robot called Gupi, a robot guiney pig. The client asked us to design the robot as with behaviors that were as lifelike as possible, yet use as few components as possible. Today, the robot is no longer in production, so I’ll use it as an introduction to advanced Lego Mindstorms NXT development.

But first, let’s see Gupi in action. Here is a movie of Gupi being tested in our lab. There is nothing special about its environment. The maze, for instance, could have been created using books or anything other material. The girl in the movie is my niece, Sarah Verhaeghe (the movie plays on Windows, but can also be viewed on Mac or Linux).


Movie on Gupi

Here's a comparison between the internals of Gupi, and the parts that come with Lego Mindstorms NXT:

GupiLego Mindstorms NXT
Number of motors33
Ultrasonic sensor11
Sound sensor21
IR sensor80
Touch sensor51
Light sensor21
Tilt sensors2 one-directional sensors0
Rotation sensors2 motor-stops on head motion, one on each extreme (allows to turn head left to end, right to end)1° accurate sensing on all motors
CPUFPGA
(custom designed chip)
32-bit processor
RAMNone
(sounds stored in ROM)
?
Wireless ConnectionNoneBluetooth
Debugging8 LEDs (255 error codes) - only visible when opened upMatrix screen; Bluetooth

Off course, the features are not a 1-on-1 match. But it is close enough. Gupi had more sensors, but the accuracy of these sensors was lower and its CPU power was lower (or at least harder to exploit). By making some mechanical adjustments, and exploiting the more powerful NXT brick, it must be possible to create a smart pet using Lego bricks.

The behavior of Gupi was amazingly complex, and the video does it only partially justice (the experimental lab robot broke easily when handled by children). The real trick with building robot brains isn't making it do one thing, or even two or three things. The trick is to have a lot small behaviors, and to orchestrate those into coherent overall behavior and character that makes the robot a real being. The shifting attention of the robot depending on threats or new perceptions, the rapid changes in emotion that make it run away scared from the sound, or walk toward the sound to explore. On top of that, we had limited live debugging tools to see why the robot behaved as it did.

It is this kind of development that I hope to explain and explore using Lego Mindstorms NXT. We had a great start with Gupi, but I believe we can replicate the behavior of Gupi. Probably even make it even more intelligent.

It would be great to team up with others, but I'm not yet sure how that would work. I also hope to explain my own work on NXT in such a way, that even kids can start changing the behavior of Gupi in ways they like better. Or maybe build a completely different robot with the behaviors. At Robonetics, we once demonstrated a car driving around (and squicking, like a guiney pig!) simply by hooking the brains and sensors to a different platform. How much more can be achieved with Lego, where mechanics, sounds and behavioral wiring can be changed very easily, and where kids great and small can really let their imagination take over.

Wednesday, January 25, 2006

NXT Community News Aggregator

Lego Mindstorms NXT is taking off in a big way. New blogs and articles are cropping up in many places. As we near the launch, I expect that a lot of new sources will be added.

That's why I have started a news aggregator that reports on Lego Mindstorms NXT!

Here's how it works: I collect the RSS feeds from all the blogs and news feeds that I know, but only if they are exclusively about Lego Mindstorms NXT, or in a large part about it. The news from all these links is brought to you unbiased on my web page http://www.bnxt.com/community/news.

When new sources become available, I'll add them to the RSS aggregator. All you have to do is:
1) keep me posted on new links that I should really include (remember: Lego Mindstorms NXT only! - not everything robotics)
2) subscribe to the RSS or Atom feed to stay in touch with everything there is to know on NXT.

Let me know if you find the page useful or not!

Monday, January 23, 2006

Lego Mindstorms NXT Videos

Right now, I have discovered only one video that shows Lego Mindstorms NXT in action, on BotMag (click here to view movie).
Are there any other movies out there?

UPDATE: Thanks Jim for pointing me to this movie.

UPDATE 2: See the comments on this posting for more video resources.

Servo Motors, Rotation Encoding and Robot Reflexes

Tags: My-Robots

Right now, the information on the NXT is still very scarce. On its servo motors, the official Lego launch press release mentions only the following:

“3 interactive servo motors feature inbuilt rotation sensors to align speed for precise control”

Does this mean that you can measure the position of the servo motor inside the controller? If so, we can build really fancy robot reflexes.


Some Background

Most do-it-yourself robots are built using hobby servo motors. These motors are great for robotics, because you can tell them to move to a particular angle. To accomplish this, the motors measure the difference between the desired position, and the actual position, and try to minimize this. Unfortunately, hobby servo motors do not return the current position back. Returning the position over a digital signal requires an analog-to-digital converter inside the motor, which is too expensive for hobby servos. In addition, hobby servos are designed for model airplanes and steering of model cars or boats. There is usually no obstacle preventing the motor from turning, so there is no need to distinguish between desired and actual position. Rather, these motors typically focus on speed and accuracy.

A hobby servo cannot make a 360° turn, and hence cannot be used for going forward. You can adapt hobby servo motors make full rotations. The result is that the servo motor can now be told to rotate at a specific speed, but it is no longer possible to control the position of the hobby servo by specifying the desired angle.

The servo motors that Lego has shown us, appear to be capable of doing both things. They can make full rotations a specified speeds, or they can move to a specific angle. But how? I am hoping they do it by measuring the angle, and feeding that information back to the controller. The controller then turns the motor until it reaches the desired angle. That’s how I interpret “inbuilt rotation sensors to align speed for precise control”.


Robot Reflexes

If that assumption is true, that means that every motor is also a sensor. You can use the rotation sensors to create really lifelike reflexes on robots. Here's a few seconds from a movie on one of our older research robots (the movie is in .WMV format. Click here to see how to play these files on MacOS or Linux).

The robot in the movie is built using customized hobby servos. The electronics in the servos has been modified to send the current angle back to the controller. As you can see, the controller notices in microseconds when the leg is moving in unexpected ways. As soon at this unwanted motion is above a certain threshold, the controller executes a "stepping reflex". The stepping reflex is very useful when walking on slippery services, to keep the robot from falling flat on its belly. Achieving the same behavior is not possible using other sensors, such as touch sensors. Image that the leg of the robot is resting on a piece of paper. Touch sensors would notice nothing special about this situation. Then, that we gently pull the piece of paper away. Assuming that the leg has a good (rubber) grip on the paper, then the servo may not be able to compensate for the slippage. The servo gets strained, but meanwhile the controller is not aware of the problem because the touch sensor thinks everything is normal. Clearly, the only effective way for the robot to notice this is to monitor the angle inside the joint (servo). Using this kind of low level reflexes is also a very effective way to avoid servo motors to be stressed. Plus, combined with other reflexes, it looks very realistic.

The same kind of sensing can be used when moving an arm, a leg, ... Being able to detect a difference between the expected rotation and the real rotation makes it possible to detect blocked motors, and provides valuable feedback. You can even build whiskers using this principle. In real insects, whiskers are used to feel the environment by moving them around, and feeling where they get blocked.

Tuesday, January 10, 2006

On Lego Mindstorms

Lego has recently announced a new version of their Mindstorms set, Mindstorms NXT. This new announcement is important, because the NXT allows building substantially more complex robots than the RIS 2.0. In particular:

  • The DC motors have been replaced by servo motors. Controlling robots with servo’s simply is a lot easier, which is why hobby servo’s are part of nearly every DIY toy robot. Now, Lego has that part too. With the RIS, it was possible to build your own servo in Lego, but it was imprecise, fragile and used up sensor docks. The introduction of servo motors completely changes the Mindstorms usability.
  • New sensors have been added. For me, the ultrasonic sensor is probably the most important one, although the microphone allows for pretty cool toy effects as well. The fact that the NXT can produce sound is also nice. The touch sensor can be extended with a rod, which makes building complex touch sensors a lot easier. All in all, this is a great in itself. I also hope third parties further extend the sensors available.
  • Wireless Bluetooth. Not only does this allow a PC, PDA or mobile phone to take control of the unit without wires and more stable than using the old IR tower. You can also combine multiple NXT controllers to work together. The limit of Bluetooth is 8 nodes, and since we’ll always want a PC or PDA connectivity, one can combine up to 7 NXT’s in a single robot. That’s 21 servo motors and 28 sensors...

Each of these upgrades is exciting, but together they rock. I believe that I can build versions of most of the research robots I built before, using only out-of-the box lego bricks. Some designs can be built using just one NXT. On the other hand, one of my previous designs would in fact require all 7 NXT bricks just for basic locomotion, but the fact it can be built with Lego Mindstorms NXT is amazing. I’m into robot software, and now I can construct research bodies for my robots using Lego. How great is that!

But that's not all. As a software professional, I did not really work with Lego's graphical development environment, but rather used NQC for development. But I'm excited about Lego's choice to drop their custom environment and work with LabView. LabView is a professional environment that is used to create real software for industrial control systems. It provides project-based development, and is a powerful visual language. From the looks of it, it seems they are using LabView 8's Express Technology. That makes me very wonder how accessible the lower level API's would be, and how easy it would be to add bricks with complex logic under the "Advanced" brick tab. I intend to use the LabView environment as much as possible.

I will make some effort to try to build robots with just one NXT brick whenever possible. I’m really looking forward to posting robots I have built on this website. I intend to be instructive enough so that you can reconstruct my creations using step-by-step instruction. So check back as soon as you get your hands on a Mindstorms NXT box…