Hi,
In Opensim platform, we can edit the attachment frame and the path points would change automatically.
(As shown in this link -> https://simtk-confluence.stanford.edu/d ... mentPoints)
I can successfully change the attachment frame in Matlab by code: osimModel.getMuscles().get(0).getGeometryPath().getCurrentPath(state).getitem(0).setBody(body_0)
Scripting with the 'getLocation' function only shows the original(not updated) path point.
osimModel.getMuscles().get(0).getGeometryPath().getCurrentPath(state).getitem(0).getLocation(state)
So how can I retrieve the updated path points in Matlab?
I have tried adding the following code for updating sake, but it still doesnt work
osimModel.equilibrateMuscles(state);
Thanks so much for helping!
Regards,
Hilary
How to update the model in Matlab after changing the path point reference <body>?
- Hilary Cheng
- Posts: 12
- Joined: Thu Oct 04, 2018 9:10 pm
- Hilary Cheng
- Posts: 12
- Joined: Thu Oct 04, 2018 9:10 pm
Re: How to update the model in Matlab after changing the path point reference <body>?
Problem solved.
The following code might help!
changeBodyPreserveLocation (const SimTK::State &s, const PhysicalFrame &body)
Thanks! =)
The following code might help!
changeBodyPreserveLocation (const SimTK::State &s, const PhysicalFrame &body)
Thanks! =)