ogmapTest2.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("Range2PointCloud")
00007 mgr.load("OccupancyGridMap3D")
00008 mgr.load("OGMap3DViewer")
00009 
00010 vc     = mgr.create("VirtualCamera")
00011 r2pc   = mgr.create("Range2PointCloud")
00012 ogmap  = mgr.create("OccupancyGridMap3D")
00013 viewer = mgr.create("OGMap3DViewer")
00014 
00015 openhrp_dir = commands.getoutput("pkg-config --variable=prefix openhrp3.1")
00016 project = "file://"+openhrp_dir+"/share/OpenHRP-3.1/sample/project/SampleRobot_inHouse.xml"
00017 vc.setProperty("project", project)
00018 vc.setProperty("camera", "Robot:VISION_SENSOR1")
00019 vc.setProperty("generateRange", "1")
00020 vc.setProperty("rangerMaxAngle", "0.4")
00021 vc.setProperty("rangerMinAngle", "-0.4")
00022 
00023 ogmap.setProperty("resolution", "0.05")
00024 
00025 viewer.setProperty("xSize", "5")
00026 viewer.setProperty("ySize", "5")
00027 viewer.setProperty("zSize", "2.5")
00028 viewer.setProperty("xOrigin", "0")
00029 viewer.setProperty("yOrigin", "-2.5")
00030 viewer.setProperty("zOrigin", "-0.5")
00031 
00032 rtm.connectPorts(vc.port("range"), r2pc.port("range"))
00033 rtm.connectPorts(r2pc.port("cloud"), ogmap.port("cloud"))
00034 rtm.connectPorts(vc.port("poseSensor"), ogmap.port("pose"))
00035 rtm.connectPorts(ogmap.port("OGMap3DService"), viewer.port("OGMap3DService"))
00036 
00037 vc.start()
00038 r2pc.start()
00039 ogmap.start()
00040 viewer.start()
00041 
00042 


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