ImageVerifierCode 换一换
格式:PPT , 页数:20 ,大小:68.50KB ,
资源ID:378148      下载积分:2000 积分
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝扫码支付 微信扫码支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【http://www.mydoc123.com/d-378148.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(AIBO Tutorial.ppt)为本站会员(lawfemale396)主动上传,麦多课文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知麦多课文库(发送邮件至master@mydoc123.com或直接QQ联系客服),我们立即给予删除!

AIBO Tutorial.ppt

1、AIBO Tutorial,CS 4631 Spring 2004Ram Ravichandran,Outline,IntroductionBasic OPENR Program ConstructsCode DevelopmentExecuting and DebuggingFlow of DevelopmentParting advice,Introduction,EnvironmentCode developed using C+, OPENR APIInstalled under /usr/OPENR_SDKavailable from Documentation (availabl

2、e under /usr/OPENR_SDK/documentation )AIBO Programming manualERS-210 InformationAPI Specifications (Level II reference Guide),Introduction,Sample ProgramsBest way to learn writing codeAll sample programs are available under /usr/OPENR_SDK/sample Copy to your home directory and change permissions.run

3、 using make PREFIX=/usr/OPENR_SDK,OPENR Objects,True OO (very similar to Squeak/SmallTalk)Similar to a UNIX processCommunication through message passing.Object waits for message selector,data to arrive.Once a message arrives, objects call the method based on the selector specified in stub.cfg.Argume

4、nts to the method is the data in the messageWait for more messages.,Inter-object communication,Brief overviewSubjectObject that sends a messageObserverObject that receives the messageEvery observer has a message queue.Subject sends Observer a NotifyEvent. Observer replies with a ReadyEventASSERT_REA

5、DYDEASSERT_READY,Core Class,Each Object has a Core ClassA Sample Core Class#include #include #include #include “def.h“class SampleClass : public OObject public: SampleClass(); virtual SampleClass() OSubject* subjectnumOfSubject; OObserver* observernumOfObserver;,Core Class (2),Continued virtual OSta

6、tus DoInit(const OSystemEvent,Inter-object Communication,Control MethodUsed by the Subject to receive a connection resultConnect MethodUsed by observer to receive a connection resultNotify MethodUsed by Observer to receive a messageReady MethodUsed by Subject to receive the ASSERT_READY and DEASSERT

7、_READY signals from Observer.,DoXXXX() Method Macros,DoInitNEW_ALL_SUBJECT_AND_OBSERVERRegisters the necessary number of Subjects & Observers.REGISTER_ALL_ENTRYregisters the connection to services offered by other objects SET_ALL_READY_AND_NOTIFY_ENTRYThis registers all entry points. DoStartENABLE_A

8、LL_SUBJECT Enables all the SubjectsASSERT_READY_TO_ALL_OBSERVERThis sends ASSERT_READY to all subjects.,DoXXXX() Method Macros (2),DoStop()DISABLE_ALL_SUBJECT This disables all subjects of core class.DEASSERT_READY_TO_ALL_OBSERVER This sends a DEASSERT_READY to all connecting subjects. DoDestroy()DE

9、LETE_ALL_SUBJECT_AND_OBSERVER This deletes all observer and subjects.,More Message Passing,Observer first sends all its subjects an AssertReady void SampleObserver:SendAssertReady() observerobsfunc1-AssertReady( ); When Subject receives AssertReady, it sends the data. void SampleSubject:Ready(const

10、OReadyEvent ,More Message Passing (2),When observer receives the data, it sends an ASSERT_READY again void SampleObserver:Notify(const ONotifyEvent ,Stub File,Used to define member functions that receive messagesA sample Stub File (stub.cfg)ObjectName : SampleClass NumOfOSubject : 1 NumOfOObserver :

11、 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,Make a Directory (lets call it Output) in the parent directory o

12、f the directory where you have the source files. We will put the final output executables in this directory. Copy the directory OPEN-R from /usr/OPENR_SDK/MS into Output. Copy Makefile-parent from /usr/OPENR_SDK/MS to /Makefile Copy Makefile-child from /usr/OPENR_SDK/MS to /Makefile Edit both makefi

13、les. type make;make install in the parent directory.,Building (2),A picture is worth a thousand words,Editing Configuration Files.,.ocf file Has one line in it of the following format. object NAME STACK_SIZE HEAP_SIZE SCHED_PRIORITY cache tlb user connect.cfg fileThis file is in /MS/OPEN-R/MW/CONFDi

14、ctates who talks to who using what services (registered in stub.cfg)Contains lines similar to : object1.sendStream.datatype1.S object2.recvStream.dataType1.O object.cfg filecontains a list of .bin files (objects)add the objects you have compiled do not erase tinyftpd.bin and powermon.bin,Executing a

15、nd Debugging,Insert the memory stick in the laptop. At the prompt, typemount /sony Once the memory stick has been mounted, then copy the files from /MS/OPEN_R to /sonycp rf /MS/OPEN_R /sony un-mount the memory stick.umount /sony Put the memory stick in the dog and press the power button on the dog.D

16、EBUGGINGFor debugging information see chapter 5 in the programmers manual. The explanation in the chapter is very clear and extensive.,Flow of Development,Design your objects Decide on the data type for the inter-object communication Write the stub.cfg file Write the core class with the necessary me

17、mber functions Write connect.cfg file Write your .ocf file Build Write object.cfg file Execute on AIBO Debug (perhaps),Parting Advice,See sample programs Do NOT let the AIBO walk on hard surfaces. This will break the joints. Use the robocup field or a similar carpet like surface. Do NOT use joint va

18、lues 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. You will PAY for any broken part. This tutorial is available online (by tonight) at http:/www.cc.gatech.edu/borg/robotsoccer/aibotut.html Programming the dogs for the first time can be frustrating. Do not hesitate to use the mailing list to ask questions.,

copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1