Closed jameszw001 closed 3 years ago
Hi @jameszw001 May I first ask a couple of questions please:
https://github.com/IntelRealSense/librealsense/releases
If you have installed librealsense for Ubuntu, what method did you use to install it?
Have you successfully built the nodejs wrapper?
https://github.com/IntelRealSense/librealsense/tree/master/wrappers/nodejs
If you have built it, have you tested it by running a simple example script?
https://github.com/IntelRealSense/librealsense/tree/master/wrappers/nodejs#2-run-examples
https://github.com/IntelRealSense/librealsense/tree/master/wrappers/nodejs/examples/realsense_viewer
What instructions did you use to launch this example, please?
It is also worth mentioning that from librealsense version 2.40.0 onwards there were changes to nodejs support to add support for nodejs 12 but drop support for nodejs 6.
Have you successfully built the nodejs wrapper?
cd wrappers/nodejs/examples
npm install
node nodejs-capture.js
I got
If you have built it, have you tested it by running a simple example script? Hope the above answered your questions.
What instructions did you use to launch this example, please?
node index.js
also
node -v v10.24.0
As the RealSense Viewer example is in a sub-folder of the examples directory called realsense_viewer, had you navigated to that directory before launching the Viewer's index.cpp script? The instructions would probably look like the ones below.
cd wrappers/nodejs/examples/realsense_viewer npm install node index.js
yes that is what I did
On Mar 6, 2021, at 7:43 AM, MartyG-RealSense notifications@github.com wrote:
As the RealSense Viewer example is in a sub-folder of the Examples directory called realsense-viewer, had you navigated to that directory before launching the Viewer's index.cpp script? The instructions would probably look like the ones below.
cd wrappers/nodejs/examples/realsense_viewer npm install node index.js
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
The process that you are using to launch realsense_viewer seems logically correct (though I am admittedly not a nodejs specialist). So it may be worth going back to looking at the installation process for the nodejs wrapper.
The npm install method is considered to be the simplest installation procedure instead of building the wrapper from source, but it has had problems in the past for some RealSense users. A user posted their own modified method for using npm install though in October 2020 that they said was successful for them,
https://github.com/IntelRealSense/librealsense/issues/7439#issuecomment-708503008
Hi @jameszw001 Do you require further assistance with this case, please? Thanks!
Thanks for the solution provided. I might try. I ended up using the python wrapper, which is working fine now. Thanks. I guess you can close this ticket for now.
On Fri, Mar 12, 2021 at 3:22 AM MartyG-RealSense @.***> wrote:
Hi @jameszw001 https://github.com/jameszw001 Do you require further assistance with this case, please? Thanks!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/IntelRealSense/librealsense/issues/8503#issuecomment-797320249, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASBEVMETELG33PLMMHTESYTTDHFLTANCNFSM4YUTBHUQ .
Excellent news that the Python wrapper provided a solution for you. Thanks very much for your agreement to close the case, which I shall now do. Feel free to re-open it at a future date if you need to. Good luck!
Issue Description
I will add more above later. I am trying the realsense_viewer example and I am getting:
`start command { tag: 'start', data: { sensor: 'RGB Camera', streams: [ [Object] ] } } [ { stream: 'color', resolution: '1280*720', format: 'rgb8', fps: 30 } ] open profiles: [] /home/a/Downloads/librealsense-master/wrappers/nodejs/index.js:3424 throw new TypeError(wrongTypeErrMsgPrefix + expectedType.name); ^
TypeError: argument 0 of Sensor.open() should be a/an StreamProfile at checkArgumentType (/home/a/Downloads/librealsense-master/wrappers/nodejs/index.js:3424:17) at ColorSensor.open (/home/a/Downloads/librealsense-master/wrappers/nodejs/index.js:743:7) at Realsense._handleStart (/home/a/Downloads/librealsense-master/wrappers/nodejs/examples/realsense_viewer/index.js:310:14) at Realsense.processCommand (/home/a/Downloads/librealsense-master/wrappers/nodejs/examples/realsense_viewer/index.js:111:14) at WebSocket.cmdSocket.on (/home/a/Downloads/librealsense-master/wrappers/nodejs/examples/realsense_viewer/index.js:372:13) at WebSocket.emit (events.js:198:13) at Receiver.receiverOnMessage (/home/a/Downloads/librealsense-master/wrappers/nodejs/examples/realsense_viewer/node_modules/ws/lib/websocket.js:720:20) at Receiver.emit (events.js:198:13) at Receiver.dataMessage (/home/a/Downloads/librealsense-master/wrappers/nodejs/examples/realsense_viewer/node_modules/ws/lib/receiver.js:414:14) at Receiver.getData (/home/a/Downloads/librealsense-master/wrappers/nodejs/examples/realsense_viewer/node_modules/ws/lib/receiver.js:346:17) `