[chbot] Introduction & Lego NXT stuff
cdhmanning at gmail.com
Thu Aug 21 00:02:37 BST 2008
I am Charles Manning. I live near Whitecliffs (about 70km inland from
I am the "dad" refered to at the August 20th meeting. I have been involved
in robotics for quite a few years and for a time I worked at Trimble
Navigation designing and programming tractor guidance and steering systems.
That's basically turning a tractor into a big, big, robot! We use gyros,
accelerometers and GPS as the input sensors. Obviously these systems have to
be very reliable because crashing one can cause a lot of damage.
The first time I turned on a new system I was testing I had connected the
motor the wrong way around and crashed into a ditch and had to get towed
We have both Lego RCX and NXT robots. One of the things that really
frustrates me about most robot programming languages (Basic etc) is that
these don't structure the code well. That made me very interested in Java
and the Lejos project in particular: http://lejos.sourceforge.net/
I contacted the Lejos programmers but they had not yet done a port to NXT so
I decided to start the effort because I had a lot of experience with the
microcontroller used in the NXT. Here's a picture of an NXT with the
plastics off:: http://users.actrix.co.nz/manningc/lejos_nxt.jpg
As you can see there's a ribbon cable out the side that is connected to the
debugger unit used to load in test code.
All the low level code is written in C and assembler. It needs to be very
fast to get everything done. The NXT processes up to about 50,000 interrupts
per second. This low-level code then runs a very tight Java VM allowing
people to write Java code for the robot.
The Java code compiles to classes. When you download a new program you just
download the classes that are not already on the system. Since most programs
share the same base classes (eg. motor control) this means that you can
normally stuff a lot of classes into the robot.
Java is a very well structured language and this has lead to lots of modules
being written including quite sophisticated things like behaviour based
Lego published the circuit diagrams for the NXT which makes it a lot easier
for people to make their own sensors. I will maybe run people through how
to do this.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Chchrobotics