PAWN is a C-like open source scripting language formerly known as 'SMALL'. It has a very small footprint and is therefore well suited to situations where resources are scarce. More detailed information on PAWN can be found here:
http://www.compuphase.com/pawn/pawn.htm or
http://code.google.com/p/pawnscript.
We have embedded PAWN inside of Pleo in what is called an Abstract or Virtual Machine (VM). Using PAWN as a scripting language allows access to much of the functionality of Pleo at a very high level.
An abstract or virtual machine (VM) is a computing machine that has an instruction set just like a real machine but that is implemented through software instead of hardware. A more familiar example of a virtual machine is the Java Virtual Machine. Java applications normally run by being interpreted by the Java Virtual Machine. That is why it is easy to move Java programs from your Windows machine to your Mac to your Linux machine.
By using the PAWN VM we can create a controlled and portable environment for Pleo development. Note for the more technically inclined: Since the PAWN VM and its bytecodes are well defined, an ambitious developer could implement other languages for execution on Pleo, as long as they can be compiled into PAWN VM bytecodes.
All of Pleo's personality is implemented in PAWN scripts. This includes all program logic as well as initiating sound and motion playback, and responding to sensors.
The Life OS provides the PAWN virtual machine that PAWN scripts run on. The PAWN Virtual Machine sits on top of Pleo's Life OS rather than interacting directly with it.
A PAWN script is the code that executes on the PAWN Virtual Machine. The source code or script in the PAWN language is compiled by the PAWN compiler into an object file, and the resultant script is loaded (together with the relevant resource files) and executed on the PAWN VM located in Pleo.
There is a sample PAWN script included in the "Pawn Scripting in Life OS" document found on the PleoWorld Developers Only page.
An application is a combination of scripts and sound and motion resources that runs on top of Pleo's Life OS.
A resource is a general term that we use to describe sounds, motions, commands and scripts. These are the raw materials that Pleo uses to express himself.
API stands for Application Programmers Interface, and is a set of functions and constant defintions (defined through Pawn 'include' files) that are specific to Pleo. This API defines joint names, sensor names, property names, etc. and the functions to play sounds, motions and scripts. The full API will be documented in the PDK.
Shadowing refers to overriding a resource that is located in a Pleo application (usually in the internal DataFlash) with one that is separate from the application (typically on an SD Card). To shadow a resource, a file with same name or ID is created with the proper extension (based on resource type). When the Life OS resource manager looks up a resource, it will look to the SD Card first. If a file of the proper name is found, that will be used instead of what is internal. All resources can be shadowed, including sounds, motions, commands and scripts.
A sensor is any hardware component that can gather data from the outside world, like touch, light, motion, audio. Pleo is able to use input from all of his various sensors, such as his camera, microphones and touch sensors, to make more intelligent decisions about how to react to the world he finds himself in.
A motion is a set of instructions on how to move each of Pleo's joints. The raw motion is usually described in the form of a CSV file. This CSV file is converted to a binary playable format using the PDK build tools. A motion may be a walk, a lie down, look around, etc. A motion is sometimes referred to as an animation as well.
A CSV file is a Comma Separated Value file. It is commonly used in spreadsheet programs like Microsoft Excel. Innvo Labs uses this format as an intermediate format for motions and commands since it is easy to generate and easy to parse.
Firmware is another name for Life OS, the complex software platform or operating system that enables Pleo's mechanical, electronic, sensory, and Artificial Intelligence systems to interact as a lifelike whole.
The Pleo Development Kit (PDK) is a set of tools, documentation and samples that allows programmers to modify and extend the functionality of Pleo. This may be as simple as shadowing an existing sound or as complex as writing a whole new application. Many of the tools that are included in the PDK are implemented in Python. The Pawn compiler and Pleo post-processors are written in C. There may be other tools included written in other languages.
Many of the tools that will be included in the PDK are implemented in Python. The Pawn compiler and Pleo post-processors are written in C. There may other tools included written in other languages.
To write applications for Pleo, you will need the PDK. We also encourage you to try out some 3rd party tools that have been released that let moderately tech-savvy folks create fun 'skits':
My Skit Performance Editor for Pleo
YAPT (Yet Another Pleo Tool)
Stay tuned here this year for more information, and read more about the technical details.
With this document, experienced C programmers should be able to gain a general understanding of the Life OS architecture and the process by which applications are written for Pleo.