MyPleo Installation and Deployment
MyPleo Installation and Deployment
MyPleo Installation and Deployment
MyPleo Installation
and Deployment
version 1.05 - October 18, 2011
Paulo F. Gomes
This work is licensed under a Creative Commons Attribution 3.0 Unported License
Contents
Introduction .................................................................................................................................. 2
Installation and Configuration....................................................................................................... 3
Software installed ..................................................................................................................... 3
Pre-Installation .......................................................................................................................... 3
Shiva Tools Installation.............................................................................................................. 4
Shiva Editor Configuration ........................................................................................................ 4
Java, Eclipse & Android SDK Installation ................................................................................... 5
Shiva Authoring Tool Configuration .......................................................................................... 5
Eclipse Configuration................................................................................................................. 5
PhyPleo Installation and Configuration..................................................................................... 6
Bluetooth Configuration ........................................................................................................... 6
Smartphone Configuration........................................................................................................ 7
Pleo robot Configuration........................................................................................................... 7
Eclipse Project Creation ............................................................................................................ 8
Bluetooth Installation.............................................................................................................. 10
Deployment ................................................................................................................................. 14
ViPleo Deployment.................................................................................................................. 14
PhyPleo Deployment ............................................................................................................... 14
Acknowledgements ..................................................................................................................... 16
Introduction
This document presents a summary description of the necessary steps that need to be taken in
order to create new versions of MyPleo. Although reading MyPleo System Description is highly
recommended, I will try to make a summary description of the prototype here. MyPleo is an
artificial pet with two embodiments: a robotic one, consisting of a modified Pleo1 robot; and a
virtual one, consisting of an Android2 application for an HTC Desire34. These two embodiments
will be referred to as PhyPleo and ViPleo respectively. PhyPleo has been developed from Pleo
robot version 1.1.1 and ViPleo was developed for Android 2.2.
The manual was originally created to enable LIREC developers/researchers to extend MyPleo.
However, it may also serve other individuals that want to try to recreate it. In either case I
reiterate that reading MyPleo System Description is essential.
Only LIREC developers/researchers will have access to the complete MyPleo bundle with all the
prototype’s resources, but most of the resources are available in
http://trac.lirec.org/browser/scenarios/MyFriend/MyPleo/. Furthermore, all the code is there
and has been licensed under GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007
(http://www.gnu.org/copyleft/gpl.html).
This manual is licensed under a Creative Commons Attribution 3.0 Unported License
(http://creativecommons.org/licenses/by/3.0/). Readers are encouraged to create new
versions of the document, updating it for instance. Future authors are asked to maintain a
reference to the original author in the first page and include their names in the first page as
well. Additionally, I have used the pronoun “I” when presenting personal suggestions. These
should probably be changed to “We” if other authors contribute to the document.
I start by describing the necessary steps to prepare your development system to deploy new
versions of MyPleo (Installation and Configuration). Afterwards, I explain how after modifying
one component one can deploy to the robot and to the Smartphone (Deployment).
1
Copyright Innvo Labs Corporation.
2
Copyright Google Inc.
3
Copyright HTC Corporation.
4
The device used will also be referred to simply as “Smartphone”.
Installation and Configuration
In this chapter it is described what one should install in a PC in order to be able to deploy
MyPleo’s software to the modified Pleo robot, and to a Smartphone. I recommend following
the steps in the order they are presented.
There are various references to the software folder along the description. Only LIREC
developers/researchers will have access to the complete MyPleo bundle in which such folder is
included. However, almost all the software can be downloaded free of charge from the
internet, and if not, alternatives are mentioned.
Most of the steps were tested in a PC with Windows XP (32-bit) service pack 3 installed,
without an SD Card reader nor Bluetooth, as well as in a PC with Windows 7 (64-bit) service
pack 1 installed, with an SD Card reader and Bluetooth. The Bluetooth configuration and
PhyPleo Installation and Configuration were only tested in the PC with Windows 7.
Software installed
In the installation the following software packages will be installed/configured/used:
Shiva 3D 1.9.0.1;
JDK 6 update 26;
Eclipse IDE for Java Developers;
Android SDK Tools;
ADT plug-in for Eclipse;
Android NDK version 6;
Apache Ant 1.8.2;
Gygwin;
Putty;
SVN client;
For software that does not need explicit installation, but rather just unzipping to a folder, I
suggest doing so to a safe location without space characters in the path.
Pre-Installation
The pre-installation can either be performed from the MyPleo bundle, or with a checkout from
LIREC’s svn server.
In this document, unless mentioned otherwise, references to folders assume that you are
already in the bundle folder. References to the workspace folder refer to the location where
this folder was placed, or checked out.
Alternatively, you can re-import an older version of the project from an available archive
following these steps:
1. Install the JDK (version 6 update 26) from the jdk-6u26-windows-i586 setup file in the
software folder (installation folder will be named <jdk-installation-folder>).
2. Create a new environment variable named JAVA_HOME and set it to <jdk-installation-
folder> (e.g. C:\Program Files (x86)\Java\jdk1.6.0_26);
3. Install Eclipse Indigo from the eclipse-java-indigo-win32 zip file in the software folder
to a safe folder (will be named <eclipse-installation-folder>).
4. I suggest using a shortcut to launch eclipse so that you can specify the jdk used. An
example is included in the software folder (eclipse-java-indigo-win32 launcher). You
will have to define the Target as <eclipse-installation-folder>\eclipse.exe –vm
“%JAVA_HOME%\bin\javaw” and the Start in as <eclipse-installation-folder>.
5. Install the Android SDK (release 12) from the installer_r12-windows setup file in the
software folder. The installation folder must not have spaces (it will be named in this
document as <android-installation-folder>). Make sure to install the SDK Platform
Android 2.2, API 8, revision 2.
6. Create a new environment variable named ANDROID_HOME and set it to <android-
installation-folder> (e.g. C:\ProgramsNS\android-sdk);
7. Install the ADT eclipse plug-in by following the instructions in doc\eclipse-adt
installation.html5.
Eclipse Configuration
We will use the checked out or copied workspace folder as an eclipse workspace. The steps for
doing so are the following:
1. Install PleoDevelopmentKit from the zip file in the software folder to a safe folder (will
be named <pleo-sdk-installation-folder>, e.g. C:\ProgramsWI\PleoDevelopmentKit);
2. Create a new environment variable named PLEO_HOME and set it to <pleo-sdk-
installation-folder> (e.g. C:/ProgramsWI/PleoDevelopmentKit);
3. Browse to workspace\phypleo\needs_behavior;
4. Edit needs_behavior.upf replacing the entries of C:/ProgramsWI/PleoDevelopmentKit
by the actual folder path using slash characters (/);
Bluetooth Configuration
The following instructions enable you to connect to PhyPleo trough your computer via
Bluetooth. Of course your computer will need to have Bluetooth in order to do so. Note that
USB SD Card readers are inexpensive.
The instructions described assume putty is installed, but an alternative serial port terminal
could be used (the binary file for putty has been placed in the software folder for
completeness). The instructions to establish the connection are the following:
1. Turn on PhyPleo;
2. Go to Bluetooth Devices in the Tray Bar and select Add Device;
3. Wait for the devices to be detected;
4. Select PleoBluetooth-1255 and click Next;
5. Select Pair without using a code;
6. After the device is linked, click Close;
7. Go to Bluetooth Devices in the Tray Bar and select Show Bluetooth Devices;
8. Right-click on PleoBluetooth-1255 and select properties;
9. Go to the Hardware tab and write down the name of the created serial port (e.g.
COM6);
10. Close the properties and exit from Bluetooth devices;
11. Launch putty;
12. Go to Connection>Serial and fill the fields with the following values:
a. Serial line to connect to: the name of the port you written down;
b. Speed (baud): 115200
c. Data bits: 8
d. Stop bits: 1
e. Parity: None
f. Flow Control: None
13. Go back to the Session menu;
14. In the Connection type select Serial;
15. In the Saved Sessions space type ‘PleoBluetooth-1255 settings’;
16. Click Save;
17. Double-Click on ‘PleoBluetooth-1255 settings’;
18. Allow the Bluetooth device to connect by clicking on the balloon popping out of the
system tray;
19. Type ‘1234’ as the key and continue;
20. Wait for command black window to appear;
In the end of the configuration, you can type ‘help’ and enter to test it. A list of the monitor
commands should appear.
Smartphone Configuration
Running the necessary software on the HTC Desire requires a little effort of configuration.
Most of the devices already used for MyPleo will probably already have been configured. If you
are using another device do the following steps:
Additionally, I recommend installing the MySkit application available in the software folder in
order to visualize and edit the robot’s animations.
Bluetooth Installation
In this sub-section we describe how to enable a Pleo robot to receive commands via Bluetooth.
You only need to read it if you intend to create more PhyPleo’s.
It is greatly inspired in a previously online web page housed at Robotstuf.com7. The last time
the website was consulted (14-07-2011), it seemed to be offline. There is an offline version of
the cached page in the doc folder (Pleo bluetooth.htm). Installation was performed with the
help of an electric technician.
The modifications to the Pleo robot 1.1.1. presented here have not been approved by Innvo
Labs and most likely void the warranty. By taking them, the reader takes full responsibility of
any damage or malfunction occurring to the Pleo robot used. Furthermore, the author is not
responsible for any injury or health problem caused by trying to the follow these instructions.
The parts and material needed to install the Bluetooth are the following:
1 Bluetooth module (Figure 1). I recommend the Bluetooth DIP Module - Roving
Networks (http://www.sparkfun.com/products/8550);
7
http://robostuff.com/diy-projects/pleo-hacking/how-to-control-pleo-wirelessly-via-Bluetooth/,
consulted 11-03-2011.
1 crimp housing (Figure 2), 1.25mm, 7 way (http://il.farnell.com/molex/51021-
0700/crimp-housing-1-25mm-7way/dp/6151109);
All the material, apart from the cat collar and the wires, should be available at GAIPS/INESC-
ID’s offices. The electronic parts should be in a box labelled “PhyPleo Parts”. Additionally, you
will also need a basic soldering iron, pliers, a snap-off blade, crimping tool, tweezers, and a SD
Card.
8
As mentioned on the website, the image presented there is only an illustration. The crimp has actually
7 entrances.
9
As mentioned on the website, the image presented there is only an illustration. The crimp has actually
7 entrances.
Installation itself consists of the following steps:
1. Use the crimping tool, and pliers, to attach the crimp socket contacts to the wires (one
per each wire);
2. Insert the crimped wires at positions 1, 3, 4 and 5 of the crimp housing (see Figure 4);
10
I am unsure if that might eventually affect the Bluetooth communication, but from the testing done, it
did not seem so.
Deployment
After the necessary installation and configuration steps described in the previous chapter have
been performed, deploying a new software version to ViPleo or PhyPleo should be a relatively
straightforward process. We described such process bellow. Note that changes to MyPleo’s
software should only be made after reading MyPleo System Description.
ViPleo Deployment
These are the instructions necessary to deploy ViPleo for the first time:
Subsequent deployment can be performed by the same steps, although step 20 will be
automatically skipped for a mode (debug or release) after you have deployed once in that
mode. However, when Shiva module has not changed been one can simply execute step 19.
PhyPleo Deployment
In order to perform a complete deployment to PhyPleo you will need a computer with an SD
Card reader. However, creating an urf file with the behaviour can be performed using
workspace\phypleo\needs_behaviour\compile.bat. The steps to deploy PhyPleo’s software are
the following:
With Windows XP (32-bit) service pack 3 an error message has appeared during the
deployment process: “The procedure entry point _except_handler4_common could not be
located in the dynamic link library msvcrt.dll”. However, deployment seems to occur normally.
You can deploy a version of PhyPleo’s behaviour without sound. This might come in handy if
you wish to discharge the battery completely before charging it again. To disable sound you
just need to use automon (sound disabled).txt instead of automon.txt.
Acknowledgements
This work is partially supported by the European Community (EC) and was funded by the EU
FP7 ICT-215554 project LIREC (LIving with Robots and IntEractive Companions), and FCT (INESC-
ID multiannual funding) through the PIDDAC Program funds. The authors are solely responsible
for the content of this publication. It does not represent the opinion of the EC, and the EC is not
responsible for any use that might be made of data appearing therein.