A LEGO® MINDSTORMS® NXT 2.0 recently arrived at our house. Of course it only comes with proprietary support for Windows/Mac, so I set out to see what FOSS support for the hardware I could find.
I found nxt-python. It wasn’t packaged, so I packaged it up and uploaded to Debian (from whence it came to Ubuntu). It’s now in for the next release of both distributions (Wheezy/Precise).
This is a bit different than the provided software (which compiles code, downloads it to the NXT, and then runs it untethered). For nxt-python the nxt needs to be connected to your computer via USB or bluetooth. It’s a lot of fun and it’s given me a chance to introduced our youngest child to the idea that there’s more to computers than point and click.
Currently user level access to the device doesn’t work, it has to be accessed by root. Fixing that is on my TODO.
I hope someone else out there has an NXT and enjoys this too.
UPDATE: Added a udev rule and uploaded again, so anyone in plugdev can access the NXT brick.
Here is a link to a site with fairly comprehensive documentation. I included the 10 sub-links of that for your convenience. Please peruse through this site. The site contains links to MOST, if not all, of the projects relating to Linux + Lego Mindstorms NXT 2.0.
Finally, there is a link to the wikipedia page on the subject, covering a fair amount of topics that you can peruse as well.
Good luck in your endeavors .
Lego Mindstorm with Linux Mini-HOWTO
*Introduction
*The Mindstorms Architecture
*LegOS
*Lego::RCX.pm
*Not Quite C (NQC)
*pbForth
*TinyVM and leJOS
*Remote Java APIs
*TCL RCX
*Pylnp
*Other Linux Tools
*Other sources of information
Wikipedia entry on Lego Mindstorms
There is a large community using Lejos to run java code on the robot. You can find more information on freedroidz.org. Enjoy!
Nice! I have been thinking about getting into mindstorms too, Scott. How flexible is the software you packaged when compared to the bundled software? Is it as flexible?
Thanks, Scott!
It works at a very different level.
The bundled softare is programming via point, click, and drag. One selects an object, defines parameters, and then places it in the logic flow visually.
This is a Python module and some scripts. There are predefined object types for many of the same basic functions as the included tools, but it’s Python, not point and click.
Nice article, Scott!
I’m more familiar with C++, but this will give a chance to learn some Python coding
I’ve always wanted control my NXT vehicle with something like the Wii remote. Now that there are libraries for both…
I’m wondering if you saw how Fedora packages python-nxt? The latest packaging is available here: http://koji.fedoraproject.org/koji/buildinfo?buildID=288168
They have a udev rule that allows users of the ‘lego’ group to communicate with the NXT. Maybe your Debian/Ubuntu packages could do something similar
Thanks. Adding a udev rule is where I was headed, I just didn’t have a chance to look into it. Having the Fedora packaging to look at will definitely be a help.
hi there
Also, here is something more:
http://www.ros.org/wiki/nxt
I have played withNXT for 4 moths. I wonder If we can create a wiki only for ubuntu.
I don’t know that something Ubuntu specific is needed, since this should work in any distribution pretty much the same, but if you feel the need, you should JFDI.
I am new to nxt, and am wondering if nxt-python is thread-safe.
It’s pure Python, no C code, so it definitely should be.