AIBO Navigation

Jason Kettell
CS470 Final Write-up
April 26, 2004

									
Abstract

	I have always been interested in robotics and artificial intelligence, and since the University has the AIBO for student use, I decided to take this opportunity to explore what the capabilities of the robot are, and what I can accomplish by programming the AIBO.  This gave me the chance to use my skills as a programmer and to interact with a complex machine.
	AIBO is Sony’s entertainment robot.  The word AIBO is derived from the words artificial intelligence (AI) and robot.  In Japanese, AIBO means companion or pal.  AIBO is equipped with various sensors that allow him to interact with his surrounding environment and allow for users to interact with him.  All of these tools aided me in my goal of developing new software designed to control AIBO's movement and enable him to navigate a simple maze.

Introduction

	The goal of my senior project was to develop and implement a software program that would allow Sony’s AIBO robot to navigate a simple maze. AIBO’s initial movement and navigation software is limited to tracking and simple forward movement, but lacks the software to do more advanced navigation.  My software addressed some of these limitations by adding to the existing framework, while utilizing AIBO’s original capabilities.
	
Project Overview
	
	My project was an independently designed and tested experiment, but I did rely heavily on Sony’s OPENR and the Tekkotsu framework developed at Carnegie Mellon University.  The Sony AIBO unit was provided by the Computer Science Club at University of Alaska, Anchorage.  

Project Requirements
	
	Having had no prior experience with AIBO technology, I initially started by brainstorming all the things that would be necessary for me to complete my project.  I then tried to locate or determine if the required tools were available to me.  I spent a great deal of time researching and educating myself on the technology.  	I also spent a lot of time interacting with AIBO and studying how he interacts with the environment around him to give me insight on the best design for my program.  
	The requirements for my project included hardware, software and implementation tools.  Firstly, my project required AIBO - Sony's Entertainment Robot Model ERS-7.  My plan was to have AIBO navigate a simple maze, meaning a maze with few turns.  The maze walls needed to be light and portable, as well as modular in nature so that they could be arranged in various configurations for testing purposes.  
	The following is a list of the required hardware and software.

Required Hardware:
	PC - 
		OS: Windows XP
		Memory: at least 64 MB
		CPU: at least 233 Mhz Pentium Processor
		Hard Disk: at least 200 MB free space
		PC must be able to read and write to a "Memory Stick"
		IEEE802.11b compliant Wireless LAN card for the PC, or IEEE802.11b 			compliant Access Point connected to your LAN.
	AIBO - 
		AIBO (ERS-7)
		AIBO "Programming Memory Stick" (ERA-MS008 or ERA-MS016)
		AIBO Wireless LAN Card ERA-201D1 (this card is used in AIBO's body, 
		ERS-7 has a Wireless LAN function built-in)
		* Only the AIBO "Programming Memory Stick" can be used with the 			OPENR-SDK.

Required Software:
	OPENR-SDK 1.1.5
	Cygwin
	Mipsel Development Tools
	Tekkotsu 2.1

System Design
 
	The AIBO runs a special operating system developed by Sony, called Aperios.  Sony has released a software development kit, the OPENR-SDK.  I developed my program using OPENR-SDK, which is a development environment based on C++ that allows you to make software that works on AIBO.   Programming for the AIBO is for the most part very similar to a UNIX environment, except for process control and inter-process communication.  The development environment uses a slightly patched version of the 3.2 GCC compiler, and can be run on almost any UNIX based platform, including Mac OS X and Cygwin under Windows.  
	Software controlling entertainment robots typically consists of various objects, each with its own tasks, such as image reception, speech recognition, as well as motion control and motion generation.  They communicate with each other while they perform their tasks.  
	My design incorporates various objects that provide the functionality of movement including head leveling and simple navigation.  These objects can best be modeled as automata which are shown below.  

Figure 1.0 Walk Object

	After startup, the walk object is initialized and started.  This object controls the walking motion of AIBO and will keep AIBO walking forward at a constant velocity.  This object is being updated from the sensors and when a sensor event is detected, the turn object is activated and takes control of the system upon initialization.  This object also monitors the sensors and continues to turn AIBO at a constant rate.  When a sensor event is detected by this object, it uses the data passed by this event to determine its next course of action.  This can be one of two possible outcomes; one - it continues to turn in the same direction, or two - it detects an open path and control is returned to the walk object.  The walk object is then updated with the most recent move and uses this to determine the next move that AIBO will make.  
	The head leveling object’s sole purpose is to maintain AIBO’s head at a level position so that the infra-red sensors can get an accurate reading.  Before initialization, the head is set to the desired position and once the object starts, it maintains this position throughout its life.  If a change in the level of the head is detected, the system acts to correct it and returns the head to its preset original position.  
	Initially, I had planned on implementing my own walk algorithm, not realizing the complexity of such an algorithm.  I decided to use the walk algorithm developed at Carnegie Mellon University for use by their robot soccer team.  This algorithm is open source and can be found at the Tekkotsu website.  
	I chose to use the Tekkotsu framework because of its Graphical User Interface and the menu driven operating system.  This allowed me to create OPENR objects which I then attached to the already existing framework.  Tekkotsu builds on the functionality provided by the OPENR operating system.  It is written in C++ and makes full use of inheritance and templates.  This allowed me to focus on my design rather than worrying about implementing the underlying control systems.  

Software Development Process

	For this project I used the prototyping methodology because at the start of this project I was unsure of the final design.  I would develop prototypes starting with simple behaviors and slowly progressed to more complex behaviors.  I tested each prototype for functionality and tried to use the lessons learned in development of the next prototype’s design.  
	Initially I planned on spending 30% of my time on research and development of my design, yet I ended up spending at least 60% of my time on research and trying to understand the basic framework of AIBO.   The remaining time was split equally between implementation and testing.  Initially, I planned to spend approximately two hours a day, but realized this was not a feasible time management plan.  Having to set-up and refamiliarize myself with the previous day’s work did not provide me enough concentrated time to further my project.  I switched to a one day a week schedule where I could set aside a large block of time to allow me to maintain my focus and concentrate deeper on the task, rather than set-up and review.
	 Some challenges I faced included the initial learning curve of OPENR, and the necessity of the memory stick, which I didn’t realize until a significant effort was put forth on programming with the existing memory stick.  Just trying to learn all the different tools required and trying to get them to work together was a major challenge also.  

Results
	
	Overall, I was able to successfully meet my goal of creating and implementing software for AIBO to navigate a simple maze.  I did have to adjust the maze module walls initially while AIBO was still roughly moving within the maze to make them more sturdy and weighted to compensate for his moving into them.  Once I had fine tuned his distance sensors, the lighter type walls were sufficient.   
	In addition, I was also able to make AIBO perform a variety of sound effects, register sound and color lighting in response to sensor stimulus, and perform a variety of movement actions such as sitting, laying down, crouching, etc.   
	My walking and turning objects worked well and did what was required of them.  One possible failure to my program is that AIBO can get stuck if the exit to the maze is perpendicular to the path AIBO is traveling upon, since I was unable to implement the side-to-side path detection.   I would like to increase the robustness of the artificial intelligence and AIBO’s decision making in future prototypes.  

Summary and Conclusions
	
	This project was very challenging in regards to adapting to new technologies.  Another challenge was my lack of experience in this area of technology and the steep learning curve it provided.  However, it was exciting to get the opportunity to work with AIBO and I would have liked to have had more time to explore the capabilities this technology offers.  
	I learned that what is said is not always done, and that though having a goal in mind is good, a realistic goal is necessary.  I was often overwhelmed and even discouraged by the great amount of information and workload and the often distant project goals.  It was much easier to work in the short-term, setting short-term goals, and I would have been better served by a well-defined initial design, as my initial design was too vague and lacked the concrete details needed to keep the project on track.   I quickly found that not having a set plan led me down many more dead-ends that I might have avoided by having a more fleshed-out design scheme.  Time management is critical for the success of a project, not only by setting aside the time but by using it to the best advantage.
	One thing that I definitely noticed is that there is a great deal of interest in the AIBO in general.  Friends, family, class members and colleagues were all extremely interested in interacting with AIBO and I fielded many questions about the robot.  It is a friendly and approachable technology that encourages communication, and I enjoyed the experience.  

References

	OPENR can be found at http://openr.aibo.com/
	Tekkotsu information and user manual can be found at www.tekkotsu.org