@foxglove/velodyne-cloud
Version:
TypeScript library for converting Velodyne LIDAR packet data to point clouds
22 lines • 1.08 kB
JavaScript
;
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/
Object.defineProperty(exports, "__esModule", { value: true });
const Calibration_1 = require("../Calibration");
const PointCloud_1 = require("../PointCloud");
const RawPacket_1 = require("../RawPacket");
const Transformer_1 = require("../Transformer");
const VelodyneTypes_1 = require("../VelodyneTypes");
const packets_1 = require("../fixtures/packets");
const calibration = new Calibration_1.Calibration(VelodyneTypes_1.Model.HDL32E);
const transform = new Transformer_1.Transformer(calibration);
for (let i = 0; i < 500; i++) {
const raw = new RawPacket_1.RawPacket(packets_1.HDL32E_PACKET1);
const maxPoints = RawPacket_1.RawPacket.MAX_POINTS_PER_PACKET * 100;
const cloud = new PointCloud_1.PointCloud({ stamp: 0, maxPoints });
for (let j = 0; j < 100; j++) {
transform.unpack(raw, 0, 0, cloud);
}
}
//# sourceMappingURL=transform.js.map