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.
I only played a little bit with the first generation they released, and only using that bad visual block language it came bundled with. But one problem I see is that you couldn't specify exact degree turns or amount of motion consistently. For instance, there'd be no way to make a robot that consistently turned 90 degrees and went forward X inches; you're forced into a more biological, reactive method of programming. That's not an entirely bad thing, though it ramps up the level of difficulty, especially in that original block language, don't know about these later ones.
SO YOU'RE GOING TO DIE: The Comic for Dealing with Death
Human labor (so far as the present time) cannot be replaced in many jobs, there is simply currently no way to program a robot to respond to all of the problems that may arise in just about any given "real-world" situation. The thing we need to worry about is how to effectively manage and balance human and robotic labor.
A couple years back, before all the robot fighting shows started popping up, I decided that I wanted to get into robotics to enhance my art projects. I searched everywhere for books and relevant information, but all I found was extremely basic kids books that didn't really tell me anything useful or extremely complex stuff on "muscle wires" and the like. I found there wasn't much of a middle-ground and soon I was onto something else. It appears as though the scene has changed a bit, how much will Lego Mindstorms help me in learning how to create more complex interactive robots?
sig.
Remember that scene in 'The Fifth Element' where all the cute little robots come out of the wall and clean up the broken glass, well I wonder how much trouble it would be to say create a couple of specialty mindstorm bots to do this on command (obviously not environment reactive, but event driven is good enough for me) Hook up a small broom and dustpan to one, hook one up to my vacuum and `viola! I'll never do housework again :)
...I want a rubbermaid...
I combined my lego and my computer. It may not have moved, but that was the whole point. You see, I had a ZX-81 and a 16k RAM pack with a VERY wobbly connection, and lego just did the trick of keeping it in place!
Here's Sun's article on this. Apparently, they managed to squeeze a JVM with multithreading (although no garbage collection) into 16K. Who said Java was big and bloated? :-)
A funny quote:
The robot that they built for the International Space Station, called Jitter, floats around collecting particles of debris. So even though it doesn't have a garbage collector, it is one!
maybe /. should sponsor a MindStorm-athon. A bunch of geeks in the room, 24 hours and lots of caffiene. I'm sure Lego could be convinced to donate the lego's, since they could take those robots and use them for PR and other marketing related uses.
A few years ago, I made a lego mindstorms robot that would automatically fish for me in everquest. I know there were better ways of doing it, but it was pretty cool. ;)
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
check out
http://www-theory.dcs.st-and.ac.uk/IC_Group/resour ces/software/software.shtml
- for the software
and
http://www-theory.dcs.st-and.ac.uk/IC_Group/resour ces/multimedia/multimedia.shtml
for cool movies and videos of the lego robot.
Various different types of learning were played around with ; neural, reinforcement learning , handcoded algorithms....
Those pages are still to be ok'd with my local dept. though, so please email gbb@dcs.(nospam).st-and.ac.uk if you have any questions about them.
To kill two birds with one stone, you should just integrate a Mindstorms robot with a vacuum cleaner and a Flowbee attachment. Then you could use it to cut your hair and lawn.
If you haven't opened those tubs in a few years, the outgassing from the ABS will have created lethal quantities of lethal phosgene gas.
Fortunately, I can take those off your hands, and safely dispose of them, just email me for shipping information.
Take your Mindstorms set to a local school, gather a group of geeks-in-training, and join the First Lego League. The challenges are complex and fun, and it sounds like the programming information and tips in the book would lead to some really great robots.
Best of all, you will be helping kids see that computers can be used for more than just video games and IM.
This is absolutely ridiculous. The Net is no replacement for books. The ease of publishing on the Net is reason enough *not* to rely on the Net for information... how accurate can it be if a 8 year old can slap up a web page? I'm willing to trust a book that has gone through many editors and reviews and has spent a lot of money to be published than I am some silly web page.
The "information wants to be free" thing is just stupid.
The people who make robotic CD duplicating machines are apparently doing pretty well right now.....Just ask Eminem.
20 January 2017: the End of an Error.
I remember how big robotics was supposed to become, and how they would replace all our industrial workers...
And so they did to a great extent. Have you ever seen the assembly line at any auto manufacturerer? Just because a robot doesn't walk on two legs and push a vaccuum doesn't mean it isn't a sophisticated robot.
seem to be basing their new controls on XP or CE
Being as it's early and I'm quickly skimming posts, I first read that as "bashing their new controls on XP or CE" and had this image in my head or robots being so fed up with their host computers... well, you get the idea.
-
The Internet is generally stupid
In the past year I have fallen into the LEGO trap and buy quite a bit. It seems that I've become a piece collector [most pieces are sorted to the extreme] than a set collector. The RIS is a good set but you pay for the RCX unit. A little more money could get you a killer educational resource set.
I also find myself picking up those little sets they have now just to get a few extra gears or something.
Basically, it costs as much as having a killer computer system...you're always upgrading.
Click here for prices on pieces.
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.
Sun didn't invent the LeJOS system, but they certainly do like it.
l en ge/photos.html
l en ge/
;-)
Last year, a bunch of undergraduates and I
participated in the Java Lego Mindstorm challenge, a particularly silly competition between Stanford, UC Berkeley, and UC Santa Cruz. Berkeley won with a money-sorter.
Anyway, working with the kit was really fun and leJOS worked well. Check out the photos:
http://www.sun.com/developers/evangcentral/chal
Or read about the event:
http://www.sun.com/developers/evangcentral/chal
LeJOS really is all it's cracked up to be. It provides a very familiar (for Java junkies) interface to the sensors, motors, etc. of the lego mindstorms kit. Of course, you still need some fine muscle control in order to be able to assemble the legos. The undergrads did that part.
How does memory management work without garbage collection? Is there an explicit delete, or is it a matter of once allocated, always allocated?
Karma: Professionally Doomed (mostly affected by inability to keep opinions to self)
Just wanted to show off my creations.
My webcam
You can see it working or play with ithere
And my hamster powered 32bit microprocessor
Mouse powered Chips, Open source Processors and Lego
Here's one.