Tuesday, May 02, 2006

Lego's Open Source Announcement

Yesterday, Lego made an official commitment to provide their firmware as open source, and provide software, hardware and bluetooth developer kits. These words may be clear enough for hackers, but what does it mean for the rest of us?

The Development Environment Is Not Open Source

Lego Mindstorms NXT comes with a very nice software development environment based on LabView. It is much better than the software that comes with the retail version of Lego Mindstorms RIS (RCX). Some will reject LabView because it is just "dragging pictures", and in their view not "programming". But it should be remembered that LabView is very popular with professional embedded programmers. LabView costs between $995 and $4300, and is used by NASA, ESA, Defense, Boeing, Airbus, Tata, you name it. In your Lego box, you actually get a (light) version of that software to program your robots. Don't put it aside on a whim.

As you can imagine, LabView is not open source, and is not likely to be open source in the future. It is a commercial computer language that compiles your program, in Lego's case to an intermediate language, which we'll call "Lego Byte Code".

The Kernel is Open Source

Large operating systems like Windows, Linux and Mac OS X have a tiny core part, called the kernel, that executes the most critical tasks. On limited systems like the NXT brick, the kernel is the operating system. The Lego kernel continuously monitors all the ports, controls the motors, reads the sensors, listens to communication channels and interacts with you via the screen. It also executes the Lego Byte Code program that is loaded. The kernel is loaded on your NXT when it ships to you, hence the name "firmware".

The announcement Lego has made, is that this firmware will be open source. In other words, you can change it as you wish, and load it to the NXT as its new operating system.

Should You Care?

If you are a beginning user, you might actually not care about the open source announcement. By comparison, if all you do on your regular computer is surf the internet in a browser, you may not care a lot whether your operating system is open source (e.g. Linux) or not (e.g. Windows/Mac OS X), especially since the cost of Windows/Mac OS X is included in the price when you bought your computer.

If you are an NXT advanced user, you might care. You might feel that the kernel could be written better (or just different), or could do things in some other way.

But the most likely users who care, are those that build new programming languages for Lego Mindstorms NXT or extend existing programming languages. By being able to access the kernel, they can extend the operating system to be more powerful and to better support their particular language. Then, as a beginning user, if you want to use the more powerful version, you can load the associated operating system to your NXT brick, and enjoy the full power of the language.

Is Lego's Software Bad?

I haven't dissected their kernel (yet), so I might be jumping to conclusions. But the fact that LabView is the basis of the language, and the kernel executes those programs, certainly indicates that the Lego software that comes in the box is actually very good.

On the other hand, the development time of NXT was short, and there are undoubtedly tradeoffs that even the internal team would have liked to improve. Perhaps some functions could be made more versatile, more adaptive, cleverer, etceteras. By making the kernel open source, highly advanced users can investigate these options, and experiment with them.

Who knows, perhaps if there ever is a NXT 2.0, Lego might reuse some of the results these advanced users have achieved. That's how the ultrasonic sensor that comes with the current NXT was created.


Another important aspect that Lego mentions is the software, hardware and bluetooth developer kits. Essentially, this means that Lego will teach you how to hack their system.

Do you want to create your own sensor? Lego will provide you with all the documents you need to be able to do so, and integrate with the NXT as if it was a native sensor. Personally, I don't enjoy building electronics as much as building software, but I look forward to buying and using third party sensors, motors, and other electronics parts. The offerings by HiTechnic are certainly already very enticing, but perhaps your sensor will be on my list too.


Post a Comment

Subscribe to Post Comments [Atom]

Links to this post:

Create a Link

<< Home