Core Lego Mindstorms Programming
The Mindstorms kit is for those people who have always wanted to play with robots, but couldn't find any time between work and home. In short, its a kit tailor made for programmers, not for those people with Mensa level IQs who know how to build an H-bridge circuit or a voltage regulator from scratch. Probably the easiest and most understood programming language right now is Java, and that is the language this book focuses on. The book introduces leJOS, which is a Java Virtual Machine (JVM) and operating system rolled into one. It's the first JVM I've seen to run in the tiny space of only 32kb. As lore has it, back when Java was known as "Oak," it was meant as a language to program small appliances such as remote controls, microwaves, televisions, VCRs and other household electronics. In all that time I've never seen Java actually used in such small devices until now.
This book starts out slowly, for people who are just cracking open the box. It gives a complete, in-depth overview of the hardware, as well as the included software -- which the author basically advises you toss away if you have any interest in serious robot programming. Surprisingly (or perhaps not surprisingly) the tiny RCX brick contains as much horsepower as the on-board computers for the Apollo moon missions. The brick contains 32kB of RAM, which seems small at first but when you realize the memory older computers like the Apple II and TRS-80 had, this is an ample amount. Some of those older games had a lot going on in terms of AI and graphics, so for robot applications without graphics it's a lot of memory. In the spirit of Bill Gates, 32kB should be enough for anybody. There are also some good (though prohibitively costly) third-party sensors that, if you owned them all, would give you most of the sensing abilities that old Spock had with his tricorder.
leJOS is a product of Sourceforge, and quite popular. The leJOS language, which is essentially Java with some cut-backs, is covered in depth. It has most of the features of the real Java language, barring object reflection and garbage collection. I haven't heard of any official "smallest JVM" contest but if there was one I'm sure leJOS would be one of the contenders. It definitely surpasses Sun Microsystems J2ME in the micro category. Setup is fairly straight forward and the author even includes a free IDE that works great with the leJOS.
Once past the introductory material, the book contains some truly interesting projects. In a way, the book is similar to the general robotics book Mobile Robots: Inspiration to Implementation (Jones, Seiger, Flynn), except it's for the Mindstorms crowd. There are many robots to build, including a wall-following robot, a robot that navigates with a real compass, a robot you can control from a web page, and some surprisingly in-depth hacking tricks. Unlike books which only give suggestions on how to build robots, this book includes complete building instructions and code listings for every project. The fact that Lego parts and RCX bricks (the processing center of a Lego Mindstorms robot) are identical to each other allows this to be possible. It contains not just 'how to' information, but expands into robot theory as well. Books such as Mobile Robots have to be general and ambiguous at times because the authors don't know what kind of parts a reader will be able to obtain. In a way, this is the genius of Lego Mindstorms - the ability for people to pass robot recipes to one another.
The final two chapters really kick the leJOS language into overdrive. These sections are where geeks thrive. Chapter 11 deals with connecting the RCX brick to the Internet. Apparently the leJOS language has built in classes for sending data, and even a handy Java bean that's useful for embedding JSP web pages. These projects are described down to the last detail, including showing how to set up a free Resin server to serve the web pages. Unfortunately the author does not take the time to explain much of anything with JSP, so beyond his JSP examples you may not get very far. Readers will be forced to look elsewhere if they want to learn more about JSP.
The final chapter really goes hard core. It contains some so-so information about how to hack leJOS, changing classes or removing methods to save memory. The real kicker is a feature of the leJOS JVM I was not aware of: leJOS is capable of running almost ANY language. Apparently even the official JVM is capable of running a multitude of third-party developed languages, including Fortran, C, and weird custom languages such as IBM's NetRexx. All that's required are the development tools to compile the source code into Java bytecode, and these compilers exist in abundance. There are no fewer than 100 such available languages, all free for the downloading.
Illustrations in the book are frequent and helpful, but somewhat plain. Usually they consist of line drawings without much artistic merit. The 3-D renders of the robots are exceptional, however. Each step in building the robots has been rendered, making the Lego parts very easy to see. The steps are well laid out, and the new parts for each step are suspended in the corner and labelled. Thankfully, all models in the book can be built with any version of the Robotics Invention System kit.
If you are a programmer who has an impulse to experiment with robots, but don't want to get solder on your fingers building from scratch, this book will get you to where you want to go. And if you do want to get some solder burns, there's even a few projects in here just for you. Overall the book is a joy to read. The author obviously loves robotics and his enthusiasm shows on every page. The tone is loose but contains a lot of detail presented in an easy-to-digest manner. If you want to dabble in robotics then Lego Mindstorms is the easiest way to do it and having this book is a good way to get started.
You can purchase Core Lego Mindstorms at bn.com. You can read your own book reviews in this space by submitting your reviews after reading the book review guidelines.
lego porn! http://drew.corrupt.net/lp/index.html
aus.music.scrapbook