-
Notifications
You must be signed in to change notification settings - Fork 90
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
App runs but ARToolkit not working #26
Comments
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). |
@Derekioh , did you import the ARToolKitUWP.unitypackage into your project? |
I have the same issues. Just to make sure that I did things correctly, here are some questions:
|
|
Thanks for your response! |
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. |
Thanks! BTW, where did you run the app? From unity or visual studio? |
Deploy to HoloLens and run on HoloLens |
deploy from what? unity or visual studio? |
I deploy it from Visual Studio. |
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). |
@McCulloughRT Is your HoloLens using RS4 software build? |
Yes, it is. If it helps, I get a console message in the VS debugger: 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... |
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
|
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. |
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. |
What is frame rate of tracking, and the video? |
right at 30fps, rotational tracking is almost perfect, its just positioning thats off |
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. |
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? |
@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
it throws some exceptions and also errors that it could not open sensor information and access denied.
I made sure that
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:
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. |
@qian256 Thanks very much for the advice to set |
I have tried both running the samples in unity and running a compiled version to the Hololens. The program runs, but the video preview is just a white box and the the tracking of the patterns does not work. Any thoughts on what could be going wrong?
I have tried using both unity 2017 and unity 5.6.f3. Have also tried both Visual studio 2015 and 2017.
The text was updated successfully, but these errors were encountered: