rtc/OccupancyGridMap3D/sample/sample.py
Go to the documentation of this file.
1 import rtm
2 from rtm import *
3 from OpenHRP import *
4 
5 ogm = findRTC("OccupancyGridMap3D0")
6 ogm.setProperty("initialMap", "sample.bt")
7 ogm.start()
8 ogm_svc = OGMap3DServiceHelper.narrow(ogm.service("service1"))
9 aabb = AABB()
10 aabb.pos = Point3D()
11 aabb.pos.x = -3.5
12 aabb.pos.y = -5
13 aabb.pos.z = 0.5
14 aabb.size = Size3D()
15 aabb.size.l = 2.0
16 aabb.size.w = 4.0
17 aabb.size.h = 0.1
18 map = ogm_svc.getOGMap3D(aabb)
19 print "resolution = ",map.resolution
20 print "number of voxels = ",map.nx,"x",map.ny,"x",map.nz
21 for x in range(map.nx):
22  for y in range(map.ny):
23  for z in range(map.nz):
24  print map.cells[x*map.ny*map.nz+y*map.nz+z],
25  print
26 
27 
def findRTC(name, rnc=None)
get RT component
Definition: jython/rtm.py:341


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