Open haoyunfeix opened 7 years ago
Step 1: tar -C /path/to/node-realsense/src/ -hzcvf slam.tar.gz slam && npm install Step 2: make a slam.js with the content of:
tar -C /path/to/node-realsense/src/ -hzcvf slam.tar.gz slam && npm install
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...'); }); });
Step 3: Run node slam.js
node slam.js
Result: Segmentation fault (core dumped)
Segmentation fault (core dumped)
Step 1:
tar -C /path/to/node-realsense/src/ -hzcvf slam.tar.gz slam && npm install
Step 2: make a slam.js with the content of:Step 3: Run
node slam.js
Result:
Segmentation fault (core dumped)