viewSimTest.py
Go to the documentation of this file.
1 import hrp
2 
3 import jp.go.aist.hrp.simulator.ViewSimulatorHelper as ViewSimulatorHelper
4 import jp.go.aist.hrp.simulator.CameraSequenceHolder as CameraSequenceHolder
5 import jp.go.aist.hrp.simulator.ImageData as ImageData
6 obj = hrp.findObject("ViewSimulator")
7 view = ViewSimulatorHelper.narrow(obj)
8 csh = CameraSequenceHolder()
9 view.getCameraSequence(csh)
10 
11 data = csh.value[0].getImageData()
12 print("camera0")
13 print(len(data.longData))
14 print(len(data.octetData))
15 print(len(data.floatData))
16 for i in range(0, 240):
17  print(data.longData[i*320])
18 
19 data = csh.value[1].getImageData()
20 print("camera1")
21 print(len(data.longData))
22 print(len(data.octetData))
23 print(len(data.floatData))
24 #for i in range(0, 240):
25 # print data.floatData[i*320]
26 
27 print("finished")
28 
29 
hrp.findObject
def findObject(objname, rnc=None)
Definition: hrp.py:38


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Wed Sep 7 2022 02:51:04