ogmapTest1.py
Go to the documentation of this file.
1 import rtm
2 import commands
3 
5 mgr.load("VirtualCamera")
6 mgr.load("OccupancyGridMap3D")
7 mgr.load("OGMap3DViewer")
8 
9 vc = mgr.create("VirtualCamera")
10 ogmap = mgr.create("OccupancyGridMap3D")
11 viewer = mgr.create("OGMap3DViewer")
12 
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")
20 
21 ogmap.setProperty("resolution", "0.05")
22 
23 rtm.connectPorts(vc.port("cloud"), ogmap.port("cloud"))
24 rtm.connectPorts(vc.port("poseSensor"), ogmap.port("pose"))
25 rtm.connectPorts(ogmap.port("OGMap3DService"), viewer.port("OGMap3DService"))
26 
27 rtm.serializeComponents([vc,ogmap])
28 vc.start()
29 ogmap.start()
30 viewer.start()
31 
32 
def serializeComponents(rtcs, stopEC=True)
set up execution context of the first RTC so that RTCs are executed sequentially
Definition: jython/rtm.py:373
def findRTCmanager(hostname=None, rnc=None)
get RTCmanager
Definition: jython/rtm.py:321
def connectPorts(outP, inPs, subscription="flush", dataflow="Push", bufferlength=1, rate=1000)
connect ports
Definition: jython/rtm.py:433


hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Thu May 6 2021 02:41:50