Mixedrealitytoolkit-unity: spatial understanding and unity mecanim humanid rig issue

Created on 22 Sep 2016  ·  23Comments  ·  Source: microsoft/MixedRealityToolkit-Unity

when having a mecanim humanoid character(rig) in the scene when activating the spatial understanding dll using "SpatialUnderstandingDll.Imports.SpatialUnderstanding_Init()" it breaks unity's mecanim system and makes all characters twitch / spaz all over the scene.

*Note this doesn't happen in the editor, nor with “generic” rigs.
i'm using unity 5.4.0f3 HTP

Most helpful comment

@HodgsonSDAS Thanks!

I tested with different avatars and still see the issue. It only starts after the Spacial Understanding gameobject is activated and if there is an active animation.

Spacial Mapping game object causes no issues

All 23 comments

Hmm, Interesting. @zer00p, do you have a test scene we can try out?

Can't access your link at work, but I might take a look at it later this evening.

how would you want me to send it ? i can't attach it here.
not even as a zip file.

Well, you could always make a repository here on GitHub

I have humanoid rigs that work fine with the scanner is running. But I notice you say this happens when you call SpatialUnderstandingDll.Imports.SpatialUnderstanding_Init(). I load this with the provided prefab that initalizes at startup. Apparently you are doing this in the middle of animation? Running something cpu intensive while animations are running could easily mess up the animation timing.
I think just initializing at start is the solution.
Also _note I have seen issues with multiple world anchors_ with animation, so I only use _one_.

link to sample project : https://github.com/zer00p/TeddyBear
@izatar i am also using the holokit prefabs and (on my main project) the animated object is instantiated after the scan has ended.

I also encountered the same problems as you, can you tell me how you finally resolved please?

we didn't,
we ended up using FinalIK from the AssetStore.

@zer00p @nealee93 I'm having this issue as well. How did you resolve it?

@myreee No,we can't find any way to resolve this issue, it just happens only to a few people,incredible...

@nealee93 so all of your characters are still twitching? I really need a fix for this! Soon!

Any help would be appreciated!

cc
@HodgsonSDAS
@izatar

@myreee, Sorry, I haven't seen any fixes for this.

Anyone with insight is welcome to share their learnings.

@HodgsonSDAS Thanks!

I tested with different avatars and still see the issue. It only starts after the Spacial Understanding gameobject is activated and if there is an active animation.

Spacial Mapping game object causes no issues

Hopefully some of the updates to the spatial understanding namespaces might resolve this issue. I'd try pulling the PR https://github.com/Microsoft/HoloToolkit-Unity/pull/459 and testing that out as well.

I pulled the latest from PR #459. Unfortunately, the issue is still there.

@HodgsonSDAS Anything else I can do to help identify the cause of this problem? I am unable to use the new spatial understanding until this is resolved

Unfortunately I can't really think of anything. I'd also try opening a ticket with Unity just to be sure it's not a bug with the engine (which it may or may not be). Just be sure to provide them with the reproduction project.

Anyone managed to find the solution to this?

We had some Trouble dealing with this issue too. Our fix for this Problem is to right click all your "Rotation" Parameters in the Animation Window (where you have the timeline etc.) and choose Quaternion Euler ... this worked for us. It might be a Problem with gimbal lock´s, iam not so deep into the algorithmic stuff so don't be sure about that :)

Hope this helps.

I'll give that a try, Thanks!

In issue #520, I noticed that Spatial Understanding was changing the floating point rounding mode and that was causing strange problems when I later tried to capture photos. In #656, I changed Spatial Understanding to restore the rounding mode after it is called. It is possible that your issues with animation could be caused by the same underlying issue, so you may want to check if this is still a problem in recent versions of HoloToolkit that have the 5fc993c commit.

I will close this issue unless someone claims to repro is in the latest version.

Was this page helpful?
0 / 5 - 0 ratings