07-11-2022 12:54 PM
Hi! I am currently working on a project to find joint angles on a motion capture system. I am fairly new to LabView and cannot seem to find a solution to my current problem online anywhere. As of now, I am working to loop through a spreadsheet that has 151 rows (each row is a time stamp) and plot 3D data points by row. Each row has 41 body sensors that contain and XYZ coordinate. The final result (of this step) is to have a moving picture of the whole spreadsheet. Currently I have an array of all of the rows entering a for loop that splits the array up row by row and changes row based on iteration. I then split this again into X Y and Z vectors in order to plot using another iteration for loop. The X Y and Z vectors I am making are currently not plotting, and are not the correct size. I have the size set as 1 for now, but whenever increased it only repeats the same number rather then moving forward. Nothing is currently plotting even though the arrays have values. Please let me know if you have any ideas or solutions. Once again I am very new to the program. Thank you!
07-11-2022 01:27 PM - edited 07-11-2022 01:29 PM
Hi mbel,
@mbel wrote:
Hi! I am currently working on a project to find joint angles on a motion capture system. I am fairly new to LabView and cannot seem to find a solution to my current problem online anywhere. As of now, I am working to loop through a spreadsheet that has 151 rows (each row is a time stamp) and plot 3D data points by row. Each row has 41 body sensors that contain and XYZ coordinate.
So which columns/rows do you want to plot? Can you provide an example like "in the first iteration I want to plot column 0,1,2, but in the 2nd iteration I want to plot column 3,4,5"?
I don't see any "timestamps" in your data…
Then simplify your VI (or start over from scratch)!
Like this:
Atleast there is a "moving plot", but just use it as a suggestion…
07-11-2022 01:48 PM - edited 07-11-2022 01:52 PM
Here's what I would probably do:
(with each iteration, you get a 1D array x1, y1, z1, x2, y3, z3, ... xN, yN, zN) and decimate will give you the three arrays [x1, x2, x3, ... xN], [y1, y2, y3, .. yN], [z1, z2, z3, ... zN])
(Note: I would probably disable auto-scaling of the xyz axes. Not shown)
07-11-2022 02:09 PM
The data I posted should have a column with time. An example would be in frame 1 (time is 0) I want to plot Rasis XYZ, Lasis xyz, V Sacaral XYZ, and continue down the row of motion sensor points. The resultant graph should be a video of a person walking, as seen below in a matlab graph. Thank you for the help!
07-11-2022 04:39 PM
Yes, you can use the second column (that I removed) if you want to simulate real timing (would need a bit of extra code unless the time is equally spaced). You can change the rotation of the 3D graph to get the desired view.