XS: Lisp on Lego MindStorms (original) (raw)
by Taiichi Yuasa
XS is a Lisp system which is designed to control RCX blocks of the Lego MindStorms Robotics Invention System (RIS).
XS Lisp provides one of the most complete and powerful systems currently available for Lego MindStorms programming.
- Autonomous XS evaluator runs on the RCX and includes its own runtime stacks and garbage-collected heap.
- Communication with the front-end PC subsystem provides an interactive programming environment that includes features such as backtrace, function trace, and terminal interrupt.
- Lisp/Scheme-based language extends functionality for interfacing with motors, sensors and other RIS devices.
- The language of XS supports mechanisms such as event waiting and asynchronous event handlers for all RIS controlled robots.
The first version of the system has been released as an open source software, distributed under the Mozilla Public License (MPL). The system is currently running on the following platforms.
- Windows XP for RCX 1.0, 1.5, and 2.0.
- Linux (RedHat, Debian, Fedora Core) for RCX 1.0, 1.5, and 2.0.
The following materials are available:
- XS system in zip format (2.3MB).
- Installation Guidesfor Windows (4KB)andfor Linux (6KB)both in plain text.
- Reference Manualin PS format (1018KB)orin PDF format (346KB).
- Slides for my talk at International Lisp Conference (ILC) 2003 in PDF format (5MB).
- My paper at ILC 2003in PS format (574KB). orin PDF format (231KB).
- My paper (in Japanese) at IPSJ (Information Processing Society of Japan) Programming Symposium 2004in PS format (466KB)orin PDF format (160KB).
- My paper (in Japanese) published in the JSSST (Japan Society for Software Science and Technology) journal "Computer Software" Vol. 24 (2007), No. 4in PDF format (232KB).
- Sample programs: range.lsp,remote.lsp,rover.lsp,rover1.lsp,trace.lsp
In case you have trouble with using XS, here is FAQ.
What's new?
- Lisp for Lego MindStorms NXT available(2007/08/11): Developed by Tasuku Hiraishi, this system allows you to control NXT through Allegro Common Lisp. Visithere(in Japanese only, sorry) for details.
- The front-end of XS now can fork subprocesses so that XS programs can communicate with Linux applications.(2006/11/03): The new top-level form "fork" creates a subprocess and executes a specified Linux program. The I/O functions of XS, such as "read" and "write", can now accept port numbers to communicate with subprocesses. See the revised reference manual for details.
- Bug fix for tail-recursion optimization(2006/10/26): The evaluator in the RCX sometimes failed to correctly optimize tail-recursive calls of functions within let, let*, and letrec forms.
- Japanese version of the Reference Manual became available(2006/10/20): See the Japanese page.
- Support for USB tower on Linux PC (2005/03/18): See the updated Installation Guides.
Copyright 2003, Taiichi Yuasa
The project of XS was sponsored by the Information-technology Promotion Agency (IPA) of Japan as an Exploratory Software Project.