How to direct the MeasurementSet to a file in ScaleTool?

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Mohammadreza Rezaie
Posts: 412
Joined: Fri Nov 24, 2017 12:48 am

How to direct the MeasurementSet to a file in ScaleTool?

Post by Mohammadreza Rezaie » Sat Jun 12, 2021 1:37 am

Hi,

I'd like to direct the MeasurementSet data is Scale setup file to an external file similar to this:
<MeasurementSet file="measurements.xml">
If I do it manually, it works well in OpenSim.

But I couldn't find something in python to set the file:

Code: Select all

scale = osim.ScaleTool()
scale.getModelScaler().getMeasurementSet().setFileName('measurements.xml')
I wonder if you would guide me how I can do it.

Regards,
Mohammadreza

Tags:

User avatar
Thomas Uchida
Posts: 1794
Joined: Wed May 16, 2012 11:40 am

Re: How to direct the MeasurementSet to a file in ScaleTool?

Post by Thomas Uchida » Sat Jun 12, 2021 5:41 am

You might be able to do something like this:

Code: Select all

scale = osim.ScaleTool()
mset = osim.MeasurementSet('measurements.xml')
scale.getModelScaler().setMeasurementSet(mset)
https://simtk.org/api_docs/opensim/api_ ... eTool.html

User avatar
Mohammadreza Rezaie
Posts: 412
Joined: Fri Nov 24, 2017 12:48 am

Re: How to direct the MeasurementSet to a file in ScaleTool?

Post by Mohammadreza Rezaie » Sat Jun 12, 2021 6:06 am

Dear Thomas,

Thanks for your reply. You are right.
I intended to make the setup file easier to understand for teaching purposes. You know, with "MeasurementSet"s and "IKTaskSet"s the setup file is so crowded.

I was wondering if you would tell me whether there is any other way to do in Python.

Best,
Mohammadreza

POST REPLY