AIBO Tutorial CS 4631 – Spring 2004 Ram Ravichandran.

Slides:



Advertisements
Similar presentations
University of Amsterdam Computer Systems – the applicability to an Aibo Arnoud Visser 1 Computer Systems Applicability to an Aibo.
Advertisements

1 Configuring Internet- related services (April 22, 2015) © Abdou Illia, Spring 2015.
Zhang Hongyi CSCI2100B Data Structures Tutorial 2
1 CS 106, Winter 2009 Class 4, Section 4 Slides by: Dr. Cynthia A. Brown, Instructor section 4: Dr. Herbert G. Mayer,
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
CS 550 Amoeba-A Distributed Operation System by Saie M Mulay.
Inter Process Communication:  It is an essential aspect of process management. By allowing processes to communicate with each other: 1.We can synchronize.
The Internet. Telnet Telnet means using your computer as a terminal. All commands you type are sent to the host computer you are connected to and executed.
Figure 1.1 Interaction between applications and the operating system.
February 12, 2009 Center for Hybrid and Embedded Software Systems Model Transformation Using ERG Controller Thomas H. Feng.
Guide To UNIX Using Linux Third Edition
Course Introduction and Getting Started with C 1 USF - COP C for Engineers Summer 2008.
Guide To UNIX Using Linux Third Edition
Guide To UNIX Using Linux Third Edition
UNIX chapter 03 Getting Started Mr. Mohammad Smirat.
Copyright © 2001 by Wiley. All rights reserved. Chapter 1: Introduction to Programming and Visual Basic Computer Operations What is Programming? OOED Programming.
1 Chapter Overview Introduction to Windows XP Professional Printing Setting Up Network Printers Connecting to Network Printers Configuring Network Printers.
Managing Local and Network Printer Chapter 11 powered by dj.
Renesas Technology America Inc. 1 M16C/Tiny SKP Tutorial 2 Creating A New Project Using HEW4.
PIKA Technologies Inc. Analog Logger Application Sample December 2009.
INTRODUCTION TO OPERATING SYSTEMS. An operating system is a program that controls the overall activity of a computer. Like an orchestra conductor an operating.
OpenFlow Tutorial Theophilus Benson. Outline Components in an OpenFlow testbed Setting up a testbed Writing a new component – C++ components version –
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
Guide to Linux Installation and Administration, 2e1 Chapter 8 Basic Administration Tasks.
YourClassPage.com TM Inservice Quickstart Guide Getting YOUR classpage up and running!
Unix Basics Chapter 4.
AIBO Navigation Jason Kettell. AIBO Sony’s Entertainment Robot.
IIS Security Sridurga Mavram. Contents -Introduction -Security Consideration -Creating a web page -Drawbacks -Security Tools -Conclusion -References.
Database-Driven Web Sites, Second Edition1 Chapter 5 WEB SERVERS.
FTP Server and FTP Commands By Nanda Ganesan, Ph.D. © Nanda Ganesan, All Rights Reserved.
Khoros Yongqun He Dept. of Computer Science, Virginia Tech.
Command Prompt Chapter 10 Introduction to Batch Files Richard Goldman February 7, 2000.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
OSP Tutorial An Introduction. Getting to OSP  Obtain a CSE account  Recommend xming to remote log in from USF Website 
Agenda Getting Started: Using Unix Unix Structure / Features Elements of the Unix Philosophy Unix Command Structure Command Line Editing Online Unix Command.
A Short Course on Geant4 Simulation Toolkit How to learn more?
Lesson 2-Touring Essential Programs. Overview Development of UNIX and Linux. Commands to execute utilities. Communicating instructions to the shell. Navigating.
C++ Programming Basic Learning Prepared By The Smartpath Information systems
Writing a Run Time DLL The application loads the DLL using LoadLibrary() or LoadLibraryEx(). The standard search sequence is used by the operating system.
1 ENGI 2420 Structured Programming (Lab Tutorial 7) Memorial University of Newfoundland.
Lab 2 Parallel processing using NIOS II processors
CS412/413 Introduction to Compilers and Translators April 14, 1999 Lecture 29: Linking and loading.
Debugging Ensemble Productions CAMTA Meeting 11 th November 2010 John Murray.
CIS 4910 Information Systems Development Project Project Documentation.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
Functions Math library functions Function definition Function invocation Argument passing Scope of an variable Programming 1 DCT 1033.
Aibo Tutorial: Part1 – Getting Started. Steps to getting started Gather necessary elements Download Sony Software Set up you environment Checkout robocup.
Aibo Open R Introduction AJ Ureel. Outline  Architecture  Class Development  Hello World Example  Example 2  Competitor Code  Conclusions & Next.
1 ENGI 2420 Structured Programming (Lab Tutorial 7) Memorial University of Newfoundland.
Teaching Digital Logic courses with Altera Technology
BIF713 Introduction to Linux. Agenda Getting Started: Using Linux Unix and Linux - Structure / Features Elements of the Linux Philosophy Linux Command.
Hands-On Microsoft Windows Server 2008 Chapter 5 Configuring Windows Server 2008 Printing.
1 Project 4: Computing Distance. 222 Computing Distance Write a program to compute the distance between two points. Recall that the distance between the.
Systems and User Interface Software. Types of Operating System  Single User  Multi User  Multi-tasking  Batch Processing  Interactive  Real Time.
Active-HDL Server Farm Course 11. All materials updated on: September 30, 2004 Outline 1.Introduction 2.Advantages 3.Requirements 4.Installation 5.Architecture.
Geant4 Training 2003 A Short Course on Geant4 Simulation Toolkit How to learn more? The full set of lecture notes of this Geant4.
FILES AND EXCEPTIONS Topics Introduction to File Input and Output Using Loops to Process Files Processing Records Exceptions.
A step-by-Step Guide For labels or merges
Wiki Wiki – A collection of web pages that can be edited by a group.
Development Environment
Debugging with gdb gdb is the GNU debugger on our CS machines.
A Short Course on Geant4 Simulation Toolkit How to learn more?
Topics Introduction to File Input and Output
Configuring Internet-related services
Introduction to Classes and Objects
A Short Course on Geant4 Simulation Toolkit How to learn more?
A Short Course on Geant4 Simulation Toolkit How to learn more?
Topics Introduction to File Input and Output
Presentation transcript:

AIBO Tutorial CS 4631 – Spring 2004 Ram Ravichandran

Outline z Introduction z Basic OPENR Program Constructs z Code Development z Executing and Debugging z Flow of Development z Parting advice

Introduction z Environment y Code developed using C++, OPENR API y Installed under /usr/OPENR_SDK y available from z Documentation (available under /usr/OPENR_SDK/documentation ) y AIBO Programming manual y ERS-210 Information y API Specifications (Level II reference Guide)

Introduction z Sample Programs y Best way to learn writing code y All sample programs are available under /usr/OPENR_SDK/sample x Copy to your home directory and change permissions. x run using make PREFIX=/usr/OPENR_SDK

OPENR Objects z True OO (very similar to Squeak/SmallTalk) z Similar to a UNIX process z Communication through message passing. y Object waits for message {selector,data} to arrive. y Once a message arrives, objects call the method based on the selector specified in stub.cfg. y Arguments to the method is the data in the message y Wait for more messages.

Inter-object communication z Brief overview y Subject x Object that sends a message y Observer x Object that receives the message y Every observer has a message queue. y Subject sends Observer a ‘NotifyEvent’. y Observer replies with a ‘ReadyEvent’ x ASSERT_READY x DEASSERT_READY

Core Class z Each Object has a Core Class z A Sample Core Class #include #include "def.h“ class SampleClass : public OObject { public: SampleClass(); virtual ~SampleClass() {} OSubject* subject[numOfSubject]; OObserver* observer[numOfObserver];

Core Class (2) zContinued… virtual OStatus DoInit(const OSystemEvent& event); virtual OStatus DoStart(const OSystemEvent& event); virtual OStatus DoStop(const OSystemEvent& event); virtual OStatus DoDestroy(const OSystemEvent& event); //Describe the member functions corresponding to Notify, //Control, Ready, Connect method. };

Inter-object Communication z Control Method y Used by the Subject to receive a connection result z Connect Method y Used by observer to receive a connection result z Notify Method y Used by Observer to receive a message z Ready Method y Used by Subject to receive the ASSERT_READY and DEASSERT_READY signals from Observer.

DoXXXX() Method Macros z DoInit y NEW_ALL_SUBJECT_AND_OBSERVER x Registers the necessary number of Subjects & Observers. y REGISTER_ALL_ENTRY x registers the connection to services offered by other objects y SET_ALL_READY_AND_NOTIFY_ENTRY x This registers all entry points. z DoStart y ENABLE_ALL_SUBJECT x Enables all the Subjects y ASSERT_READY_TO_ALL_OBSERVER x This sends ASSERT_READY to all subjects.

DoXXXX() Method Macros (2)  DoStop() y DISABLE_ALL_SUBJECT x This disables all subjects of core class. y DEASSERT_READY_TO_ALL_OBSERVER x This sends a DEASSERT_READY to all connecting subjects. z DoDestroy() y DELETE_ALL_SUBJECT_AND_OBSERVER x This deletes all observer and subjects.

More Message Passing z Observer first sends all its subjects an AssertReady void SampleObserver::SendAssertReady() { observer[obsfunc1]->AssertReady( ); } z When Subject receives AssertReady, it sends the data. void SampleSubject::Ready(const OReadyEvent& event) { char str[32]; strcpy(str, “Some Text Message”); subject[sbjFunc2]->SetData(str,sizeof(str)); subject[sbjFunc2]->NotifyObservers( ); }

More Message Passing (2) z When observer receives the data, it sends an ASSERT_READY again void SampleObserver::Notify(const ONotifyEvent& event) { const char* text = (const char*)event.Data(0); observer[sbjFunc1]->AssertReady(); }

Stub File z Used to define member functions that receive messages z A sample Stub File (stub.cfg) ObjectName : SampleClass NumOfOSubject : 1 NumOfOObserver : 2 Service : “SampleClass.Func1.Data1.S”,Control(),Ready() Service : “SampleClass.Func2.Data2.O”,Connect(),Notify1() Service : “SampleClass.Func3.Data2.O”,Control(),Notify2() Extra : WakeUpOnLan() Extra : UpdateBatteryStatus()

Building zMake a Directory (let’s call it Output) in the parent directory of the directory where you have the source files. We will put the final output executables in this directory. zCopy the directory OPEN-R from /usr/OPENR_SDK/MS into Output. zCopy Makefile-parent from /usr/OPENR_SDK/MS to /Makefile zCopy Makefile-child from /usr/OPENR_SDK/MS to /Makefile zEdit both makefiles. ztype make;make install in the parent directory.

Building (2) z A picture is worth a thousand words

Editing Configuration Files. z.ocf file y Has one line in it of the following format. object NAME STACK_SIZE HEAP_SIZE SCHED_PRIORITY cache tlb user zconnect.cfg file y This file is in /MS/OPEN-R/MW/CONF y Dictates who talks to who using what services (registered in stub.cfg) y Contains lines similar to : object1.sendStream.datatype1.S object2.recvStream.dataType1.O zobject.cfg file y contains a list of.bin files (objects) y add the objects you have compiled  do not erase tinyftpd.bin and powermon.bin

Executing and Debugging zInsert the memory stick in the laptop. zAt the prompt, type mount /sony zOnce the memory stick has been mounted, then copy the files from /MS/OPEN_R to /sony cp –rf /MS/OPEN_R /sony zun-mount the memory stick. umount /sony zPut the memory stick in the dog and press the power button on the dog. zDEBUGGING For debugging information see chapter 5 in the programmer’s manual. The explanation in the chapter is very clear and extensive.

Flow of Development zDesign your objects zDecide on the data type for the inter-object communication zWrite the stub.cfg file zWrite the core class with the necessary member functions zWrite connect.cfg file zWrite your.ocf file zBuild zWrite object.cfg file zExecute on AIBO zDebug (perhaps)

Parting Advice zSee sample programs zDo NOT let the AIBO walk on hard surfaces. This will break the joints. Use the robocup field or a similar carpet like surface. zDo NOT use joint values greater than the ones in the manual. The software does not impose a limit on the joint angles. Thus you can BREAK the joints by putting in arbitrary values. zYou will PAY for any broken part. zThis tutorial is available online (by tonight) at zProgramming the dogs for the first time can be frustrating. Do not hesitate to use the mailing list to ask questions.