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.
The biggest (Fanuc) are still going strong. I suspect that a lot of their business was in the CNC controls area they had some neat stuff like moving from just G codes to the interactive/graphical FAPT programming. I've been out of the CAM business for a while now and looking at their site now, they seem to be basing their new controls on XP or CE. Could be interesting in your $10,00,000 5 axis laser cutter.
The Day Today - Game Warden to the Events Rhino
They do have rotation sensors now which are very accurate...if you need more accuracy, just change the gearing ratios.
The sensors count 16 ticks/rotation...just change the gears to make it count 160 ticks/rotation or 1600....the accuracy is there for anything you make with lego.
This may mean, as said, the difficulty is ramped up a little - but the effect will be that the results will be a lot more robust and rewarding. Otherwise beginners in the field may spend weeks on their cd autochanger, find it becomes uncalibrated after 2 cds and give up. If robotics is going to explode into the field everyone wants it to, it's best that best practises are forced now, not later.
That is why you always reset to a known point with robotics...there will be drift in mechanical instruments and you will have to reset to a known point. I agree with good practices being forced now as well, but you can also use the parts given to you. No part will be 100% accurate but that doesn't mean you should dismiss it.
Carpenters know that if you want to cut a 16' length of wood into 4 foot sections, you measure 4' from the end and then 8' from the end and then 12' from the end...not 4' then another 4' then another 4'. The measuring tape is extremely accurate if used correctly, just like the sensors in the robotics set.
20 January 2017: the End of an Error.
I recently bought a mindstorms set along with the core mindstorms book. I've found it all great, but the standard Lego software only works with Win98/ME.
Under Linux the problem is that the Robot Invention kit 2.0 only has a USB infrared tower to download programs to your lego brick - v1.5 and 1.0 had serial towers where were easy to access from Linux.
The setup I've got currently is Linux with VMWare 3.1 Running Win98 - that way I can get transfer programs using the USB support from the Win98 and USB support from VMware 3.1.
Its not a great setup but it means I only have to run one program, the lejos transfer program in my Win98 sandbox. (I couldn't get the main lego program to run under VMWare/Win98 - when it attempted to access the usb I just got segmentation violations and vmware disappeared!)
There is a project at sourceforge - legousb.sourceforge.net to add the usb support for the lego tower to linux but its not very advanced.
Overall if you know java, then programming mindstorms using lejos is a breeze. The book for me has been an excellent guide to both java/mindstorm programming, and the types of extra equipment such as sensors that make everything more enjoyable. There are even projects in the book to build distance sensors using the Sharp GP2D12 sensor and a compass sensor.
The book also touchs on Behavior Control Theory and Navigation theory, and shows how the lejos java API provides you with classes that implement these concepts.
If you know java and want to use mindstorms, then this book is a must.