@foxglove/velodyne-cloud
Version:
TypeScript library for converting Velodyne LIDAR packet data to point clouds
58 lines • 1.46 kB
TypeScript
export declare enum PointFieldDataType {
INT8 = 1,
UINT8 = 2,
INT16 = 3,
UINT16 = 4,
INT32 = 5,
UINT32 = 6,
FLOAT32 = 7,
FLOAT64 = 8
}
export declare type PointField = {
name: string;
offset: number;
datatype: PointFieldDataType;
count: number;
};
export declare type Point = {
x: number;
y: number;
z: number;
distance: number;
intensity: number;
ring: number;
azimuth: number;
deltaNs: number;
};
/**
* PointCloud construction options
*/
export declare type PointCloudOptions = {
/**
* Timestamp of the first scan data in this PointCloud, represented as a
* floating point number of seconds since the epoch.
*/
stamp: number;
/**
* Maximum number of points this PointCloud will store.
*/
maxPoints: number;
};
export declare class PointCloud {
static POINT_STEP: number;
readonly stamp: number;
readonly fields: PointField[];
readonly height: number;
width: number;
readonly is_bigendian: boolean;
readonly point_step: number;
row_step: number;
data: Uint8Array;
readonly is_dense: boolean;
private _view;
constructor({ stamp, maxPoints }: PointCloudOptions);
addPoint(x: number, y: number, z: number, distance: number, intensity: number, ring: number, azimuth: number, deltaNs: number): void;
point(index: number): Point;
trim(): void;
}
//# sourceMappingURL=PointCloud.d.ts.map