Install scriptsThis package runs scripts during installation (preinstall/install/postinstall)
Intel RealSense technology with JavaScript API for Linux OS
node-slam: Node.js Simultaneous Localization and Mapping (SLAM) module based on Intel RealSense technology.
Please refer to Release Note for details of current release.
Install
Prepare environment and then execute the following command in shell:
npm install --save node-slam
Examples
The following example shows the basic usage of this module. Before executing it, connect an Intel RealSense ZR300 Camera to your computer or developer board.
const slamModule = require('node-slam');
slamModule.createInstance().then(slam => {
slam.on('tracking', (evtData) => {
// Update on camera pose and etc.
console.log('Camera tracking:', evtData.cameraPose, evtData.accuracy);
slam.getOccupancyMapUpdate().then((mapData) => {
// mapData is updated
// TODO: process mapData.tileCount & etc.
});
// Optional: save map to disk
// slam.saveOccupancyMapAsPpm('occupancy.ppm', true).then(() => {
// // Map is saved
// });
});
slam.start().then(() => {
console.log('Camera + algorithm started...');
});
});
Document
Please refer to the project document home page, and also the details page listed below: