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 remember how big robotics was supposed to become, and how they would replace all our industrial workers...
How many robot companies went belly up from 1980-early 90's?
lego porn! http://drew.corrupt.net/lp/index.html
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
Book at Bookpool.com: $25.95
Book at Amazon.com: $27.99
Book at bn.com: $31.99
Realizing you overpaid: priceless.
I buy a Lego Mindstorms kit when it's possible to create a selfcontrolled lawnmover robot with it. And it should be able to cut my hair too.
I'd like to try this out and combine some of the information in this book with my two 15 gallon tubs full of Legos from my childhood.
If when my boy is old enough I could only choose one toy for him to play with, it would undoubtedly be Legos.
Duris MUD - The best pkill MUD. Ever.
Now I finally have a good reason/motivation to open up those huge rubbermaid tubs of Legos sitting my closet at home.
;)
Imagine a beowulf cluster of these robots
# fuser -v
#
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.
- posters that spell Microsoft with a $ or spell it MicroCrap or something.
- posters that glorify a feature that Linux has that BSD or Solaris as had for years, and list this reason as the most important reason to switch over
- posters that say Slackware is better because "you have to compile all of the applications for yourself"
- Rob Malda's arrogance
- frequent spelling and grammar mistakes. I'm not talking something really obscure or a minor technicallity in English, either. I'm talking substituting "loose" for "lose" or "they're"/"their"/"there". Really easily corrected mistakes. Any halfway decent fifth grader could pick up on these errors.
- people that post a mirror to a site that has been Slashdotted, which normally would be nice, but is hosted on a cable modem that is soon Slashdotted
- page widening
- random quashing of posts that don't agree with the Slashdot mindset.
- really annoying sigs
- unhumorous jokes that have to be "explained" to the audience. If your joke has to be explained, it's not funny.
- "BOYCOTT RIAA" and "I can't wait to see Episode II!" all in the same day.
- Rob Malda's childish obsession with legos.
- the Slashdot crew doesn't have any other jobs other than Slashdot, yet it seems it was better run when Rob was running it on a Multia in college in his spare time.
- the "page limit" with the subscription.
- The expulsion of Signal 11.
- ranting, paranoid articles whenever there APPEARS to be a GPL violation, with no verification whatsoever. Just a bunch of ranting posts about freedom.
- for that matter, no verification of articles at all. I wish I could count the number of times Slashdot's been scammed on two hands, but it's been so many.
- April Fool's articles on Slashdot. THESE AREN'T FUNNY. I wasn't going to explain, but whatever. Okay, let's say you run a website. On April Fool's, you post, say, ONE or TWO fake pieces of news along with the real news. This way, some people are fooled. By posting ALL fake news and "jokes", no one falls for the prank.
- no one buys Loki's games, but there is a big mystery when they go out of business.
- no NNTP frontend to Slashdot.
- direct links to bugzilla
- continuing tightening of the "troll filters" to the point where even normal posts are rejected by some stupid criteria
- self righteous posters who want everything under the sun to be Open Source, even though they have never written a line of code in their life
- whenever an article on a new scripting language is posted, all of the C users chime in "but it's not as fast as C". shortly after, all the assembly users chime in "assembly is the fastest". predictably, right after that, someone says "why don't we all just use machine code?"
- anecdotes on your grandmother using Linux to check her email and whatnot. this ALONE proves that Linux is better than Windows for ALL uses.
- cult-like devotion to Linux. reserve your fanaticism for a church, not a kernel.
- someone is not less of a person if they don't use Unix.
- posters who think that BeOS is having "a bad moment" and will surely rise to defeat all other operating systems
- posters who think Palm will open the source to BeOS for no reason at all
- people who think that Amiga isn't dead. The new virtual Amiga doesn't count.
- people who think that OS/2 isn't dead. 'Ecomstation' doesn't count.
- people who bemoan the loss of OS/2 while thinking it was a big conspiracy, completely IGNORING the fact that IBM did not advertise. we all KNOW OS/2 was technically superior to Windows at the time. You don't have to bedazzle us with tales of "running all the latest Windows and DOS applications aside native OS/2 apps". We've heard it all before. We know it WAS better.
- people who think that this is the last year ever we'll ever have to hire C++ programmers, because as we all know, Java is going to "kill it off"
- this is a good one. Completely expositionary articles such as "Surprised by Weath" in which ESR BRAGGED about how rich he was and how he wasn't going to give us any money. NO SIR.
- bitchslapping
- benchmarks that pit, say, Linux (lastest revision) against FreeBSD 3.0 or something old and useless.
- how banner ads for the site only link to other OSDN sites
- any links to nytimes.com
- when someone writes a comment with ^H to signify deletions
- the moderation $rtbl
- meta moderation
- people that spell Red Hat as "RedCrap"
C - A language that combines the speed of assembly with the ease of use of assembly.
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. ;)
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.
dont get me wrong, i think all of these new technologies for modern publishing are great, they just will never entirely replace printed material.
btw, where is this paperless office ive been hearing about for ages?
I want 2D games back.
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.
face it, u just cheap...
Books may be archaic, but I'd rather get the feel of a subject reading a book on my couch than scrolling through a browser window on my computer.
Its hard to replace books because they're so simple. The book may be replaced by Linux 17.8, but not linux 2.5.
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.
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.
I'd never heard that before, but I am realizing what a good idea it is. Admittedly I am not a programmer, but I do have a working knowledge of java, and I know a lot of people like me. How cool would it be if I could easily customize code for my appliances? I may buy this Lego kit just so I can show people the future usefulness of continuing CS education. (And to build cool stuff and show the gigantabox of Legos sits in my utility room for a reason... who can throw away Legos?)
Liora
...unless you like raunchy (non-Lego related) popup windows.
I've just followed the link and spent a minute shutting down popping windows. Thanks A**h**e!
aus.music.scrapbook
The vacuum cleaner is one idea. The book and mass production hints of lower costs to produce the materials. We could expect these products to reach everyday uses soon.
The other day while at the hardware store there is one familar brand of sprinklers. The brand name is LEGO. Cool. Horticulture is one area we could use some low cost robotic smarts. One reason is to conserve water with the equipment that is smarter than the simple six relay timer. Another idea is the sprinkler itself with more smarts. Could program sprinklers to spray in square shapes, ovals, half cones, or thin and long rectangles instead of circles. Could have the sprinklers spray lighty on one side and heavy on the other side.
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.
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.
Not used a mobile phone or pda recently then?
I know how much Lego kits cost - but do you need to buy more than one of the Lego sets to do any of the "fun" projects in the book? Any recommendations?
The name LEGO came from the the sentence in Danish 'Lej Godt', meaning "Play Well". It was dreamt up by the founder Kirk Kristiansen during a boat trip to England when he was planning to present the bricks to someone.
In Danish you do not add a plural, so maybe English need to follow same rule.
Help fight continental drift.
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.
I would like to point out that the reason stone tablets were replaced by quill and parchment has more to do with the portability of stone tablets than anything else. When computer systems weigh less than paper, sugnificantly less, maybe we'll move on.
Also, all of the trees that died in the production of books had it coming to them, don't be fooled, a tree will kill you and your family if you give it the chance.
(there must be an official Lego challenge web site out there somewhere...)
This thread topic made me think of something I would like to build someday - call it 'LegoRover'.
I travel a lot. Here is what LegoRover would do for me while I'm gone:
> Periodically crawl around my house, either using remote issued directional command/control (more on that below), or using a pre-programmed or semi-random navigational algorithm.
> Always finish a crawl by returning and reattaching to a battery charging station
> During the crawl capture environmental info like: digital stills or mpegs (a small mounted digital camera?); live video feed; sound recordings; temperature; etc.
> transmit environemtal info to base station PC in house
> LegoRover is a home LAN network node - use a wi-fi? connection to transmit live command control feed to LegoRover and transmit live video/sound feed to internet connected base station PC?
>(see where this is going?...) - from my hotel room somewhere, I can access my home net - load/view stored rover data from this morning's programmed crawl, then turn on the live video feed and starting driving LegoRover around the house for a looksee.
BRAIN YOUR USE
The whole *POINT* or the net is the free exchange of information. If you do research for ANYTHING and rely SOLEY on ONE SOURCE of information no matter if it's the net or a book or your neighbor's best friend's uncle's cousin's doctor you already have more problems than any 8 year old web publishing kid!
I never do housework *now*, and I don't have robots. You too can do this with a special technique I like to call 'ignore', which works just as well, and is pretty cheap.
Do remember to put on some kind of footwear, though. And bring a shovel.
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.
trees have been known to swallow hobbits and
small children...all the more reason why you
should never go hiking in deep forest by
yourself...
if a tree falls in the woods and no one is there
to hear it, does it actually make a sound?
before checking user's record :
bruzasd
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
... Hmmm, rubbermaid and robotic lego ... Robotic Rubbermaid ... Dhoppp, sharp square lego blocks!
GPS seems like a good way to keep track of where robots are. We'd just have to launch N Martian GPS satellites, and bing, everyone's happy.
This way your robots can all leave the vicinity of the lander without getting lost.
My amazing wife - Artist, Author, Philosopher - Laurie M
i recommend all users of lego mindstorm the following book:
;)
see amazon
understanding intelligence by pfeifer and scheier. mindstorms are nice for these researches. i have read it and i promise you that you will laugh at traditional robotics research afterwards
there is an inferno (as in the operating system) alternative to mindstorms progamming:r cx/index.html
http://www.vitanuova.com/inferno/co/