## Jun 15, 2006

### NXT Book on Amazon

Congrats, Brian! (If your publisher needs a technical editor, give 'em my name - been a tech editor for 9 years - Jim)

Maximum LEGO NXT

David Levy said...

I recently started a Robotics Program at my son's school. We are currently awaiting the shipment of about 20 NXT base sets. For the first club meeting, I brought in an RCX vehicle that contained most of the Lejos code from Brian's first book:

http://www.amazon.com/gp/product/0130093645/qid=1150380636/sr=2-2/ref=pd_bbs_b_2_2/002-3326982-2888830?s=books&v=glance&n=283155

I used a compass sensor for navigation and a single rotational sensor for odemetry. I had taped a large x/y graph on the floor and marked off several coordinates. The vehicle was able to hit its marks and return to 0,0 with a high degree of accuracy. I then popped on a proximity sensor and ran through the same demo with obstacles. Lejos's subsumption framework made this relatively easy to do via an "AvoidObstacle" behavior that would plot interim coordinates. The vehicle was still able to make all its intended marks and return to 0,0.

I had also given some of the teachers the demo with a breakdown of the math.

Odometer: Wheel Diameter * PI * rotation count = distance traveled

Compute required distance from coordinates 0,0 to 100,100:
Pythagorean 100^2 + 100^2 = hypotenuse

Compute the angle A that the vehicle needs to turn to:
Sin A = opposite / hypotenuse = 100 / 141.24 = 0.707
A = Arcsin(0.707)
A = 45 degrees

Compass Caveat: Although extremely accurate, if the floor has a metal beam or duct under it, you can be off by 45 degrees! I had brought in a hand compass to verify the floor space.

I look forward to Brian's new book esp. the Bluetooth GPS stuff.

-David

Matthias Paul Scholz said...

Well, now I'm really curious!
The title of the book indicates some kind of Java environment for the NXT.
For aught I know, something like that is not existing presently yet.
I'm not aware of lead time for a book, but as its release is targeted for New Year 2007, I'm apt to imagine that such a Java NXT platform is to come into being in the next two or three months then, isn't it?
Hence, is there any work going on in respect to this already?
Well, will have to ask Brian...

After all, I'm looking forward to this book - his one about RCX programming with leJOS was very worthwhile to read.

Matthias Paul

David Levy said...

It's hard to speculate. There was some chatter in the lejos discussion board back when NXT was first announced:

http://sourceforge.net/mailarchive/forum.php?forum_id=552&max_rows=25&style=ultimate&viewmonth=200601

-David