Hey community,
I am trying to instantiate a ControlSetController() object using Matlab 2020b and Opensim 4.2
I imported the library using: import org.opensim.modeling.*
For example, setting up a new model works: model = Model(). Other API calls work as well.
When instantiating a ControlSetController() object, however, I am getting the Matlab error: Unrecognized function or variable 'ControlSetController'. I looked up the class in the documentation: https://opensim-org.github.io/opensim-m ... oller.html. Therefore, I am certain, that the class should exist. I am using the following code line:
myController = ControlSetController()
Any idea what I am doing wrong?
Thanks in advance!
Best, Benedict
Instantiating ControlSetController in Matlab
- Benedict Koenen
- Posts: 5
- Joined: Fri Nov 18, 2022 1:52 am
- Carmichael Ong
- Posts: 401
- Joined: Fri Feb 24, 2012 11:50 am
Re: Instantiating ControlSetController in Matlab
It looks like it may not be available in MATLAB because it doesn't appear in the SWIG include file: https://github.com/opensim-org/opensim- ... mulation.i
However, depending on your use case, often a PrescribedController instead could be better to use as a workaround.
However, depending on your use case, often a PrescribedController instead could be better to use as a workaround.
- Benedict Koenen
- Posts: 5
- Joined: Fri Nov 18, 2022 1:52 am
Re: Instantiating ControlSetController in Matlab
Thank you for the explanation, Carmichael!
I ended up using a Prescribed Controller which is a suitable workaround for my usecase.
I ended up using a Prescribed Controller which is a suitable workaround for my usecase.