sample.py
Go to the documentation of this file.
00001 import rtm
00002 from rtm import *
00003 from OpenHRP import *
00004 
00005 ogm = findRTC("OccupancyGridMap3D0")
00006 ogm.setProperty("initialMap", "sample.bt")
00007 ogm.start()
00008 ogm_svc = OGMap3DServiceHelper.narrow(ogm.service("service1"))
00009 aabb = AABB()
00010 aabb.pos = Point3D()
00011 aabb.pos.x = -3.5
00012 aabb.pos.y = -5
00013 aabb.pos.z = 0.5
00014 aabb.size = Size3D()
00015 aabb.size.l = 2.0
00016 aabb.size.w = 4.0
00017 aabb.size.h = 0.1
00018 map = ogm_svc.getOGMap3D(aabb)
00019 print "resolution = ",map.resolution
00020 print "number of voxels = ",map.nx,"x",map.ny,"x",map.nz
00021 for x in range(map.nx):
00022     for y in range(map.ny): 
00023         for z in range(map.nz): 
00024             print map.cells[x*map.ny*map.nz+y*map.nz+z],
00025     print
00026 
00027 


hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Wed May 15 2019 05:02:18