示例#1
0
def extract_pcd_data(dest_dir, msg):
    """
    Transform protobuf PointXYZIT to standard PCL bin_compressed_file(*.pcd).
    """
    cur_time_second = msg.timestamp
    pointcloud = POINTCLOUD_OBJ
    pointcloud.ParseFromString(msg.message)

    pc_meta = make_xyzit_point_cloud(pointcloud.point)
    pcd_file = os.path.join(dest_dir, '{}.pcd'.format(cur_time_second))
    pypcd.save_point_cloud_bin_compressed(pc_meta, pcd_file)
    return True
示例#2
0
 def save_pointcloud_meta_to_file(self, pc_meta, pcd_file):
     pypcd.save_point_cloud_bin_compressed(pc_meta, pcd_file)