def setUp(self): self.t = pcl.OctreePointCloudSearch(0.1) pc = pcl.PointCloud() pc.from_file("tests/table_scene_mug_stereo_textured_noplane.pcd") self.t.set_input_cloud(pc) self.t.define_bounding_box() self.t.add_points_from_input_cloud()
def setUp(self): self.octree = pcl.OctreePointCloudSearch(0.1) self.p = pcl.load("tests" + os.path.sep + "tutorials" + os.path.sep + "table_scene_mug_stereo_textured_noplane.pcd") self.octree.set_input_cloud(self.p) self.octree.define_bounding_box() self.octree.add_points_from_input_cloud()
def __init__(self, wr, hr, view, do_round=True): self.cloud = pcl.PointCloud() self.view = view self.wr = wr self.hr = hr self.do_round = do_round self.octree = pcl.OctreePointCloudSearch(0.1) self.camera = Camera(wr, hr, view, do_round=do_round)
def add_agent(self, agent_cloud): tup = tools.round_coords( tools.find_bounding_box_center(agent_cloud.to_list())) self.agents[tuple(tup)] = agent_cloud self.octree = pcl.OctreePointCloudSearch(0.1) self.timestamp[tuple(tup)] = datetime.datetime.now() new_ls = self.cloud.to_list() new_ls.append(tup) self.cloud = pcl.PointCloud(new_ls)
def __init__(self, wr, hr, view, do_round=True): self.cloud = pcl.PointCloud() self.agManager = AgentManager() self.view = view self.wr = wr #max width view in radians self.hr = hr #max height view in radians self.do_round = do_round #if true, round coordinates to nearest int self.octree = pcl.OctreePointCloudSearch(0.1) self.mi = None self.mj = None self.hasmatrix = False self.voxel_size = 5000 #10 meters