ogmapTest1.py
Go to the documentation of this file.
00001 import rtm
00002 import commands
00003 
00004 mgr = rtm.findRTCmanager()
00005 mgr.load("VirtualCamera")
00006 mgr.load("OccupancyGridMap3D")
00007 mgr.load("OGMap3DViewer")
00008 
00009 vc     = mgr.create("VirtualCamera")
00010 ogmap  = mgr.create("OccupancyGridMap3D")
00011 viewer = mgr.create("OGMap3DViewer")
00012 
00013 openhrp_dir = commands.getoutput("pkg-config --variable=prefix openhrp3.1")
00014 project = "file://"+openhrp_dir+"/share/OpenHRP-3.1/sample/project/SampleRobot_inHouse.xml"
00015 vc.setProperty("project", project)
00016 vc.setProperty("camera", "Robot:VISION_SENSOR1")
00017 vc.setProperty("generateRange", "0")
00018 vc.setProperty("generatePointCloud", "1")
00019 vc.setProperty("generatePointCloudStep", "5")
00020 
00021 ogmap.setProperty("resolution", "0.05")
00022 
00023 rtm.connectPorts(vc.port("cloud"), ogmap.port("cloud"))
00024 rtm.connectPorts(vc.port("poseSensor"), ogmap.port("pose"))
00025 rtm.connectPorts(ogmap.port("OGMap3DService"), viewer.port("OGMap3DService"))
00026 
00027 rtm.serializeComponents([vc,ogmap])
00028 vc.start()
00029 ogmap.start()
00030 viewer.start()
00031 
00032 


hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Wed Sep 6 2017 02:35:55