playMaker

Author Topic: Problem with Vuforia  (Read 11767 times)

fluctuhon

  • Playmaker Newbie
  • *
  • Posts: 6
Problem with Vuforia
« on: February 14, 2014, 12:23:24 PM »
Hello,

I have some issues with Vuforia (v2.8.7), Playmaker (v1.7.7.f6) and Unity (4.3.4f1)
The playmaker events "VUFORIA / TRACKING FOUND" and VUFORIA / TRACKING LOST" seem to work randomly.
When i'm trying to track an image, Unity and vuforia can recognize it (the log says "Num trackables detected: 1" and the AR camera is following the image) but the event only triggers 1 out of 30 times..
I have the vuforia playmaker proxy in my scene and the vuforia trackable script in my image target (i also tried to desactivate the default trackable event script, same result)
I used vuforia with playmaker for another project without a single problem, but it was in Unity 3, is there a problem with unity 4 ?

Thanks in advance

xunxun

  • Junior Playmaker
  • **
  • Posts: 53
Re: Problem with Vuforia
« Reply #1 on: February 15, 2014, 12:56:38 PM »
I'm even not able to import Playmaker proxy with Vuforia 2.8.7

==
Assets/PlayMaker Vuforia/Scripts/PlayMakerVuforiaProxy.cs(60,37): error CS1501: No overload for method `GetTracker' takes `1' arguments
===

Please update Add-On.

Unity 4.2.2 + PM 1.7.7 + Vuforia 2.8.7
thanks

fluctuhon

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Problem with Vuforia
« Reply #2 on: February 15, 2014, 02:17:03 PM »
This issue can be fixed, it has been solved here : http://hutonggames.com/playmakerforum/index.php?topic=5817.0

My case is really strange and really random.. Sometimes it works, sometimes (often) it doesn't. I don't want to downgrade to unity 3 just because of that :/
Does anyone have an idea ?

xunxun

  • Junior Playmaker
  • **
  • Posts: 53
Re: Problem with Vuforia
« Reply #3 on: February 15, 2014, 10:11:18 PM »
Please try this method. Simply, it's calling LOST/FOUND event from script

just few edit in DefaultTrackableEventHandler.cs

input this line into private void OnTrackingFound(). It looks like

Code: [Select]
//….
using HutongGames.PlayMaker;
public PlayMakerFSM myFSMtracking;
// drag and drop the FSM that has public "FOUND TARGET" and "LOST TARGET" events in inspector

Code: [Select]
private void OnTrackingFound()
    {
//Playmaker Event Trigger FOUND TARGET
myFSMtracking.Fsm.Event ("FOUND TARGET");
//... original code

}

and this if you want to recipe LOST target event

Code: [Select]
private void OnTrackingLost()
    {

myFSMtracking.Fsm.Event ("LOST TARGET");
//... original code
}


it works well and reliably for me.
Hope this helps.
« Last Edit: February 15, 2014, 10:13:44 PM by xunxun »

fluctuhon

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Problem with Vuforia
« Reply #4 on: February 16, 2014, 07:58:30 AM »
Thank you for your answer,

This seems to work more often than before, but it still not works every time..
I really can't understand why, maybe it's a more general problem with playmaker ?

EDIT : I tried downgrading to playmaker 1.5, Same problem
« Last Edit: February 16, 2014, 10:26:15 AM by fluctuhon »

xunxun

  • Junior Playmaker
  • **
  • Posts: 53
Re: Problem with Vuforia
« Reply #5 on: February 16, 2014, 12:01:50 PM »
did you try to detect multi-targets? if so, how many are they?

fluctuhon

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Problem with Vuforia
« Reply #6 on: February 16, 2014, 12:15:44 PM »
I only have 1 image target in my scene, but i do have multiple images in my data set (20 images). These images can be pretty similar, so maybe vuforia is confused because of that

xunxun

  • Junior Playmaker
  • **
  • Posts: 53
Re: Problem with Vuforia
« Reply #7 on: February 16, 2014, 12:32:19 PM »
did you use Makers? For some similar images, it's recommended that you should cover them by Makers then using "maker detector" is much faster and get results as expected.

fluctuhon

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Problem with Vuforia
« Reply #8 on: February 16, 2014, 12:42:58 PM »
Are you referring to that : https://developer.vuforia.com/resources/dev-guide/frame-markers ?
I'm not sure what to do with that and how i'm suppose to use it with playmaker

Thank you again for your time and your answers :)

EDIT : Ok, i think i understand how this works. I'll try to use markers within my images and i'll see what happens. I'll let you know ;)
« Last Edit: February 16, 2014, 12:48:43 PM by fluctuhon »

fluctuhon

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Problem with Vuforia
« Reply #9 on: February 17, 2014, 10:12:05 AM »
I tried using markers : Same problem : the markers are detected but the playmaker event is not responding...

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Problem with Vuforia
« Reply #10 on: February 17, 2014, 10:20:02 AM »
Hi,

 Hopefully, I'll have time to look at this properly. I don't think it's a problem with PlayMaker, but more likely a change in Vuforia that broke the bridge I created.

bye,

 Jean

Playnoob

  • Playmaker Newbie
  • *
  • Posts: 21
Re: Problem with Vuforia
« Reply #11 on: March 26, 2014, 06:51:16 AM »
I'm bumping this thread, as I'm having the same issues - Using the playmaker Vuforia TrackingFound / TrackingLost is not triggering animation events consistently. - Sometimes it works, sometimes it does'nt.

(This maybe related however...and i'm only guessing here...  if Vuforia's "Extended Tracking" tickbox is checked.)

However, what i'd love to see is a Playmaker Vuforia interface that provides:

  • Tracking found/lost for Image Targets
  • Tracking found/lost for Frame Markers
  • Enable/Disable Persistent Camera Tracking function

About the last one (Persistent Camera tracking) I'd written on the Vuforia forum and got this code from them to add. I quote:
You can enable/disable the PersisteExtendedTracking option using the C# API of the ImageTracker class; you can write a script and attach it to your ARCamera, and put this code in the script:
Code: [Select]
ImageTracker tracker = TrackerManager.Instance.GetTracker<ImageTracker>();
tracker.PersistExtendedTracking ( true ); // or false, to disable it

----
Yes, I'm embarrassed to say, I don't know the first thing on how to write the C script for this, that's why I use Playmaker ;)
Any help on how to implement the script or a Playmaker action to do this would be great.

Kind Regards.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Problem with Vuforia
« Reply #12 on: April 04, 2014, 07:21:57 AM »
Hi,

 ok, done, Please redownload from the wiki. It does work better without persist on, but I guess it may be on a per case deal.

 you'll find an action to enable disable that setting, and also, it's also available in the vuforio behavior themselves, so you can check it manually on the behavior.


 Bye,

 Jean

nabilfx

  • Full Member
  • ***
  • Posts: 186
Re: Problem with Vuforia
« Reply #13 on: May 10, 2014, 06:12:27 PM »
How can I leave the Extended Tracking mode with Extended Persistent Tracking together, always ON both, in image target track.

in Unity.