Adding intermediate markers to a model

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Ashlie Hocking
Posts: 4
Joined: Wed Oct 20, 2010 11:44 am

Adding intermediate markers to a model

Post by Ashlie Hocking » Thu Nov 04, 2010 11:37 am

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).

User avatar
Ayman Habib
Posts: 2248
Joined: Fri Apr 01, 2005 12:24 pm

RE: Adding intermediate markers to a model

Post by Ayman Habib » Thu Nov 04, 2010 12:29 pm

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

User avatar
Ashlie Hocking
Posts: 4
Joined: Wed Oct 20, 2010 11:44 am

RE: Adding intermediate markers to a model

Post by Ashlie Hocking » Thu Nov 04, 2010 12:46 pm

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

User avatar
Ayman Habib
Posts: 2248
Joined: Fri Apr 01, 2005 12:24 pm

RE: Adding intermediate markers to a model

Post by Ayman Habib » Thu Nov 04, 2010 2:01 pm

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

User avatar
Ashlie Hocking
Posts: 4
Joined: Wed Oct 20, 2010 11:44 am

RE: Adding intermediate markers to a model

Post by Ashlie Hocking » Fri Nov 05, 2010 6:41 am

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

User avatar
Ashlie Hocking
Posts: 4
Joined: Wed Oct 20, 2010 11:44 am

RE: Adding intermediate markers to a model

Post by Ashlie Hocking » Fri Nov 05, 2010 6:48 am

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.

User avatar
Ayman Habib
Posts: 2248
Joined: Fri Apr 01, 2005 12:24 pm

RE: Adding intermediate markers to a model

Post by Ayman Habib » Fri Nov 05, 2010 1:27 pm

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

User avatar
Michala Cadova
Posts: 40
Joined: Tue Nov 23, 2010 3:45 am

Re: Adding intermediate markers to a model

Post by Michala Cadova » Thu Sep 06, 2012 1:39 am

The video is perfect and really helpful! Thanks.

Michala

POST REPLY