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("++++++++++++++++++++++++