How to use OpenSim::TableUtilities::resample?

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

How to use OpenSim::TableUtilities::resample?

Post by Mohammadreza Rezaie » Mon Apr 17, 2023 9:10 am

Hi,

I want to resmaple a TimeSeriesTable and found OpenSim::TableUtilities::resample on Doxygen, but I don't know how to use it. TableUtilities doesn't have resample method in Python:

Code: Select all

In [29]: dir(osim.TableUtilities())

['__class__',
 '__delattr__',
 '__dict__',
 '__dir__',
 '__doc__',
 '__eq__',
 '__format__',
 '__ge__',
 '__getattribute__',
 '__gt__',
 '__hash__',
 '__init__',
 '__init_subclass__',
 '__le__',
 '__lt__',
 '__module__',
 '__ne__',
 '__new__',
 '__reduce__',
 '__reduce_ex__',
 '__repr__',
 '__setattr__',
 '__sizeof__',
 '__str__',
 '__subclasshook__',
 '__swig_destroy__',
 '__weakref__',
 'checkNonUniqueLabels',
 'convertRotationsToEulerAngles',
 'filterLowpass',
 'findStateLabelIndex',
 'isInDegrees',
 'pad',
 'this',
 'thisown']
I'm also aware of OpenSim::Storage::resample and the conversion between Strorage and TimeSeriesTable. But I prefer to work with TimeSeriesTable rather than Storage.

Any help is greatly appreciated.
Mohammadreza

Tags:

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

Re: How to use OpenSim::TableUtilities::resample?

Post by Mohammadreza Rezaie » Wed Apr 26, 2023 9:13 am

Any suggestion?

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

Re: How to use OpenSim::TableUtilities::resample?

Post by Ayman Habib » Wed Apr 26, 2023 9:29 am

Hi Mohammadreza,

The method is actually a template in C++ and we didn't expose specific specialization for it when exposing the class to python or java bindings, I opened an issue on github to keep track as this is more of an API issue and we can discuss what possible solutions/workaround exist there.

Thanks for reporting,
-Ayman

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

Re: How to use OpenSim::TableUtilities::resample?

Post by Mohammadreza Rezaie » Wed Apr 26, 2023 9:36 am

Thanks Ayman, I'm looking forward this feature in your new release.

POST REPLY