1、行走时利用超声波进行避障

这些都是在choregraphe中完成的,怎样修改指令盒达到自己的要求:创建一个指令盒:
class MyClass(GeneratedClass):
def __init__(self):
GeneratedClass.__init__(self)
def onLoad(self):
#~ puts code for box initialization here
pass
def onUnload(self):
#~ puts code for box cleanup here
pass
def onInput_onStart(self):
self.myfun()
self.onStopped() #~ activate output of the box
pass
def onInput_onStop(self):
self.onUnload() #~ it is recommanded to call onUnload of this box in a onStop method, as the code written in onUnload is used to stop the box as well
pass
def myfun()
self.logger.info("++++++++++++++++++++++++")
指令盒运行过程:
- 指令盒实例化
- 将指令盒注册为模块,这样它就可以通过链接,从其它指令盒里调用。 </

本文介绍了NAO机器人如何利用超声波进行避障,详细阐述了指令盒的初始化和自定义函数的使用。同时探讨了Walk Tracker的运行原理,通过C++编写module实现红球追踪,解析了相关API的功能和实验结果,揭示了NAO识别方向、行走距离和方位的能力。

633

被折叠的 条评论
为什么被折叠?



