Thank you all for your contributions to the biomechanics community! In the latest version of Moco,I have found the new goals called MocoInitialOutputGoal and MocoFinalOutputGoal which I think are very cool goals to enhance the potential of Moco. After reading relevant information about these goals from doxygen,I have known that these goals support both "Cost" (default) and "EndpointConstraint" modes.
I want to use these goals in the "EndpointConstraint" mode and set custom bounds.From OpenSim 4.4 API with Matlab, I have written codes as follows:
Code: Select all
goal1=MocoInitialOutputGoal('newgoal');
goal1.setMode('endpoint_constraint');
goal1.setOutputPath('/path/to/component|output_name'); %Just as an example template
ConInfo= goal1.updConstraintInfo();
ConInfo.setBounds(MocoBounds(6));
Then I run the code:
Code: Select all
methodsview(ConInfo)
The result shows as follows:
We can see from the figure that the Class SWIGTYPE_p_MocoConstraintInfo do not have the method setBounds.I tried to search for information from the source code of these goals, but I can't find the source codes whose name are MocoInitialOutputGoal.cpp and MocoFinalOutputGoal.cpp from OpenSim Core source code on github.https://github.com/opensim-org/opensim- ... o/MocoGoal Maybe I'm not looking for the right place, if anyone finds it please let me know.
As a summary, my main questions are listed below:
(1)I do not know how to custom bounds in the "EndpointConstraint" mode of MocoInitialOutputGoal/MocoFinalOutputGoal.I would appreciate if someone could give me some advice on how to achieve it.
(2)In addition,I found that when I try to use the method getModeAsString () ,getModeIsCost () and getModeIsEndpointConstraint () for any MocoGoal even common as MocoControlGoal, matlab will report the same error.Because these methods are Public,I am confused how should I resolve these errors. Sorry for writing a lot, thank you all for your patience, I would appreciate if anyone could give me some help.
Best Wishes,
Matthew