Multiple IK trials

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Hassan Sarailoo
Posts: 1
Joined: Thu Jun 30, 2011 5:42 am

Multiple IK trials

Post by Hassan Sarailoo » Sun Mar 04, 2012 6:40 am

Hi,
I want to run the Inverse Kinematics for the gait2354.osim model and I have 3 trials. according to the users guide, the following code should run this the IK tool for all trials. But when I load this xml file in the setting panel, it does nothing. How can I run several trials in at once for a model?
Best Regards, Hassan

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<OpenSimDocument Version="20302">
    <InverseKinemtaticsTool name="subject01">
        <model_file>subject01_simbody.osim</model_file>
        <IKTaskSet file="gait2354_IK_Tasks.xml" />
		<IKTrialSet name="">
			<objects>
				<IKTrial name="first trial">
					<marker_file> subject01_walk1.trc </marker_file>
					<coordinate_file> subject01_walk1.mot </coordinate_file>
					<time_range> 0.4 2.0 </time_range>
					<output_motion_file> subject01_walk1_ik.mot</output_motion_file>
					<constraint_weight>20.0</constraint_weight>
					<accuracy>1e-5</accuracy>
				</IKTrial>
				<IKTrial name="first trial">
					<marker_file> subject01_walk2.trc </marker_file>
					<coordinate_file> subject01_walk2.mot </coordinate_file>
					<time_range> 0.4 2.0 </time_range>
					<output_motion_file> subject01_walk2_ik.mot</output_motion_file>
					<constraint_weight>20.0</constraint_weight>
					<accuracy>1e-5</accuracy>
				</IKTrial>
				<IKTrial name="first trial">
					<marker_file> subject01_walk3.trc </marker_file>
					<coordinate_file> subject01_walk3.mot </coordinate_file>
					<time_range> 0.4 2.0 </time_range>
					<output_motion_file> subject01_walk3_ik.mot</output_motion_file>
					<constraint_weight>20.0</constraint_weight>
					<accuracy>1e-5</accuracy>
				</IKTrial>
			</objects>
		</IKTrialSet>
    </InverseKinemtaticsTool>
</OpenSimDocument>

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

Re: Multiple IK trials

Post by Ayman Habib » Mon Mar 05, 2012 11:10 am

Hi Hassan,

The InverseKinemtaticsTool is designed to run a single trial, if you have multiple trials you have to run the tool multiple times one for each trial. You can write an API program to perform this, or a matlab script if you have lots of data, otherwise just manually change the name of the input trc file and output motion file and rerun.

Hope this helps,
-Ayman

User avatar
Edith Arnold
Posts: 44
Joined: Fri Apr 06, 2007 2:07 pm

Re: Multiple IK trials

Post by Edith Arnold » Thu Mar 08, 2012 3:46 pm

Hi Hassan,

I wrote up some examples of how to run a batch of IK (or any other tool) using setup files and matlab here:
http://wiki.simtk.org/modelerskitchen/S ... processing

-Edith

POST REPLY