LEGO Mindstorms NXT

The ISL acquired ten (10) LEGO Mindstorms NXT kits in Spring 2007. These kits will be used primarily for intelligent systems research.

Logs

Okay, I read the README.TXT that came with the file icommand-0.5.zip and it states that installing iCommand requires

  1. Java SDK
  2. Eclipse (optional IDE, but recommended)
  3. RXTX (a package that allows communication)
  4. and setting up a Bluetooth COM port - of which the README.TXT file recommends the following:
    1. Instructions for setting up/testing Bluetooth: http://nxt.ivorycity.com
    2. Instructions for serial service: http://wass.homelinux.net/howtos/Comm_How-To.shtml

but I am confused because the README.TXT file also talks about RXTX relative to MSwin and Mac OSX, and not with Linux. So, from the RXTX website, I downloaded the Linux version that comes without Sun's CommAPI (namespace gnu.io), which comes as a ZIP file that extracts into a directory named rxtx-2.1-7-bins-r2. Installation requires the following (commands assume they are typed from the rxtx-2.1-7-bins-r2 directory):

  1. RXTXcomm.jar goes in /jre/lib/ext (note longer destination path below)
        sudo mv RXTXcomm.jar /usr/lib/jvm/java-1.5.0-sun/jre/lib/ext
  2. librxtxSerial.so goes in /jre/lib/[machine type] (i386 for instance)
        sudo mv ./Linux/i686-unknown-linux-gnu/librxtxSerial.so /usr/lib/jvm/java-1.5.0-sun/jre/lib/i386

The installation file also points out that one needs to "[m]ake sure the user is in group lock or uucp so lockfiles work." Additionally, based on my 01-28-07 log, it appears that the Mac OSX path /Library/Java/Extensions is the same as /usr/lib/jvm/java-1.5.0-sun/jre/lib/ext in Ubuntu.


Posted on January 29, 2007

back to top

Taking a break from setting up Bluetooth capabilities, I decided to try installing iCommand, a Java remote control from leJOS. Here are the steps:

  1. Download the file icommand-0.5.zip and unzip it in s subdirectory.
  2. Copy icommand.jar to /Library/Java/Extensions ... wait, this directory is Mac OSX style, huh? Is this the same as /usr/share/java on Ubuntu? I guess I'll check next time ...


Posted on January 28, 2007

back to top

Okay, time to set up Bluetooth capabilities.

  1. First, install BlueZ, the official Linux Bluetooth protocol stack.
        sudo apt-get install bluez-utils gnome-bluetooth
    The above command installs the BlueZ libraries and header files.
  2. As of this writing, the most current version of PyBluez (Bluetooth library) is 0.9.2, released December 27, 2006. To install, simply download the tarball from http://org.csail.mit.edu/pybluez/download.html. Additional information is also available from An Introduction to Bluetooth programming in GNU/Linux at http://people.csail.mit.edu/albert/bluez-intro/ ... After downloading the .tar.gz file, uncompress by typing
        gunzip pybluez-0.9.2.tar.gz
        tar -xvf pybluez-0.9.2.tar
  3. Next, cd to wherever you unpacked the tarball,and type
        python setup.py install

I'll have to spend some time trouble-shooting all the errors I got from the above step ...


Posted on January 26, 2007

back to top

The leJOS NXJ website is at http://lejos.sourceforge.net/. From this site, you can download Linux leJOS NXJ to run Java on the NXT brick, and iCommand to control the NXT brick over a Bluetooth connection. (Note: leJOS also maintains downloads for the RCX at this site.) I downloaded the packages but am waiting to install (which involves setting up configuration files) on my next free time! So, I decided to download NXT_Python from http://home.comcast.net/~dplau/nxt_python/. As of this writing, NXT_Python requires Python 2.4, PyBluez (Bluetooth library), and/or PyUSB (USB library).

To install Python 2.4 in Ubuntu Linux (the following is based on the Unofficial Ubuntu Starter Guide at http://ubuntuguide.org):

  1. Install Python Development Tools
        sudo apt-get install gcc libc6-dev python-dev python-setuptools python2.4-profiler
  2. Install EZ Setup (tool for installing Python stuff)
        wget http://peak.telecommunity.com/dist/ez_setup.py
        sudo python ez_setup.py
  3. Upgrade Setup Tools
        sudo easy_install -U --script-dir /usr/local/bin setuptools
  4. Install TurboGears Framework (optional)
        sudo easy_install --script-dir /usr/local/bin TurboGears


Posted on January 25, 2007

back to top

The LEGO Mindstorms NXT Education Base Set (Product #979797) does not come with the Education Software (Product #900077). LEGO has made some cool "upgrades" from the previous RCX kit (a.k.a. Mindstorms Robotics Invention System, or RIS, 2.0), not just in the kit components and design but also in the packaging. The kit comes in a top-loaded plastic case with two storage bins, including a figure with recommended placement of the 400+ parts.

So, I set aside one of the kits for initial experimentation. I am so glad we went ahead and ordered extra parts (additional servo motor, rechargeable battery, ultrasonic sensor, and a bluetooth dongle) for each kit!

Since these robots will be primarily used as research robots, I had to investigate which Linux-based software development tools to use.

TeamHassenplug was a good reference to decide which on-brick and which off-brick controllers (remote control) to consider based on a number of features. But, my favorite resource to date is nxtasy.org. After this initial investigation, the next step is to look into the possibility of configuring the NXT bricks to have programs running on the brick via

or off-brick control via Bluetooth link using

Can't wait to start the installation and testing ...


Posted on January 23, 2007

back to top


Archives