Avoid gimbal lock

How can I avoid the gimbal lock from my HTC Vive Tracker?

I have 2 Vive tracker that work perfectly BUT rotation datas are locked from -270 +90 degrees. Because of that I can’t add offsets to the rotation, less than -270 or more than +90 the rotation loops.
How can I avoid the Gimbal Lock?

1 Like

You shouldn’t directly add rotations to existing euler transforms like that, except for in very simple cases (which Vive tracking is not). Instead, use a Transform CHOP to manipulate the full transform with a rotation transform.


Alway the best Malcolm.
I can’t test it yet but I’ll let you know about news.


Ok Malcom,
I had some time to work with trackers right now.

The transform node works well with the offsets but it doesn’t avoid gimbal lock. I try to smooth the rotation with a lag CHOP but datas are still bounded to the gimbal rotation. Means that when the rotation loops values from -270 to +90 are interpolated.

I also tried the continuos rotation function but… it didn’t work for me. Maybe I’m just missing something

Ah, in the case of blending you’ll want to use Attribute CHOPs to group your r[xyz] channels into a rotation group, and then Blend CHOPs to blend them. You can use the ‘Quaternion’ mode in the Blend CHOP to more smoothly interpolate them.

1 Like

Hi Malcolm, thanks for your support but I can’t manage it.
Today I spent some time to understand the trick, unfortunately I’m still at the beginning :sleepy:
I’m missing something for sure.

I’m also trying to understand the opposite process. I mean How to generate a gimbal lock from flat values. ex: -1/+1 slider into velocity into r[x,y,z] of a geo.