5 mgr.load(
"VirtualCamera")
6 mgr.load(
"OccupancyGridMap3D")
7 mgr.load(
"OGMap3DViewer")
9 vc = mgr.create(
"VirtualCamera")
10 ogmap = mgr.create(
"OccupancyGridMap3D")
11 viewer = mgr.create(
"OGMap3DViewer")
13 openhrp_dir = commands.getoutput(
"pkg-config --variable=prefix openhrp3.1")
14 project =
"file://"+openhrp_dir+
"/share/OpenHRP-3.1/sample/project/SampleRobot_inHouse.xml" 15 vc.setProperty(
"project", project)
16 vc.setProperty(
"camera",
"Robot:VISION_SENSOR1")
17 vc.setProperty(
"generateRange",
"0")
18 vc.setProperty(
"generatePointCloud",
"1")
19 vc.setProperty(
"generatePointCloudStep",
"5")
21 ogmap.setProperty(
"resolution",
"0.05")
25 rtm.connectPorts(ogmap.port(
"OGMap3DService"), viewer.port(
"OGMap3DService"))
def serializeComponents(rtcs, stopEC=True)
set up execution context of the first RTC so that RTCs are executed sequentially
def findRTCmanager(hostname=None, rnc=None)
get RTCmanager
def connectPorts(outP, inPs, subscription="flush", dataflow="Push", bufferlength=1, rate=1000)
connect ports