Specified motion of model without IK Tools

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Anna Anikina
Posts: 1
Joined: Sat Apr 04, 2020 4:24 am

Specified motion of model without IK Tools

Post by Anna Anikina » Fri Jun 12, 2020 10:01 am

Hi :)

As I understand, the IK/ID tools allow analyzing the motion of the model with a specified motion file (.mot or .sto).

Like I take a model, load tools, and run it - at this moment I can't "control" my model, I mean, I can only see how model simulates the movement from the loaded file.

Example:

Code: Select all

imuIK = osim.IMUInverseKinematicsTool();
 
# Set tool properties
imuIK.set_model_file(modelFileName);
imuIK.set_orientations_file(orientationsFileName);
imuIK.set_sensor_to_opensim_rotations(sensor_to_opensim_rotation)
imuIK.set_results_directory(resultsDirectory)

# Set time range in seconds
imuIK.set_time_range(0, startTime); 
imuIK.set_time_range(1, endTime);   

# Run IK
imuIK.run(visualizeTracking);
Is it possible to somehow make this movement from the file the default movement of the model? (this is for further using PrescribedController() and iterative changing the behavior of the model by applying force)

Example:

Code: Select all

osimModel = osim.Model(modelFileName)
state = osimModel.initSystem() 
manager = osim.Manager(osimModel)
state.setTime(0)
manager.initialize(state)
state = manager.integrate(10.0)
(So I get the same motion from file)

Tags:

User avatar
Michael Asmussen
Posts: 67
Joined: Mon Jul 11, 2016 7:46 am

Re: Specified motion of model without IK Tools

Post by Michael Asmussen » Mon Jun 15, 2020 4:46 pm

Hi Anna,

If I understand correctly, you want to keep the kinematics all the same, but then change the force applied to the model? What type of force are you applying?

If you are looking at prescribing a force, this forum topic might be helpful: viewtopicPhpbb.php?f=91&t=4870&p=11940&start=0&view=

I hope this is helpful

Mike

POST REPLY