Thursday, May 18, 2006

German-Spoken Blogs

For my readers who speak German, I have added a list of all German-spoken blogs. Right now, that's only one, but let me know if there are others.

Filip.

The Slug

There are lots of really great robots being built using NXT bricks. Case in point: The Slug.

Gastropoda robotica Scolcii (aka The Slug)


The Lego Mindstorms NXT provides the ability to create anything you like. Although there are many other robotics kits out there, Lego has so many different parts that the imagination of the builder is nearly the only limit. With just 100 MDP participants, we already see a wide variety of robots.

Next week, I'm on holiday for 10 days (no postings then). If only I had an NXT set, I could feed the fish automatically for those 10 days. Building a fish feeder doesn't seem very hard. If I had another NXT set, I could make it respond to motion (ultrasonic sensor), and use my mobile phone to send me a text message, or call me to allow me to listen what is going on.

Off course, I could do all of these things with non-Lego solutions. But it is just a lot of fun to try it out. And this is the reason why I am so enthousiastic about Lego Mindstorms NXT. It is not that the other robot building sets aren't impressive. It is just that NXT is the most versatile.

That, and off course the fact that other kits often forget the programming side.

Monday, May 08, 2006

NXT Domino Robot

As his primary MDP project, Dave Astolfo decided to build a domino-laying robot. This robot is an NXT version of the RCX domino robot he previously built for the book "10 Cool Lego Mindstorms Ultimate Builders Projects". You can see it in action here.


Click the picture to see the video.


Dave also published the NXT software he wrote. You can see that even a robot performing a real function doesn't require complex software.


Click the picture to see the complete program.


The domino robot is also an interesting demonstration of how robots are different using Lego Mindstorms NXT. You can see earlier versions created using Lego Mindstorms RIS (RCX) here and here. According to Dave, the new NXT version is faster and more agile than the older RCX versions. I think the new design also looks "cleaner".

The NXT version takes advantage of the wheel encoding to position the domino correctly, by driving backward by the amount it drove forward, minus 70 degrees. That's all that is needed to put the domino within range of the previous domino.

I can't wait to see the version that uses an extra motor to avoid driving back and forth, and follows a curved line.

Wednesday, May 03, 2006

Open European Championship

A short reminder for my European readers: this weekend is the First Lego League Open European Championship in Eindhoven, the Netherlands. The European Championship is the official celebration to complete the First Lego League season 2005. The best teams of all countries worldwide that participated in FLL 2005, are invited.

I'm going to be there too, but only on Sunday before lunch. I'll be the guy with the "bNXT" T-shirt on! Hope to see you there.

Here's the program:

DateTimeEvent
Wed,May 312.00 - ...First teams arrive in Eindhoven
Fri,May 518.00 - ...Opening Cermonies/Show
19.00 - 21.00Opening party for teams
Sat,May 611.00 - 16.00Judging Sessions and Qualifying Rounds
12.30 - 14.00Lunch
Sun,May 710.00 - 15.00Judging Sessions and Qualifying Rounds
12.30 - 14.00Lunch
15.00 - 16.00Quarter-, Semi-finals and finals
19.00 - 20.00Final Award Show
20.00 - 20.30End Ceremonies Show
Mon,May 809.00 - 17.00Teams can have a tourist visit to Amsterdam
- First teams leave

For more information, travel instructions, and much more, check out the FLL Open European Championship website: http://www.firstlegoleague.org/oec/

Want to participate in the 2006 season? You can find out more or sign up here.

NXT to NXT Communications (updated)

Here is an interesting video by Steve Hassenplug on NXT to NXT communications (he is probably one of the few people on the planet that has more than one NXT set!). He has constructed a "remote control" using one NXT brick, and a "car" using another NXT brick. The remote control drives the car using the Bluetooth link between the NXT sets. The software to do it is rather straight forward.


Click picture to play video


This looks like an excellent challenge to have two kids do in class or as a home assignment! Not too hard, great fun to play with, and excellent to learn about the wireless communication link.

UPDATE:

If you look closely, you'll notice that Steve actually used the motors as input channels. By turning the motor, and measuring the angle, he measures how much the user has turned the dials on the remote control.

Here's what Steve said about this on LUGnet:
The motors offer little resistance when used this way. However, there's something else which I think is kind of cool. If you look close, when I let go of the controller, the paddles return to the middle, and the car stops. Using just one block at the start of the program, I set the motor to "stay there" so when you push the paddle forward, it springs back. The steering wheel does the same. Actually, in the latest version of my program, when you let go of the steering wheel, the car's wheels straighten out. The more you turn it, the more the wheels turn.

He also mentioned that stability of the Bluetooth was excellent, even in a room crowded with other NXTs, like at the First Lego League World Festival.

Tuesday, May 02, 2006

HiTechnic's New Light Sensor

Lego Mindstorms NXT has some great sensors right out of the box. An ultrasonic sensor allows you to measure the distance to obstacles, and a light sensor detects the amount of light, and its color. But now, HiTechnic is introducing a better light sensor.

Why A New Light Sensor?

The Lego Mindstorms NXT light sensor can determine the color of a ball (and other surfaces, off course). To do that, it measures the amount of light entering the sensor. This light is the combination of lights and sun in the room, and the amount of light from its own light, a red LED. To accurately measure the color of the ball, you need to measure how much of a particular color is reflected. One way of detecting color is by illuminating the object with a particular color, and then seeing how much extra is reflected.

The LED on the Lego Mindstorms NXT light sensor can be switched on and off under software control, so in principle, it should be possible to determine the difference between ambient light and LED light being returned by the ball. But in practice, this kind of "ambient light cancellation" process does not work well (because the sensor is highly nonlinear, the LED is not very bright, only a red LED is used which distorts the colors, and the NXT measurement cycle is quite slow).

To overcome the sensor limitations, the Lego Mindstorms NXT set comes with a blue and red ball. These colors are amongst the easiest to distinguish colors for the Lego Mindstorms NXT light sensors.

HiTechnic takes a different approach by introducing their new NXT Compatible Color Sensor. The sensor looks quite similar to Lego's light sensor, but the HiTechnic sensor allows you to measure any color, with higher resolution, and you can measure them a lot faster. The HiTechnic NXT Compatible Color Sensor can be used for tasks like accurate color recognition and object detection broadly independent of ambient illumination. It is not necessary to "recalibrate" the NXT program each time it is run due to varying light levels at different locations, which makes it a lot simpler to program. In short, you can make your robot do cooler stuff, but keep your software simpler.

How It Works

The HiTechnic NXT Compatible Color Sensor works by pulsing the target surface fast, with three colored LEDs, one red, one green and one blue. The LEDs are brighter than the one used by Lego. The difference between ambient illumination and the increase due to each light source output is used to measure the target surface’s (our ball) reflection for each color.

The three color values are further processed to correct for the spread of each LED’s spectral output. For each color measurment, three values are returned to the NXT brick: the red level, the green level, and the blue level. Each color level is returned as a value between 0 and 255. For example, if values returned were red = 255, green = 255, blue = 0, the target color is yellow. The sensor updates the color data at a rate of 100 samples per second, which means you can use it while the robot is driving and still notice color differences.

Applying It to Robots

The Lego Mindstorms robot that follows the black line is a well known application of the Lego light sensor. Using HiTechnic's light sensor, you could draw a much more complicated track. You could draw a blue, red, and green track, partially overlapping, and have the robot choose which colors he will follow.

Or you could create a robot that tries to race along the track. A green line marks the inside of the track, blue marks the outside border, and red marks signal dangerous curves ahead (the more red, the more dangerous the curve is). Using this information, you could try to have your robot car go as fast as possible. You could even throw in the ultrasonic sensor to avoid bumping into other cars.

If you are looking for a really cool and complex robot tasks, you could build a robot ant farm. Imagine adding color marker pens to your robot. When your robot is just randomly exploring, it colors green. When it has found a food source and returns home, it colors red. And when the food source is depleted and returns home, the robot colors blue. Using these color schemes to leave trails of "pheromones" could create really complex robot behavior. By the way, because the Mindstorms NXT has angle encoders on its tracks, you could try to cut corners, and effectively implement "ant colony optimization" to find the shortest route to the food source. And the "really intelligent robot" fun is only starting at that point.

Or you could create a color coded world, where the robot drives on a large piece of paper. By varying the colors cleverly, each position could have a unique color the robot could read. When the robot looks down, he has an absolute measurement of his location. Voila, instant indoor GPS!

And these are just applications of having a color sensor look down. How about mounting the color sensor inside a robot hand, to better understand what it is picking up. But there is no need to make things that complicated. The applications of the new HiTechnic sensor are only limited by how colorful your imagination is!

Calibration

The HiTechnic Color Sensor can be calibrated by the NXT program in two ways.

Black level calibration may be used to correct for reflections that come from your own robot. It takes about 1 second to perform, and there should be no obstacles present for at least 50 cm (other than the robot itself).

White balance calibration takes about 0.25 seconds, and may be used to balance the sensitivity of the sensor for each of the three LED outputs when illuminating a white target at a specified distance (normally about 1,5 cm).

Calibration data is stored in non-volatile memory and will be retrieved each time power is applied to the sensor.

Availability

The price has not yet been announced. The sensor should be available in September of this year.

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.

Hardware

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.

Monday, May 01, 2006

NXT Motor Hardware & Software

Two postings bring a lot of information about the NXT Motor.

Philippe Hurbain (aka Philo) brings measurements and insights into the performance of the NXT motors, when used in the NXT set with both regular batteries and ordinary rechargeble batteries. The Lego Mindstorms firmware and mechanics is done really well, and the motors perform much more predictable than its RCX predecessors. The NXT can even correct for the loss of power that results from using the 7.2V of rechargeable batteries (as opposed to the 9V from regular batteries). There are also photo's on the internals of a real NXT motor. (One piece of advice to take away: never connect an NXT motor to an RCX brick).

Jim Kelly at The NXT Step complements nicely with a discussion on how to control an NXT motor using the Lego Mindstorms NXT software.


Click image for larger view

Another Biped

Here is a nice biped dinosaur with a long tale, built using NXT by Menno Gorter. The robot is aptly called a Nextosaurus:


Click image for larger view


More pictures of this robot can be found here. Menno also built a crab, which can be seen here.

New NXT Biped & LDraw

Today should be a day with an explosion of Lego Mindstorms NXT news. I'll try to keep track of the more interesting news bits.

Some LDraw people were on de MDP. LDraw is a software package that allows you to recreate your Lego creations digitally. That is just what you need if you want to publish Lego-like drawings of your creations, and related building instructions. Apparently, all of the new Lego Mindstorms NXT parts are now unofficially available within LDraw.

Kevin Clague was one of the MDP participants, and the creation he has worked on is a very nice biped rooster. Check out his site for more information.


Click image to enlarge


But here's the real killer. Just look at how easy his control program is. That is nothing short of amazing. This is precisely why I am so excited about NXT as a robot platform.


Click image to enlarge