Log in or register to post comments

Num trackables detected 1, but trackable not loading

June 10, 2013 - 3:13pm #1

Sometimes the models don't appear when the tracker is in focus until I completely hide the tracker, and return it to the camera.

The console displays "Num trackables detected: 1" but the usual "Trackable xyz found" message does not follow.

What happens between these two events, and is there any way for me to add code to get it to keep trying to load a trackable? 

About 20% of the time, it never makes it from Num trackables detected to Trackable found, and I have to completely remove the tracker from the camera's view. It appears to be getting stuck. It's hard to tell whether the tracker is in focus, or it's in this stuck state that requires completely removing the tracker from the camera's view.

Num trackables detected 1, but trackable not loading

December 11, 2014 - 6:29am #15

 idealreal,

The "OnTrackableStateChanged" callback name has not changed. If you have upgraded an existing project from an older version of Vuforia, you may wan to check the migration guide:

https://developer.vuforia.com/resources/dev-guide/transitionmigration-guide

If you have simply upgraded an existing project from an older version of Unity to the latest Unity 4.6, one thing you could try is to close your Unity project, clean (remove) the "Library" and "Temp" folders under your project directory and reopen the Unity project and let Unity re-generate those folders automatically.

Sometimes, this simple trick solves many issues.

One last thing to check is if the Vuforia Samples work for you, by creating a fresh new project and import one of the sample packages.

 

 

Num trackables detected 1, but trackable not loading

December 10, 2014 - 10:39am #14

Hello,

 I am working with the Vuforia version 3.0.9 on Unity 4.6.0 and I am having exactly this same issue. Is there any fix for that ? Is like the "OnTrackableStateChanged" is never called. Did you change the callback name? I can't find any documentation about this issue.

Num trackables detected 1, but trackable not loading

May 15, 2014 - 12:02am #13

Hello everyone, 

I Seem to ba having the same issue.

I can load the "game" the first time after starting unity3d and it works perfectly.

However any time I load the scene/play the scene after that it doesnt render the animation/model

I have no "extra" scripts in my app, no changes to the plugn scripts at all.

Any ideas?

Num trackables detected 1, but trackable not loading

January 17, 2014 - 12:21pm #12

Yup, everything is going well. 

Num trackables detected 1, but trackable not loading

January 17, 2014 - 11:39am #11

You're welcome - so you're good to go, no further problems?

Num trackables detected 1, but trackable not loading

January 17, 2014 - 11:23am #10

I think I was doing the exact same thing--using a database full of similar images in order to test tracking.

Num trackables detected 1, but trackable not loading

January 17, 2014 - 11:13am #9

Ok so the Collider issue was on my end, I was able to fix the script the was causing that issue.

The other issue with the tracking was likely because of the database I was using. I was adding different versions of the same target (cropped, offset, etc.) to try and find the best tracking. Because of this, I assume that it was detecting one of the targets I was NOT using, and since it was disabled / unused, nothing happened. I suppose this could have also been fixed by allowing multiple image targets to be detected as well, but I just ended up creating a new database with just the one image target and it worked perfectly, tracked instantly.

Thanks for replying, sometimes it just helps me to write or talk about issues to get me going in the right direction.

Num trackables detected 1, but trackable not loading

January 17, 2014 - 8:18am #8

Yes everything is set up properly, the DefaultTrackableEventHandler script is being completely ignored about 10-20% of the time. I have one scene with one image target. 

What's even more odd is the colliders are actually loading but not the renderers. The strange thing is the colliders aren't loading through the DefaultTrackableEventHandler script, they're loading from somewhere else. Maybe I have another script that's interfering. I will look into it.

Num trackables detected 1, but trackable not loading

January 17, 2014 - 8:12am #7

Let's clarify what isn't being bound a/o loaded. If you are configuring your ImageTargetBehaviours dynamically - have you confirmed that the trackable event handler is added and registered?

Try debugging the callbacks for OnTrackingLost / Found and then check to see if your models are being instantiated. 

Num trackables detected 1, but trackable not loading

January 17, 2014 - 8:01am #6

Sometimes I'll get this behavior when I'm doing bad things with targets, like having multiple targets that have images with similar content. But sometimes it just happens and the only solution is to remove the target completely from the camera's view and put it back. I doubt I could make a test project because it's very sporadic.

Num trackables detected 1, but trackable not loading

January 17, 2014 - 7:57am #5

I'm also having the same bug, it just happened out of the blue. I haven't modified any original code in the ImageTargetBehaviour or DefaultTrackableEventHandler.

Num trackables detected 1, but trackable not loading

November 5, 2013 - 7:02am #4

I am having a similar Problem. The wierd thing, is that on the Editor the Object is being rendered, but on the Android Phone it isnt..

Could this be a Bug??

Num trackables detected 1, but trackable not loading

June 11, 2013 - 11:59am #3

I don't have any special scripts, I'm just using an ImageTracker example scene with my own models.  The script on the ImageTracker is DefaultTrackableEventHandler.cs. The vast majority of the time everything works fine, it's only 20% or less that it seems to get stuck.

I'm fairly new to this code, but I've traced the issue here:

TrackableBehaviour.cs

    public void OnTrackerUpdate(Status newStatus)
    {
        // Update status:
        Status prevStatus = mStatus;
        mStatus = newStatus;
        if (prevStatus != newStatus)
        {
	    Debug.Log ("STATUS CHANGED: " + newStatus); // Always gets here, newStatus is TRACKED
            foreach (ITrackableEventHandler handler in mTrackableEventHandlers)
            {
                handler.OnTrackableStateChanged(prevStatus, newStatus);
            }

 

However, when it gets stuck, it prints the above Debug statement, and never reaches the Debug.Log call ("2OnTrackableStateChanged") in DefaultTrackableEventHandler.cs

    /// <summary>
    /// Implementation of the ITrackableEventHandler function called when the
    /// tracking state changes.
    /// </summary>
    public void OnTrackableStateChanged(
                                    TrackableBehaviour.Status previousStatus,
                                    TrackableBehaviour.Status newStatus)
    {
		Debug.Log ("2OnTrackableStateChanged: " + newStatus);
		if (newStatus == TrackableBehaviour.Status.DETECTED ||
            newStatus == TrackableBehaviour.Status.TRACKED)
        {
            OnTrackingFound();
        }
        else
        {
            OnTrackingLost();
        }
    }

 

For some reason mTrackableEventHandlers is empty, so there are no handlers to iterate over in OnTrackerUpdate in TrackableBehaviour.cs

Num trackables detected 1, but trackable not loading

June 10, 2013 - 4:08pm #2

Are you configuring your ImageTargetBehaviors dynamically, or otherwise enabling / disabling the trackable event handler at runtime (e.g. DefaultTrackableEventHandler )?

If you are seeing Num trackables detected each time you bring the target back into view, then this indicates that the trackable is valid and detectable. This information is then passed to the StateManager which updates the TrackableBehavior and consequently any listening ITrackableEventHandler implementations.

So you should confirm that your target has a trackable event handler that is registering with the TrackableBehavior and that this script component is enabled on your ImageTarget.

If you're still having problems, try tracing the event from the UpdateTrackablePoses method in StateManagerImpl.cs ( ln 368 ), to the TrackableBehaviour.OnTrackerUpdate method ( ln 131 ) to confirm that OnTrackableStateChanged() is being called on a trackable event handler.

Log in or register to post comments