-
Notifications
You must be signed in to change notification settings - Fork 2
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
Nft feature #18
base: master
Are you sure you want to change the base?
Nft feature #18
Conversation
This is the log from the console with the latest commit 837a139: artoolkitx.js:6 [info] Starting...
artoolkitx.js:6 [info] Setting video configuration '-module=Web -width=640 -height=480'.
artoolkitx.js:6 [info] Setting camera parameters file '/camera_param_0'.
artoolkitx.js:6 [info] Opening artoolkitX video using configuration '-module=Web -width=640 -height=480'.
artoolkitx.js:6 [info] Using supplied video config "-module=Web -width=640 -height=480".
artoolkitx.js:6 [info] ar2VideoOpenAsyncWeb '-module=Web -width=640 -height=480'.
artoolkitX.api.js:84 artoolkitX started
artoolkitx.js:6 [info] ARVideoSource::webVideoPushInit ...
artoolkitx.js:6 [info] Opened artoolkitX video 640x480@4Bpp (AR_PIXEL_FORMAT_RGBA).
artoolkitx.js:6 [info] Camera parameters loaded from file '/camera_param_0'.
simple_video_nft.html:40 start done
artoolkitX.api.js:952 GET http://127.0.0.1:8000/home/walter/kalwalt-github/artoolkitX.js/Examples/Data/pinball-data/pinball.fset 404 (File not found)
artoolkitX.api.js:1148 404
artoolkitx.js:6 [info] Loading '/home/walter/kalwalt-github/artoolkitX.js/Examples/Data/pinball-data/pinball.fset'.
artoolkitx.js:6 [info]
artoolkitx.js:6 ### Surface No.1 ###
artoolkitx.js:6 [info] Read ImageSet.
artoolkitx.js:6 [error] Error: unable to open file '/home/walter/kalwalt-github/artoolkitX.js/Examples/Data/pinball-data/pinball.iset' for reading.
artoolkitx.js:6 [error] Error opening file '/home/walter/kalwalt-github/artoolkitX.js/Examples/Data/pinball-data/pinball.iset'.
artoolkitx.js:6 [error] Error reading data from '/home/walter/kalwalt-github/artoolkitX.js/Examples/Data/pinball-data/pinball.fset'.
artoolkitx.js:6 [error] Error: Failed to load trackable.
artoolkitX.api.js:293 Uncaught (in promise) Faild to add Trackable: -1
simple_video_nft.html:42 [Violation] 'setInterval' handler took 258ms
simple_video_nft.html:42 [Violation] 'setInterval' handler took 64ms
|
Maybe the solution is |
i think i had developed a non well formed code for the the Promise.all() this last part do not return any thing: ARController[_ajax](item.url, filename).then(() => Promise.resolve(filename)).catch(e => {
Promise.reject(e) }),
console.log("nft loaded"))
}).then(() => Promise.resolve(filename)).catch(e => { Promise.reject(e) }) according to this article https://www.freecodecamp.org/news/promise-all-in-javascript-with-example-6c8c5aea3e32/ |
@ThorstenBux @nicolocarpignoli it willl be nice to continue the development here also and comparing this with jsartoolkit5... what do you think? |
@ThorstenBux with the latest commit it seems that the nft marker is loade but stop when reading the .iset: artoolkitX.api.js:66 Version: 1.0.5
artoolkitx.js:6 [info] Starting...
artoolkitx.js:6 [info] Setting video configuration '-module=Web -width=640 -height=480'.
artoolkitx.js:6 [info] Setting camera parameters file '/camera_param_0'.
artoolkitx.js:6 [info] Opening artoolkitX video using configuration '-module=Web -width=640 -height=480'.
artoolkitx.js:6 [info] Using supplied video config "-module=Web -width=640 -height=480".
artoolkitx.js:6 [info] ar2VideoOpenAsyncWeb '-module=Web -width=640 -height=480'.
artoolkitX.api.js:84
artoolkitX started
artoolkitx.js:6 [info] ARVideoSource::webVideoPushInit ...
artoolkitx.js:6 [info] Opened artoolkitX video 640x480@4Bpp (AR_PIXEL_FORMAT_RGBA).
artoolkitx.js:6 [info] Camera parameters loaded from file '/camera_param_0'.
simple_video_nft.html:41 start done
artoolkitx.js:6 [info] Loading '/nft_trackable_.fset'.
artoolkitx.js:6 [info]
artoolkitx.js:6 ### Surface No.1 ###
artoolkitx.js:6 [info] Read ImageSet.
artoolkitx.js:6 [info] Imageset contains 9 images.
artoolkitx.js:6 [error] Error reading JPEG file.
artoolkitx.js:6 [warning] Falling back to reading '/nft_trackable_.iset' in ARToolKit v4.x format.
artoolkitx.js:6 OOM
artoolkitx.js:6 OOM
artoolkitX.api.js:294 Uncaught (in promise) abort(OOM). Build with -s ASSERTIONS=1 for more info.
145
[Violation] 'setInterval' handler took <N>ms note the error: |
i found this issue on artoolkitx artoolkitx/artoolkitx#47 |
Now the nft is loaaded but i get this error: artoolkitx.js:6 [info] Loading '/nft_trackable_0.fset'.
artoolkitx.js:6 [info]
artoolkitx.js:6 ### Surface No.1 ###
artoolkitx.js:6 [info] Read ImageSet.
artoolkitx.js:6 [info] Imageset contains 9 images.
artoolkitx.js:6 [info] end.
artoolkitx.js:6 [info] Read FeatureSet.
artoolkitx.js:6 [info] end.
artoolkitx.js:6 [info] First NFT marker trackable added; enabling NFT marker tracker.
artoolkitx.js:6 [info] Added trackable (UID=0), total trackables loaded: 1.
artoolkitX.api.js:758 Trackable 0 not visible
artoolkitx.js:6 [info] Tracking thread = 4
artoolkitx.js:6 [info] Using NFT tracking settings for more than one CPU.
artoolkitx.js:6 [info] Loading NFT data.
artoolkitx.js:6 [info] Reading '/nft_trackable_0.fset3'.
artoolkitx.js:6 [info] Assigned page no. 0.
artoolkitx.js:6 [info] Done.
artoolkitx.js:6 [info] points-636
artoolkitx.js:6 [info] points-648
artoolkitx.js:6 [info] points-615
artoolkitx.js:6 [info] points-607
artoolkitx.js:6 [info] points-590
artoolkitx.js:6 [info] points-540
artoolkitx.js:6 [info] points-508
artoolkitx.js:6 [info] points-437
artoolkitx.js:6 [info] points-269
artoolkitx.js:6 [info] Starting NFT tracking thread.
artoolkitx.js:6 [error] trackingInitInit()
artoolkitx.js:6 [error] Unable to load NFT data.
artoolkitX.api.js:163 Trackable 0 not visible
artoolkitX.api.js:758 Trackable 0 not visible
artoolkitx.js:6 [info] Loading NFT data.
artoolkitx.js:6 [info] Reading '/nft_trackable_0.fset3'.
artoolkitx.js:6 [info] Assigned page no. 0.
artoolkitx.js:6 [info] Done.
artoolkitx.js:6 [info] points-636
artoolkitX.api.js:168 Unable to detect marker: 19343656 because artoolkitX.js is not build with pthread enabled it fails the threading part, so i think there are 2 solutions:
|
We would need to remove the threading then. I don’t want to use experimental browser settings.
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Walter Perdan <[email protected]>
Sent: Sunday, January 5, 2020 8:15:03 AM
To: augmentmy-world/artoolkitX.js <[email protected]>
Cc: Thorsten Bux <[email protected]>; Mention <[email protected]>
Subject: Re: [augmentmy-world/artoolkitX.js] Nft feature (#18)
Now the nft is loaaded but i get this error:
artoolkitx.js:6 [info] Loading '/nft_trackable_0.fset'.
artoolkitx.js:6 [info]
artoolkitx.js:6 ### Surface No.1 ###
artoolkitx.js:6 [info] Read ImageSet.
artoolkitx.js:6 [info] Imageset contains 9 images.
artoolkitx.js:6 [info] end.
artoolkitx.js:6 [info] Read FeatureSet.
artoolkitx.js:6 [info] end.
artoolkitx.js:6 [info] First NFT marker trackable added; enabling NFT marker tracker.
artoolkitx.js:6 [info] Added trackable (UID=0), total trackables loaded: 1.
artoolkitX.api.js:758 Trackable 0 not visible
artoolkitx.js:6 [info] Tracking thread = 4
artoolkitx.js:6 [info] Using NFT tracking settings for more than one CPU.
artoolkitx.js:6 [info] Loading NFT data.
artoolkitx.js:6 [info] Reading '/nft_trackable_0.fset3'.
artoolkitx.js:6 [info] Assigned page no. 0.
artoolkitx.js:6 [info] Done.
artoolkitx.js:6 [info] points-636
artoolkitx.js:6 [info] points-648
artoolkitx.js:6 [info] points-615
artoolkitx.js:6 [info] points-607
artoolkitx.js:6 [info] points-590
artoolkitx.js:6 [info] points-540
artoolkitx.js:6 [info] points-508
artoolkitx.js:6 [info] points-437
artoolkitx.js:6 [info] points-269
artoolkitx.js:6 [info] Starting NFT tracking thread.
artoolkitx.js:6 [error] trackingInitInit()
artoolkitx.js:6 [error] Unable to load NFT data.
artoolkitX.api.js:163 Trackable 0 not visible
artoolkitX.api.js:758 Trackable 0 not visible
artoolkitx.js:6 [info] Loading NFT data.
artoolkitx.js:6 [info] Reading '/nft_trackable_0.fset3'.
artoolkitx.js:6 [info] Assigned page no. 0.
artoolkitx.js:6 [info] Done.
artoolkitx.js:6 [info] points-636
artoolkitX.api.js:168 Unable to detect marker: 19343656
because artoolkitX.js is not build with pthread enabled it fails the threading part, so i think there are 2 solutions:
1. build ArtoolkitX.js with threading enabled but this means you need to enabled the SharedArrayBuffer option in the browser ( and the Spectre issue !!)
2. developing another version without multithreading as we did with jsartoolkit5...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Faugmentmy-world%2FartoolkitX.js%2Fpull%2F18%3Femail_source%3Dnotifications%26email_token%3DAD765PAKGG2ZTURDZYFXIZLQ4DN3PA5CNFSM4IPFYYL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIC6KBA%23issuecomment-570811652&data=02%7C01%7C%7C65113b4e77ef48e9c6b308d7914a67a1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637137621054082624&sdata=E1Kem%2FBf3DwXDKRDpIDd5R5JGyksShFuqCE4OVOZ6AI%3D&reserved=0>, or unsubscribe<https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAD765PE45WSNETZ4OPPM3M3Q4DN3PANCNFSM4IPFYYLQ&data=02%7C01%7C%7C65113b4e77ef48e9c6b308d7914a67a1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637137621054092633&sdata=4nHm6lskEODRG4GN3m4fUrpHT5mZYj5rXCTDLD%2FLczQ%3D&reserved=0>.
|
Yes, i will start this. I think It will be not so difficult because this part of the code Is similar to the jsartoolkit5 code. |
@kalwalt have you had time to look into this yet? |
@ThorstenBux I started to work a month ago, but hadn''t the time to continúe. It's needed to make changes in the ArtoolkitX source code to give a double option with and without threading , this Is the hardest part of the work... |
An attempt to add Nft to ArtoolkitX.js the main problem (at least for me) is the loading mechanism.
we need to add the basepath in the config for the trackable, but the _ajax function need the the full path, for the three files with extension:
.fset
.iset
.fset3
This is a draft PR just to test NFT. Probably i will close this and i will re-send another clean PR as i will find the solution.
Note: it is needed to enable NFT during the compilation of artoolkitx.js see my branch nft-emscripten