-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: argument 0 of Sensor.open() should be a/an StreamProfile #8503
Comments
Hi @jameszw001 May I first ask a couple of questions please:
https://github.com/IntelRealSense/librealsense/releases
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
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?
If you have built it, have you tested it by running a simple example script? What instructions did you use to launch this example, please?
|
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 |
yes that is what I did
… On Mar 6, 2021, at 7:43 AM, MartyG-RealSense ***@***.***> 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, |
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
<#8503 (comment)>,
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! |
18.04)) #7318.04.1-Ubuntu SMP Tue Jan 19 09:02:24 UTC 2021Issue 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)
`
The text was updated successfully, but these errors were encountered: