重播一个.arv视频文件(测试版)

在本例中,我们要重播一个在前一节记录的.arv文件,并通过一个Python脚本在Telepathe显示这个文件。

# First modify the AL_DIR/preferences/VideoInput.xml file to activate FileCam and relaunch NAOqi camProxy = ALProxy("ALVideoDevice", IP, PORT) pRange = [20, 80] pLoop = True pReplayMode = 3 pStreamNumber = 0 #optional camProxy.setVideo("/home/nao/naoqi/data/myFile.arv", pRange, pLoop, pReplayMode, pStreamNumber) # You can now launch Telepathe that will display the 21st frame of the file # Provide the 22nd image to the VIM that will transmit it to the GVM camProxy.nextImage() # Plays a new frame every 2 seconds. NextImage() and previousImage() can still be called. camProxy.replaySpeed(0.5)





Copyright © 2010 Aldebaran-Robotics - 版权所有