LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3D position

Hey there

 

I am Jolanta Gabrowski from Latvia and not really good as you all are in programming. I found this interesting file to acquire 3D motion capture data from optitrack system into labview. I am trying to use laser sensor block as the following image, and using the co-ordinates of the three markers i want to know the position of the laser spot on the target in real time.

Untitled.png

 

I have added the snapshot of the VI.X,Y and Z inside the case structure give the 3D position of each marker in real time. 

 

 

Untitled1.png

 

On the front panel as we can see the three arrays display the x,y,z position for each marker.

 

Untitled2.png

 

 

Now the x y z values are given out as an array for a each marker. I am using markers on a block of laser sensor and I am trying to determine position of the laser spot using the position of these markers. In order to do that I need to determine the centre of the rigid body and hence its co-ordinates. And to do this I need to do mathematical conversions of the x,y,z co-ordinates of markers in real time. the program displays values of x,y,z for individual marker, but does not allow any further mathematical modifications for each marker separately to find the position of any point without a marker.

So is it possible in a program to extract individual marker co-ordinates and mathematically modify them to find co-ordinates of a new object?

 

I will be really grateful if someone can solve this situation.

Thanks

Jolanta Gabrowski.

0 Kudos
Message 1 of 8
(4,081 Views)

Hello Jolanta,

 

I apologise if this does not answer your question but I think you are just after some help manipulating the arrays of data. Below if a picture which shows a number of ways how you can get from the arrays of single dimensions like you have to arrays (or clusters!) of points with 3 dimensions.

 

I hope this helps. Sorry if I have missed the point entirely!

 

Nick

 

Array Manipulation.png 

Nick
0 Kudos
Message 2 of 8
(4,060 Views)

Dear Nick

 

Thanks for your reply. But I am still confused about the snapshot of the code you sent. All I want to do is further mathematical conversions of x,y and z co-ordinates of EACH MARKER individually. I am attaching the VI, if possible could you show me in the actual VI? It will show some errors as there is a library which you have to add to the project including the TT_test file. But can you please modify the x,y,z array terminals of the markers and split them into X1,Y1,Z1 for marker1,  X2.Y2.Z3 for marker 2,  X3,Y3,Z3 for marker 3 etc etc 

 

I will be really grateful if you could help me out in this.

 

Thanks 

 

Jolanta

0 Kudos
Message 3 of 8
(4,035 Views)

Hello Jolanta,

 

I have attached an edited VI, I am not sure what I have added beyond the above snippet but hopefully it helps.

 

Are you just asking how to manipulate the arrays of data?

 

By the sounds of it, you just want to index through each of those arrays in turn simultaneously so that you can edit each value together.

 

If it were me, I would bundle the points into a cluster so that each element of my cluster array contains the 3 co-ordinates of a marker.

 

Best Regards,

 

Nick
0 Kudos
Message 4 of 8
(4,027 Views)

Hi,

Apologies I have tried to open your code but it seems to be missing a few functions

is there anyway you could upload the folder?

 

Danny

0 Kudos
Message 5 of 8
(2,946 Views)

Pro tip.   You don't need to wire the constant 0 to index array.  Without it, you'll automatically get index 0 by default.

0 Kudos
Message 6 of 8
(2,941 Views)

Danny,

 

     Jolanta hasn't been active on the Forum for about over 8 years -- it is unlikely you will get a response to your request for code.  Have you tried searching the Web?  I believe OptiTrack is still in business -- you could ask them if they have LabVIEW routines.

 

Bob Schor

0 Kudos
Message 7 of 8
(2,931 Views)

Hi Bob,

Yes my first port of call was optitrack but they weren't able to assist. Hence why I turned to the NI forums. 

 

Thanks for your time

Danny

 

 

 

 

 

 

0 Kudos
Message 8 of 8
(2,908 Views)