欢迎来到麦多课文档分享! | 帮助中心 海量文档,免费浏览,给你所需,享你所想!
麦多课文档分享
全部分类
  • 标准规范>
  • 教学课件>
  • 考试资料>
  • 办公文档>
  • 学术论文>
  • 行业资料>
  • 易语言源码>
  • ImageVerifierCode 换一换
    首页 麦多课文档分享 > 资源分类 > PPT文档下载
    分享到微信 分享到微博 分享到QQ空间

    AIBO Tutorial.ppt

    • 资源ID:378148       资源大小:68.50KB        全文页数:20页
    • 资源格式: PPT        下载积分:2000积分
    快捷下载 游客一键下载
    账号登录下载
    微信登录下载
    二维码
    微信扫一扫登录
    下载资源需要2000积分(如需开发票,请勿充值!)
    邮箱/手机:
    温馨提示:
    如需开发票,请勿充值!快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如需开发票,请勿充值!如填写123,账号就是123,密码也是123。
    支付方式: 支付宝扫码支付    微信扫码支付   
    验证码:   换一换

    加入VIP,交流精品资源
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    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.,


    注意事项

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




    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

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

    收起
    展开