#π§-ar-simulation-help
https://github.com/needle-tools/ar-simulation#troubleshooting-%EF%B8%8F
Anyone else have issues with the plane manager? This is an AR Foundations problems where the planes end up stacking on top of eachother the longer it runs. Here i am running the "RayCast Planes" scene from the examples files, but i get the same behavior in other projects like ar-foundation-samples. Both in simulator and on device
Hey, try increase the sample count to 4 or 5 on the Simulated AR Plane Generation script.
(sample count means: how many points on a plane need to be detected to emit a new AR plane, so it is less likely to find these planes with weird slopes (like in your image) because one point hit a the side of an object and two other hit the ground)
ok i'll try that. Do you guys recommend using vuforia? All i need is plane detection
I havent used vuforia in years, they seem to support AR Foundation now but I havent tried that yet. If you only need plane detection you can also just use AR Foundation + Plane Manager. But it depends on your app I guess (and if vuforia does make specific things easier for you)
That being said: ARSim is for editor simulation only, so it will help you to develop your app but not run on device π
Hi everyone. I appear to be blind - is there still an evaluation package available? I'm torn between this asset and the AR Remote.
Hello <@478531488145473546> you can download the installer from github (see quick start section) for evaluation https://github.com/needle-tools/ar-simulation
Thank you so much, I was blind indeed π
Hi! Also please note that AR Simulation and AR Remote serve kind of different use cases - ours adds AR capabilities to the editor so you can simulate how a device will behave, the Remote requires you to pick up your physical device and find a spot where you can test the thing you're testing, etc
I know and that's why I am leaning towards your asset but still would love to have a look at it first π
Haha, totally understood, that's why we have the eval version! Both are useful in specific situations (and they should even work together).
Would be great if you let us know how your evaluation of both goes π
Thank you so much for your help!!! I will! π
Hi, I'd managed to install ARSim in a project last week, allowing me to run the provided examples and also run in my own image tracking scene. I've pulled that content into a new project and now get the following errors, stopping the same scenes from working. I've removed and re-imported the the plugin so hoping I've just missed a setting somewhere. The 'no available subsystem' warning is something I'd normally expect without the plugin installed. "Call to StopSubsystems without an initialized manager.Please make sure wait for initialization to complete before calling this API. UnityEngine.XR.Management.XRManagerSettings:OnDisable ()" & "No active UnityEngine.XR.ARSubsystems.XRCameraSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings."
Did you enable AR simulation in Edit/project settings/XR-plugin-management? (There is a tab on the right side with a checkbox at ARSimulation that should be ticked)
Hi, yeah, it is checked.
Ah ok, it's working now, thanks. However, unchecking it then rechecking in my original project has broken that one π Main thing is getting it working for the latest project.
What do you mean by broken that one?
That project now throws the same errors the newer was doing.
When re-enabled? Which xr plugin version and unity versions are you using?
Sorry, it now seems to have resolved itself.
For the example scenes. It was odd because it was working in my own image tracking scene but no longer does.
Can I ask how you created the Cylinder.arobject in the object tracking example ... if there's an app available for simple scans? I've seen a few in the app store but the export file extensions appear to be different. Thanks
So its working again? ;)
About the cylinder: info is here https://docs.unity3d.com/Packages/[email protected]/manual/arkit-object-tracking.html
That's great. Thanks
Hey Debbie, how was your experience using ARS so far?:)
Hi, I have a working image tracking scene in Unity but if I start from a different scene then load in the image tracking one it doesn't instantiate the tracked image prefab (a tracking plane is visible). I've tried combinations of all the options in the project settings for AR Sim. Is there a recommended way to ensure that the sim plugin isn't doing anything as an app launches then initialize it on entering a scene with an AR feature? Thanks. Also, regardless of the scene I start on, I see "Call to StopSubsystems without an initialized manager" warnings and "No active UnityEngine.XR.XRInputSubsystem is available".
Does it work when you enter playmode in the scene with the image tracking?
Yes, scene works ok playing in editor directly. I have a splash and menu scene though. Starting there then loading the image tracking scene, it doesn't instantiate the prefab.
Not sure if it's possible but I'd like to have no functionality from the plugin as the editor starts the app ... I'd initialize it as the AR scene loads.
The plugin should do nothing on its own if no AR components are active and you dont start the subsystems. Do you think you could send me a small repro? Otherwise ill see if i can repro later myself.
Are you only using image tracking in that scene?
Point Cloud is included but I'm not using it directly. (It's often included in examples but I've not determined whether it's used by the other components or simply there as another representation of information being gathered in the scene).
Its not necessary if youre not using any points clouds :) Can you try if disabling the SimulatedTrackedImage component helps (and then enable it at runtime once the scene has loaded)?
I think it's because I'm additively loading scenes. Instances of the Sim components are normally loaded into the same scene but in my project they're loaded into the base scene (where ui for all scenes is managed).
For some reason the Simulated instance for tracked images isn't created as a result (when starting from another scene). Adding the SimulatedTrackedImage component to the image tracking scene beforehand results in errors where it can't find the image library reference.
This setup works ok on device ... the issue just relates to running in editor. It's probably an unusual setup for the plugin so no worries.
Ah so your simulation components are in another scene? Are those created at runtime?
They're generate at runtime, yeah.
I'll try including all those generated components in the image tracking scene and disable the auto settings in the AR Simulation project settings. (Also, they're not removed when unloading the TrackImage scene ... that doesn't appear to cause a problem though.)
Should definitely work, but if there are no subsystems and no ar foundation managers the simulated components will have no effect right now (they register in OnEnable to the plugin subsystems if they exist) - I try to reproduce later/tomorrow and see how to improve that :)
Thanks for your input.
Any chance that you also get this warning when loading the tracking scene?:
Image TrackedImageExample not found in reference library
UnityEngine.Debug:LogWarning (object,UnityEngine.Object)
Needle.XR.ARSimulation.ARSimulationImageTrackingProvider/ARSimulationProvider:GetChanges (UnityEngine.XR.ARSubsystems.XRTrackedImage,Unity.Collections.Allocator) (at C:/git/npm/development/ar-simulation/package/Runtime/ARSimulationImageTrackingSubsystem.cs:190)
UnityEngine.XR.ARFoundation.ARTrackableManager`5<UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystem, UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystem/Provider, UnityEngine.XR.ARSubsystems.XRTrackedImage, UnityEngine.XR.ARFoundation.ARTrackedImage>:Update () (at Library/PackageCache/[email protected]/Runtime/AR/ARTrackableManager.cs:187)
Yeah, if I add the components into the image tracking scene instead of letting them be generated automatically, the library object doesn't find the registered reference library images.
Ok so the reason is: xr subsystems are started before the ARImageManager can be found when using LoadScene (via FindObject or Resources) and currently we only add images at start to the library that are actually used (so it matches what you would get on device). But when starting the scene directly the TrackedImageManager CAN be found and thus it works there. Not sure why that is different...
but when I remove those checks (only add the library that is actually assigned) then it works with loading the scene too...
I'll have to leave this for now. Appreciate you having a look. Cheers
<@!814264061620781077> I published a new version as 1.3.1. Please let me know if the fix works for you
Hi Marcel, fantastic, thanks! That's it's working, starting from the non-AR scene. π
Great, good to hear
Leaving a review (if you haven't already^^) would be highly appreciated of course π
Hey, I just bought the asset and have some troubles, I have unity 2021.2.0f1, arFoundation 4.1.7, arSimulation 1.3.1 I'm folowing the slow start, when I open the Menu scene I have some enabled buttons, and clicking Simple AR bring a black scene with the following warnings :
Call to StopSubsystems without an initialized manager.Please make sure wait for initialization to complete before calling this API.
Call to StopSubsystems without an initialized manager.Please make sure wait for initialization to complete before calling this API.
No active UnityEngine.XR.ARSubsystems.XRSessionSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings.
No active UnityEngine.XR.XRInputSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings.
No active UnityEngine.XR.ARSubsystems.XRCameraSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings.
No active UnityEngine.XR.ARSubsystems.XROcclusionSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings.
No active UnityEngine.XR.ARSubsystems.XRDepthSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings.
No active UnityEngine.XR.ARSubsystems.XRPlaneSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings.
No active UnityEngine.XR.ARSubsystems.XRRaycastSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings.
I guess I missed something on the setup or got a mismatched version somewhere, any idea ?
Did you enable AR simulation in Edit/project settings/XR-plugin-management? (There is a tab on the right side with a checkbox at ARSimulation that should be ticked)
here ?
Yes but select the tab on the left and enable the ARSimulation plugin
It sounds like its not enabled
something to change here ?
Ill send a screenshot, one sec :)
ohh got you
Would you mind clarifying which version of Unity you're using? There's no 2021.2.0f1 yet
ok thx it's working
Great!
Troubleshooting section (for future reference) https://github.com/needle-tools/ar-simulation#troubleshooting-%EF%B8%8F
<@!470329230916583424> can you confirm that the plugin is enabled in XRPluginManagement? see troubleshooting: https://github.com/needle-tools/ar-simulation#input-does-not-work-i-can-not-move-around
The parameter exception is def a bug we need to fix. Would you mind creating an issue here with the same info? https://github.com/needle-tools/ar-simulation/issues
Yeah that was the issue in the fresh AR Template project, thanks
And the TargetParameterCountException doesn't seem to be affecting the simulator functionality
I'll create an issue for it anyway
Thanks!
I think the method is not used by default so it might just be a reflection error but not affect anything else
Any tips on how to mock ARKitSessionSubsystem.GetARWorldMapAsync and ARKitSessionSubsystem.ApplyWorldMap using AR Simulation?
I guess another way to ask this is: Is there a way to save and restore the ARSession in the AR Simulation plugin?
We currently dont support the AR world api calls.
How/What exactly would you need to save and restore? You could save/restore the state of the simulation components
Yes, essentially I need to restore the anchors. So, yes, I could just save/restore the simulation Anchor objects by wrapping the ARKitSessionSubsystem in an abstraction layer.
if you wrap the arkit subsystem it would change nothing in editor because in editor you're using the ARSimulationSessionSubsystem and anchors are stored in the AnchorsSubsystem if I'm not mistaken.
I'll have a go at it and let you know π
I think wrapping it would not work tho
Maybe "wrap" is the wrong term. I just mean that when I want to save my WorldMap, I'll call WorldMapProvider.GetWorldMapAsync, which internally will call ARKitSessionSubsystem.GetARWorldMapAsync on the device but in the Editor will generate some serializable data that represents the current state of all of the anchors.
Ok π Let me know how it goes or if you run into issues
Hello I downloaded it from git I'm new with ar development actually I dont understand how it works
When I build the sample image tracking scene
Nothing happen just blue screen
from camera color
Do I need to install any other framework for it work
Yes for ios you need to install and enable arkit and for android the arcore package
Make sure it is enabled in xr Plugin management before building
When I install Arcore I have bunch of errors
Which version do I need to install
Which Unity version do you have and which arfoundation version?
What errors do you get? Currently on mobile, cant read the screenshot unfortunately
version is 2019.4.3.1 and sorry it was my mistake. I created a project with ar template and deleted packages after reinstall its giving error. I recreated empty project and just include necessary packages it worked
Great