5 mgr.load(
"VirtualCamera")
6 mgr.load(
"Range2PointCloud")
7 mgr.load(
"OccupancyGridMap3D")
8 mgr.load(
"OGMap3DViewer")
10 vc = mgr.create(
"VirtualCamera")
11 r2pc = mgr.create(
"Range2PointCloud")
12 ogmap = mgr.create(
"OccupancyGridMap3D")
13 viewer = mgr.create(
"OGMap3DViewer")
15 openhrp_dir = commands.getoutput(
"pkg-config --variable=prefix openhrp3.1")
16 project =
"file://"+openhrp_dir+
"/share/OpenHRP-3.1/sample/project/SampleRobot_inHouse.xml" 17 vc.setProperty(
"project", project)
18 vc.setProperty(
"camera",
"Robot:VISION_SENSOR1")
19 vc.setProperty(
"generateRange",
"1")
20 vc.setProperty(
"rangerMaxAngle",
"0.4")
21 vc.setProperty(
"rangerMinAngle",
"-0.4")
23 ogmap.setProperty(
"resolution",
"0.05")
25 viewer.setProperty(
"xSize",
"5")
26 viewer.setProperty(
"ySize",
"5")
27 viewer.setProperty(
"zSize",
"2.5")
28 viewer.setProperty(
"xOrigin",
"0")
29 viewer.setProperty(
"yOrigin",
"-2.5")
30 viewer.setProperty(
"zOrigin",
"-0.5")
35 rtm.connectPorts(ogmap.port(
"OGMap3DService"), viewer.port(
"OGMap3DService"))
def findRTCmanager(hostname=None, rnc=None)
get RTCmanager
def connectPorts(outP, inPs, subscription="flush", dataflow="Push", bufferlength=1, rate=1000)
connect ports