Log in or register to post comments

URGENT: Smartterrain: Could not start tracker.

December 5, 2014 - 3:55am #1

Hi,

we have a rather complicated setup here, involving ImageTrackers and UserDefined Image trackers.

Quick overview: We have 5 scenes showing virtual worlds. To load them, we use Image/Userdefined Targets. Those Targets have initially no Content, but once they get tracked, they will load a corresponding scene. ARCamera and ImageMarkers are set to dontdestroy on load, thus remain in memory,

This worked all fine. But now we made one more Scene using Smartterrain (well, that would be the 5th scene, means including the new one we have 5).

This setup works if:

- game starts, initial scene with ARCamera and imagemarkers loads.

- we use our new image marker to start the Smartterrain scene first

result: everything works as expected.

 

BUT IF:

- another image marker (not smartterrain, just normal with extended tracking) is tracked first and its scene loads

- and after this we use the imagemarker for the scene using smartterrain

- then this scene will load, but smartterrain fails to start with "Starting Smart Terrain Tracker" and then constant debug Output "Could not start tracker.". 

 

And really in this case there is no smartterrain tracking going on.

 

I am lost here, and cannot figure out what the culprit is. Can i somehow reset all trackers after the Smartterrain scene loads?

Because i can only explain this to me, because we use extended tracking in other scenes, and this might be not stopped in time.

 

App is already uploaded to itunes connect, and i just figured this right now. HEEEELPPPPP!

 

 

 

URGENT: Smartterrain: Could not start tracker.

December 16, 2014 - 1:30pm #6

Allessandro, once again, thanks for your suggestion. I will play arround with this again.

However, since i stumble into things like that quite often i would like to ask for this:

I appreciate very much your affords supporting Unity and make everything as easy as possible. THATS GREAT! Everybody just hast to place some prefabs, set datasources and there you go! SUBERB! I wouldn´t want to miss this.

However, due to experience here are some thoughts:

- if i do something a little bit of the suggested approach of placing prefabs, use events and so on i easily run into problems like described in this topic.

- And this is just a guess: 

People using Vuforia from scratch in for example in an ios App have to setup everything themselves (I guess). While that is cumbersome they are forced to learn about classes and their methodes and after a whle they know what they do (hopefully). However, since you made it so easy in Unity to set something up, i can assure you that the majority, including me, does not know what they are doing. And then in becomes incredibly hard to figure out how to do stuff right. Even worse, since Vuforia turned into a protected library, Unity developers can hardly dig into the framework. 

Arising problems i try to solve like this.

- 1. As far as possible i dig around in Monodevelop, but that doesnt tell me much

- 2. look up he forum, if somebody had a similar problem as i have (but that results usually provide no answer, instead i happen to be the first to find a critical bug every now and then)

- 3. look into Vuforias Api reference. NOW, THAT IS RATHER HARD FOR ME, AS IN UNITY I DONT USE THIS. THERE ARE YOUR PREFABS AND SOME SCRIPTS, BUT THEY NEVER DEAL WITH MY SPECIFIC PROBLEMS. 

 

Background: I am actually a graphic designer with medium programming background. I get along programming quite well. But sometimes i am lost and have no idea where to continue learning or how to solve those problems.

I think there are more guys like me, so i would suggest the following:

- A. Keep up your good work of making everything as simple as possible for unity.

- B. BUT, provide some Unity specific SCRIPTING examples dealing with things (besides your prefab stuff):

- change datasources, calculate cameradistance or target sizes, enable extended tracking per scene or trackable and disable others, same for smart terrain, change the world center mode and other camera settings at runtime, reset everything save(and fast), provide a best practice scripting example...

 

That´s just my sugesstion. I mean the current examples are to easy for me and my problems too hard to solve. There should be something inbetweeen.

 

Again, don´t want to bother anyone, those are just be suggestions on how to make intermediate Untiy Developers live easier.

And probably, those suggestions do not belong here :-)

 

 

PS: As i am not a native english speaker, please excuse my terrible way of expressing myself!

 

 

 

 

 

 

URGENT: Smartterrain: Could not start tracker.

December 16, 2014 - 11:50am #5

Ok, interesting. I would not use the  < QCARManager.Instance.Deinit(); / Init(); > in your  case; I thought stopping / resetting / restarting the Tracker should do the trick; however, since it only seems to work on the first scene change, I would suggest trying to disable / enable the QCARBehaviour, that is:

void OnEnable() {
    
        ImageTracker tracker = TrackerManager.Instance.GetTracker<ImageTracker>();
        IEnumerable<DataSettest =  tracker.GetActiveDataSets();
        foreach(DataSet ds in test) {
            IEnumerable<Trackabletesttrackables = ds.GetTrackables();
            foreach(ExtendedTrackable tra in testtrackables) {
                tra.StopExtendedTracking();
            }
        }

        QCARBehaviour qcar = ( QCARBehaviour ) FindObjectOfType( typeof ( QCARBehaviour ) );

                  qcar.enabled = false;

                  qcar.enabled = true;

    }

 

Disabling and reenabling QCARBehaviour should reset the Camera and the Trackers completely

 

 

 

URGENT: Smartterrain: Could not start tracker.

December 16, 2014 - 9:27am #4

Well a little bit of progress here:

if i use this:

void OnEnable() {
    
        ImageTracker tracker = TrackerManager.Instance.GetTracker<ImageTracker>();
        IEnumerable<DataSettest =  tracker.GetActiveDataSets();
        foreach(DataSet ds in test) {
            IEnumerable<Trackabletesttrackables = ds.GetTrackables();
            foreach(ExtendedTrackable tra in testtrackables) {
                tra.StopExtendedTracking();
            }
        }

        tracker.Stop();
        bool success = tracker.ResetExtendedTracking();

        QCARManager.Instance.Deinit();
        QCARManager.Instance.Init();

        tracker.Start();

    }

 

Then at least it works on the first change from one scene with ImageMarkers using Extended Tracking. Means, the smartterrainscene does what its supposed to do.

However, if i use another Imagemarker revering to a non Smartterrain scene and then again the smartterrainmarker, it does not work.

There is no errormessage any more stating "Cannot start tracker". but its simple that nothing happens. No Smartterrain any more. Gone. Pufff. Testing all this inside unity i see my gameobjects however, they are active and everything seems alright.

Doooaaaaahhh.

 

URGENT: Smartterrain: Could not start tracker.

December 16, 2014 - 7:08am #3

Thanks for the advice.

But how are you supposed to STOP extended tracking?

I can only find the imagetracker. And only one as so:

ImageTracker tracker = TrackerManager.Instance.GetTracker<ImageTracker>();

And as for Stoping methodes and something that sounds like ExtendedTracking related i only found:

        bool success = tracker.ResetExtendedTracking();
        tracker.PersistExtendedTracking(false);
    

        QCARManager.Instance.Deinit();
        QCARManager.Instance.Init();

 

Of course after that i need to start the imagetracker again, but the problem is not solved.

 

URGENT: Smartterrain: Could not start tracker.

December 8, 2014 - 11:29pm #2

Have you tried Stopping Extended Tracking before you start Smart Terrain ? That might be something to try.

Note: in your code snippet, you "Reset" Extended Tracking, but in fact you should actually stop it (not just reset) 

 

Log in or register to post comments