Page 1 of 1

Adding intermediate markers to a model

Posted: Thu Nov 04, 2010 11:37 am
by benhocking
I've added a marker to the Gait2354_Simbody example data that approximates the position of the base of the neck, and after generating the Inverse Kinematics data, I see that the marker follows the neck around just like I want. My problem is that I now want to plot the data from the new marker, and it won't let me, because the only options appear to be those from the originally recorded markers.

Is there a way to do what I want (and if so, what is it)?

Details: My Marker is called "Neck.Base", it's relative to the "torso" Body, and its Offset is (-0.5, 0.45, 0).

RE: Adding intermediate markers to a model

Posted: Thu Nov 04, 2010 12:29 pm
by aymanh
Hi Ashlie,

There're a few ways to do this:
1. If you added the marker to a trc file you can use the "Preview Motion Data.." and load your trc file, then use the Plot tool to plot marker trajectories.
2. To record the trajectory for any point/station on the model you can run the Analyze Tool, add PointKinematics analysis and specify the coordinates of the point that you want recorded and the body it lives on, then you can use the Plot tool and load in the output of the Analyze Tool. The user guide may have some examples of this.

Best of luck and please let us know if that doesn't answer your question.

-Ayman

RE: Adding intermediate markers to a model

Posted: Thu Nov 04, 2010 12:46 pm
by benhocking
Maybe I'm misunderstanding the trc file, but it seems that to add the marker to that file, I'd actually need to do motion capture (or write some code to infer the marker position from other markers in that data).

I tried using the Analyze Tool and adding the PointKinematics analysis, but:
1) I don't know how to "specify the coordinates of the point" nor the "body it lives on" during the analysis bit. I did specify those coordinates/body when creating the Marker, however. The closest thing I can find in the Analyze Tool is "Filter coordinates", but since the units appear to be Hz for that, I'm thinking that's not what I want.
2) (Probably as a consequence of #1) I don't see the marker I added (using Marker->Add New, it's not in the original gait2354 dataset). When I say I don't see it, it's not showing up under Tools->Plot...->Y-Quantity->states. ("states" is the name of the new Motions file created by the Analyze Tool.) In fact, I'm not seeing any markers at all.

I went through the User Guide searching for the word "Marker", but I couldn't find any example of this. I'm using version 2.0.2 for Windows, which I'm running on Parallels on a Mac. I tried downloading the 2.2 version for Mac, but I get the output:
std::exception
press any key to continue...
I'll go into more details on that in a different thread if you're interested. (Quick info: I did update my path to include the sdk directory and my ld_library_path to include ".".)

Thanks for your time,
-Ben

RE: Adding intermediate markers to a model

Posted: Thu Nov 04, 2010 2:01 pm
by aymanh
Ben,

I wasn't sure what exactly what you did that's why I gave you the different options. Yes, to add to the trc file you'd need to add the corresponding column, modify headers and get motion capture data for it, obviously that's not what you have.

To do option 2 (Point Kinematics) analysis you need to:
- Run the GUI and load the model.
- Load motion from IK or solve for it.
- Launch Analyze tool
- Specify the motion of interest (IK solution)
- Switch to the Analyses tab
- Pick Add, and select PointKinematics Analysis
- Select the Analysis and press Edit
- Enter the point and body name for the new marker on this page.
- Hit Run.
- This should create a directory with one file describing the trajectory of the specified point.
- Open the file in the previous step in the Plot tool and select the columns of interest.

Hope this helps,
-Ayman

RE: Adding intermediate markers to a model

Posted: Fri Nov 05, 2010 6:41 am
by benhocking
That helped a lot (and completely resolved my problem). I'm providing a link to a screencast that might help others who wonder how this works as, even with your spot on instructions, it took me a while to figure out how to do this.

http://screencast.com/t/7NXxPq3L

Some interesting points:
(1) Giving the prefix a distinctive name ("subject01_demo") made it easy for me to find the file I was looking for. It was being created before, but I couldn't find it, because I didn't know what it was being called. Sorting my directory by date/time would've clued me in, of course.
(2) I noticed twice that data I had entered into a text box got wiped away when I chose an option in a drop-down box. First, when I typed "x" for the names of state_0, state_1, and state_2, and then chose "time" as the x-coordinate. Secondly, when I entered in demo_data.txt as the file name, and then chose "All Files". Very minor flaw, but I thought I'd point it out, regardless.

Thanks very much for your help, Ayman.
-Ben

RE: Adding intermediate markers to a model

Posted: Fri Nov 05, 2010 6:48 am
by benhocking
A clarification for others wanting a neck marker - the offset was actually:
(-0.05, 0.45, 0)
I was off by a factor of ten in what I wrote earlier for that first coordinate.

RE: Adding intermediate markers to a model

Posted: Fri Nov 05, 2010 1:27 pm
by aymanh
Hi Ben,

Outstanding job on the video. I'm sure many many users will be grateful.

Please file a bug report with the issues you ran into and we'll fix them.

All the best,
-Ayman

Re: Adding intermediate markers to a model

Posted: Thu Sep 06, 2012 1:39 am
by michalacadova
The video is perfect and really helpful! Thanks.

Michala