Coder Social home page Coder Social logo

Comments (22)

qian256 avatar qian256 commented on May 30, 2024 1

If it is RS4, then the main issue will be the MediaCapture Source Group order has changed. Please modify line 214 of ARUWPVideo.cs to

SourceGroup = allGroups[1],

from hololensartoolkit.

doughtmw avatar doughtmw commented on May 30, 2024

Is the scale of the marker images that you printed off the same as what is listed within Unity? Check the ARUWP Controller asset -> ARUWP Marker and size in mm field. Also, depending on which test scene you are running, you want to make sure that you have printed off the correct marker script, as in the one that is listed under the File Name field in the ARUWP Marker script (for the HoloLensARToolKitSingle scene, there are marker images - Hiro, and Kanji - found here https://github.com/artoolkit/artoolkit5/tree/master/doc/patterns).

from hololensartoolkit.

qian256 avatar qian256 commented on May 30, 2024

@Derekioh , did you import the ARToolKitUWP.unitypackage into your project?

from hololensartoolkit.

DoctorWarrior avatar DoctorWarrior commented on May 30, 2024

I have the same issues. Just to make sure that I did things correctly, here are some questions:

  • I wanted to run the "single marker" sample. Which sample exactly should I use? I assumed it was HoloLensARToolKitSingle.unity. However, there were only Hiro and Kanji.
  • which maker and what size exactly should I use? I found the marker in ARUMP Controller that are "hiro.patt" and "kanji.patt" and the sizes were "80mm" (I assumed that means they are 80x80mm). However, it was not working.
    Please respond here at your earlier convenience. Your help will be greatly appreciated. Thanks very much!

from hololensartoolkit.

qian256 avatar qian256 commented on May 30, 2024

@DoctorWarrior

  1. Yes. It only has Hiro and Kanji
  2. Yes it is 80x80mm. Is the white light on that indicates the camera is running? Do you see the video preview plane?

from hololensartoolkit.

DoctorWarrior avatar DoctorWarrior commented on May 30, 2024

Thanks for your response!
Yes I see the light and the preview plane. However, the video preview is just a white box.
Pretty much I think its a thing related to the camera. I tested the camera on my Hololens and it works well. However when I run your sample there is nothing on the preview box. Any tips for troubleshooting? Thanks!

from hololensartoolkit.

qian256 avatar qian256 commented on May 30, 2024

White light that is visible outside, indicating the camera is running. In your case, the camera is not running. It may be because the "Webcam" capability is not switched on.

from hololensartoolkit.

DoctorWarrior avatar DoctorWarrior commented on May 30, 2024

Thanks! BTW, where did you run the app? From unity or visual studio?

from hololensartoolkit.

qian256 avatar qian256 commented on May 30, 2024

Deploy to HoloLens and run on HoloLens

from hololensartoolkit.

DoctorWarrior avatar DoctorWarrior commented on May 30, 2024

deploy from what? unity or visual studio?

from hololensartoolkit.

qian256 avatar qian256 commented on May 30, 2024

I deploy it from Visual Studio.

from hololensartoolkit.

McCulloughRT avatar McCulloughRT commented on May 30, 2024

I second this issue. I see the preview pane showing pure white. The white light on the exterior of the device is not lit, indicating the camera is not running, however I do have "webcam" capability enabled in unity settings. Also "Video" and "Track" both display 0 frames per second on the UI.

Using Unity 2017.4 LTS, and Visual Studio 2017. Trying to track the Hiro marker, printed at the correct size (I measured).

from hololensartoolkit.

qian256 avatar qian256 commented on May 30, 2024

@McCulloughRT Is your HoloLens using RS4 software build?

from hololensartoolkit.

McCulloughRT avatar McCulloughRT commented on May 30, 2024

Yes, it is. If it helps, I get a console message in the VS debugger:
Error (2): unable to open camera parameters file "Data/StreamingAssets/hololens1344x756.dat" for reading.

Maybe because the param file is "hololens896x504.dat"?

Looks like the message is coming from the native code, which I'm less familiar with, but I'll keep digging...

from hololensartoolkit.

qian256 avatar qian256 commented on May 30, 2024

Also, I noticed that with RS4, the performance of tracking is a little unstable compared to previous build. But I haven't got time to look into it.

from hololensartoolkit.

McCulloughRT avatar McCulloughRT commented on May 30, 2024

Update: Changing the name of the camera parameters file (the actual file name, the public variable on the ARUWP Controller script did nothing) did fix the camera not turning on issue. I tried changing to allGroups[1] as you recommended but that broke the camera again.

The application is functioning now, but tracking is off by about 3 inches in each axis and is very unstable.

from hololensartoolkit.

qian256 avatar qian256 commented on May 30, 2024

What is frame rate of tracking, and the video?

from hololensartoolkit.

McCulloughRT avatar McCulloughRT commented on May 30, 2024

right at 30fps, rotational tracking is almost perfect, its just positioning thats off

from hololensartoolkit.

qian256 avatar qian256 commented on May 30, 2024

Then the system is already running at the fastest. The issue is the lack of calibration. HoloLens don't how the relative pose between your eye and the camera. You should tune the magicMatrix in ARUWPMarker to manually offset it. It is a systematic and consistent offset.

from hololensartoolkit.

McCulloughRT avatar McCulloughRT commented on May 30, 2024

Since rotation is fine and translation fixes need to be applied, I think I need a 4th row in the magic matrix to encode translation, is that correct? Or am I not understanding how the magic matrix is being used?

from hololensartoolkit.

linhdoan8 avatar linhdoan8 commented on May 30, 2024

@McCulloughRT Hi, I have a the same problem you had, that only the white box is showing but in my debugging console theres is no such error as

Error (2): unable to open camera parameters file "Data/StreamingAssets/hololens1344x756.dat" for reading.

it throws some exceptions and also errors that it could not open sensor information and access denied.

ERROR FindDefaultInterface:CM_Get_Device_Interface_List_Size failed:0x00000000, InterfaceListSize = 1
ERROR SensorOpenByType:Failed to open sensor error:0x00000490

I made sure that

allow unsafe code

is checked in Unity Player Settings. But @qian256 metioned in the How To section, that we have to set the Assembly C sharp to allow unsafe code, how can I do that, because in my visual studio there is no possibility to set 'allow unsafe code' only in the Unity Player Settings. Also tried to change the hololens dat files like @McCulloughRT but didnt help. Do you have any ideas where the bug lies? Were there anything else you have to set or configure?

Another strange thing is that in the debugging console many of these lines appear, if i give the permission to use the cam afer the app ask for permission:

onecoreuap\xbox\devices\api\winrt\pnpapiwrapper.cpp(385)\Windows.Gaming.Input.dll!712D2F3E: (caller: 712D5E27) ReturnHr(1) tid(1108) 8685C003 Access is denied.

Hope for your help and thanks!

EDIT : now it works! After some research, I had to turn the Scripting Backend to .NET. You can find it in Unity under File-->Build Settings-->Configuration-->Scripting Backend set to .NET instead of IL2CPP.
After that build the project and open it in visual studio. Go to Project-->Properties-->Build and make sure allow unsafe code is checked. No run and the cam should get on.

from hololensartoolkit.

linhdoan8 avatar linhdoan8 commented on May 30, 2024

@qian256 Thanks very much for the advice to set
SourceGroup = allGroups[1],
This also has to be set because the MediaCpature order in RS4 has changed and elsewise Visual Studio would give you a access denied error!

from hololensartoolkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.