Locations & Rotations

Someone asked this over email

I have a plan to use lightact and htc tracker for improve getting camera position to measure position of camera and object. I put data to LA by OSC and it is raw data, if i put it in node set object location and rotation it works fine. BUT I would like to have possible to reset zero point and substruct data vector for measuring. And here is the problem, data of pitch and roll are in [-180. 180] space but yaw are [-90, 90] and that how HTC give data for everybody, and it’s normal. pitch and roll are tangents curve and yaw value depend of in witch sign (= or -) of rest axis are. So if I want to make zero position i must subtract recorded vector form actual value, for xyz position it is no problem but mat operation on rotation must be different because of fact how yaw is. So I try set position of simple object by raw good data, then get rotation again and add some vector in hope light act will get world rotation data not inserted. Is there a way to get absolute world position and rotation?? that will solve my problem :slight_smile: or can you add some rotation add function in vector3 group :wink:

In order to get object’s location or rotation you can use Get Object Location and Get Object Rotation nodes.

image

You also might want to use Vec3 Add or Vec3 Multiply nodes
image

Let me know if this helps,
Mitja

Yes I’m using this nodes :slight_smile: but problem is that rotation vector use tangent values so can’t be normal add or multiply like position vector.

Hello,

Just to be sure I understand this: would it be possible for you to give me an example of the values you are getting in, the equations transforming the values and the values you want to get out of such a node.

If it is just a vec3 node doing some math operation on vec3 than it shouldn’t be too hard to implement it.

Thanks,
Mitja

Hi
so here is two videos first is normal raw data to rotation and second with plus 90degre as You can see on picture. https://we.tl/t-wb8NNnYBif on the graph You can see that axis that are not in use are flip when value of rotated axis is jumping from (-180) to (180) or from minus value to positive. If there is no added vector it looks ok but when it is added te point of flip is wrong calculated. it is because of tanget angel calculation. I need to add some rotation to put object in zero position for example car on wheels (flipping axis also don’t work well) . Adding vector to position in space work well beacouse there are not resolute of periodic function . Data are raw from tracker here is manual where are info on page 28 about flipping axis but i don’t know how use it in LA. https://dl.vive.com/Tracker/Guideline/HTC_Vive_Tracker(2018)_Developer+Guidelines_v1.0.pdf

About graph, red one have some no linear gaps that are error during capture;) and on video is well documented issue. On print screen graphs I can’t find reason why it happens.

Hello,

Thank you very much for sending this over. We’ll try to have a look at it sometime next week.

In the meantime, have you tried using Lua?

Thanks!
Mitja

I herded about it but not try it jet :slight_smile: maybe after second lock down in my country I will start learning it;)

That’s what lockdowns are for, Karol :slight_smile:

Anyway, we will look into implementing nodes for coordinate system changes.