1 / 27

Tze-wen Wang Marek A. Perkowski Portland State University, Oregon, USA Maciej Sajkowski

ICEE2005, Gliwice, Poland. An Inexpensive LISP-Based Educational Platform to Teach Humanoid Robotics and Artificial Intelligence. Tze-wen Wang Marek A. Perkowski Portland State University, Oregon, USA Maciej Sajkowski Tomasz Stenzel Silesian University of Technology, Gliwice, Poland.

gwylan
Télécharger la présentation

Tze-wen Wang Marek A. Perkowski Portland State University, Oregon, USA Maciej Sajkowski

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ICEE2005, Gliwice, Poland An Inexpensive LISP-Based Educational Platform to Teach Humanoid Robotics and Artificial Intelligence Tze-wen Wang Marek A. Perkowski Portland State University, Oregon, USA Maciej Sajkowski Tomasz Stenzel Silesian University of Technology, Gliwice, Poland 2005 Int'l Conference on Enigneering Education Gliwice, Poland

  2. Outline • Introduction • Motivations • The AI Language • Problems? • Platform Overview • Software • Hardware • The CLISP Environment • Overview • FFI Package • Examples • Summary 2005 Int'l Conference on Enigneering Education Gliwice, Poland

  3. Introduction • Robotic and AI programming… • Interesting – turns ideas into motions and movements. • Interactive – machines are coordinated by different inputs such as gestures and environments. • Attractive – easily gets attentions from young students. • Abstract – hard to understand and verify without hardware aids. • Complicated – a complete robot program involves with both software and hardware implementations. • Learning curve – because of involvement with hardware, it is hard for young students to pick up. 2005 Int'l Conference on Enigneering Education Gliwice, Poland

  4. Introduction – cont’d • Construction of robot programs involves several areas: • Digital hardware systems • Communication protocol. • Microprocessor-level programming. • System-level programming. • Image processing. • Artificial Intelligence. • Many more… 2005 Int'l Conference on Enigneering Education Gliwice, Poland

  5. Motivations • Therefore, we need a better programming environment for robot programs for students to learn the fundamentals. • A high-level computer language that is easy to learn from the ground. • The implementation of the language should be extendable. • Encapsulation of hardware abstraction. • Abundant and rich software resources. • Allows students and programmers to focus on robot’s behaviors. 2005 Int'l Conference on Enigneering Education Gliwice, Poland

  6. The AI Language • The LISP programming language is … • LISt Processing programming language. • Invented by John McCarthy during 1956-62 at Massachusetts Institute Technology (MIT). • A high-level functional language with uniform syntax. • Capable for symbolic computation and perform theorem proving. • Supports macro expansion. • Operating system independent. • Interpreted, no compilation required. 2005 Int'l Conference on Enigneering Education Gliwice, Poland

  7. The AI Language – cont’d • Easy to learn. • No pointer mechanisms. • Automatic memory management. • Interactive. • Allows fast-prototyping. • Concise. • A binary-tree search/traversal can be done in just a few lines of code. • Still widely used in AI programming today. 2005 Int'l Conference on Enigneering Education Gliwice, Poland

  8. Problems… • However, like all other high-level languages, technical problems exist… • Programs can not access hardware devices other than the standard I/O. • Standard input, keyboard. • Standard output, textual screen. • Degraded execution performance. • Difficult to generate hardware control signal. • Co-existing with other languages. • Interfacing with libraries. 2005 Int'l Conference on Enigneering Education Gliwice, Poland

  9. Introduction – cont’d • Check what is available today. • Today’s technology offers tremendous computation power and cost-effective learning environment. • Huge volatile and permanent storages. • Home-use operating systems are mature to handle multitasks and catch with up-to-date hardware device technologies. • Many relevant software libraries are publicly available. • Intel Open Computer Vision Library (OpenCV). • Microsoft Speech Application Interface (SAPI). 2005 Int'l Conference on Enigneering Education Gliwice, Poland

  10. Platform Overview • Due to advances of technology, we are now able to split brain and body of an autonomous and place them in different places. 2005 Int'l Conference on Enigneering Education Gliwice, Poland

  11. Platform Overview – cont’d Computer Artificial Intelligence. Collects feedback. Generates behaviors and control signals. Robot Retrieves control signals. Performs behaviors. Transmitter Delivers control signals. Video Camera Generates image and feedback. 2005 Int'l Conference on Enigneering Education Gliwice, Poland

  12. Hardware • Computer • A home-use personal computer with generic operating system such as Windows would provide a cheap solution to construct this platform. • Possible to build a cluster with open-source operating system such as Linux to enhance capability. • Transmitter • Any transmitter that is able to be hooked up with a computer system through standard I/O ports such as RS232 and USB. • We choose BasicStamp RF module to be the control signal carrier. 2005 Int'l Conference on Enigneering Education Gliwice, Poland

  13. Hardware – cont’d • Video Camera • Any USB camera that is supported by the operating systems and OpenCV library. • A cheap USB Web-camera would work. • Robot • Could be viewed as a hardware device from programmer’s view. • We experimented with a popular humanoid robot, Robosapien, in the US robot hobby market. • The robot is modified to have capability retrieving control signals through RF communications. 2005 Int'l Conference on Enigneering Education Gliwice, Poland

  14. Robot Application RS232 LISP-to-C Layer OpenCV Others Win32 System Calls USB Operating System PC / Workstation Software • The goal is to provide an easy-to-learn robot programming environment. • An “everyday life” operating system. • Microsoft Windows. • An extended LISP implementation. • CLISP. • An image processing library. • Intel OpenCV. • Other software resources. • System Libraries (Calls). • Other Dynamic Link Libraries (DLLs). 2005 Int'l Conference on Enigneering Education Gliwice, Poland

  15. CLISP • An ANSI Common Lisp Implementation. • Developed initially by Bruno Haible in 1992 and later by several other academic institutions. • Karlsruhe University, Germany. • Munich University, Germany. • Implements ANSI Common Lisp standards with extended packages. • An interpreter. • A compiler and debugger. • Common Lisp Object System (CLOS). • Socket interface. • Foreign function interface. 2005 Int'l Conference on Enigneering Education Gliwice, Poland

  16. CLISP – cont’d • Supports a wide variety of operating systems. • Windows 95/98/NT/2000/XP. • Linux. • FreeBSD, NetBSD, OpenBSD, Solaris, Tru64, HP-UX, BeOS, NeXTstep, IRIX, AIX… • Requires only 4 Mbytes memory to run. • A freeware under terms of GNU General Public License (GNU GPL). • Detail on-line documentation available. • Language reference. • Implementation notes. 2005 Int'l Conference on Enigneering Education Gliwice, Poland

  17. CLISP – cont’d • User interface comes with several languages such as German, English, Spanish, and Dutch, and can be switched on the fly. • Supports i18N and Unicode encoding. 2005 Int'l Conference on Enigneering Education Gliwice, Poland

  18. FFI Package • A set of LISP primitives and macros that are used to define foreign function symbols. • A foreign function refers to a function that is not a implemented and run under LISP environment. • System and API functions. • Functions stored in Dynamic Link Library. • Currently only supports C functions. • Most libraries including system calls are written in C. 2005 Int'l Conference on Enigneering Education Gliwice, Poland

  19. FFI Package – cont’d • FFI package allows program control flow to be passed back and forth between LISP and non-LISP functions. • A LISP program can be a major control program. • Simple and complex data types are handled by the interface. • FFI package provides both automatic type conversion and explicit type-casting. • Programmers can also create user-defined data structure to accommodate foreign function calls. 2005 Int'l Conference on Enigneering Education Gliwice, Poland

  20. FFI Package – cont’d • Steps to make a foreign function call. • Locate where the foreign function is stored. • Define LISP symbols linked to a function stored in a library file. • Define all necessary data structures for the call. • Create instances of the data structures. • Invoke the call in the same way to call a LISP function. • Things to be aware with foreign functions. • Storage allocation method. • Handling of pointer arithmetic in the foreign functions. 2005 Int'l Conference on Enigneering Education Gliwice, Poland

  21. FFI Package – cont’d • Summary of data types. 2005 Int'l Conference on Enigneering Education Gliwice, Poland

  22. FFI Package – cont’d • Do students have to learn FFI package? • FFI only interfaces with the low-level function calls. • Detail implementation of sending control signal can be written in macros. • Instructors can prepare those LISP-to-C functions for the class. • Students would only need to know names of robot’s behaviors. • (left 90) – turn left 90 degrees. • (forward 2) – move 2 steps forward. • Advanced topics can be taught in conjunction with libraries such as OpenCV and Speech API. 2005 Int'l Conference on Enigneering Education Gliwice, Poland

  23. Example 1 • Robosapien Console. • A LISP program that prompts to the user for robot command and sends the control signal over the RF channel. • Once the robot received the signal, it performs the pre-programmed behaviors. • The program uses system call to do all communications. • The main routine has only a few lines of code. 2005 Int'l Conference on Enigneering Education Gliwice, Poland

  24. Example 2 • Frame Rate Calculator. • A LISP program utilizes Intel OpenCV library to acquire a USB camera. • Upon each received frame, a LISP routine is called back to calculate frame rate with respect to a second. • The program uses CLISP FFI package to accomplish both call-in and call-out. • The entire program has only a few lines of code. 2005 Int'l Conference on Enigneering Education Gliwice, Poland

  25. Summary • LISP is still a better choice to teach students under context of robotic programming. • Interactive and low programming learning curve. • Easy to do verification of the algorithms. • Abundant developed LISP code available in the area. • Take advantages of today’s computer technology. • Fast processors and huge storage. • A number of PC compatible hardware devices. 2005 Int'l Conference on Enigneering Education Gliwice, Poland

  26. Summary – cont’d • CLISP offers a great environment for robotic programmers. • Supports several operating systems. • Accessible to hardware devices. • Available for academic use at no cost under terms of GNU GPL. • A toy robot would do the great job! • Robosapien, an robot for less than 80 USD.- • Only a little hardware modification is required. 2005 Int'l Conference on Enigneering Education Gliwice, Poland

  27. Thank You Questions 2005 Int'l Conference on Enigneering Education Gliwice, Poland

More Related