Hi team,
I am trying to do a forward dynamic simulation of gait10dof18muscle model. I removed/disabled the muscles in the model and was trying to run the model with reserve actuators in CMC. Once I get the controls for the gait, I tried using them in the forward dynamics with same reserve actuators. However, I find the model behaving very odd. ( I did follow the guidelines mentioned https://simtk-confluence.stanford.edu:8 ... mics+Works )
- Could you please give me some pointers on how to perform an FD with just coordinate actuators?
- Should I add torque actuators instead of coordinate actuators in the model?
- In the model navigator, I find no forces other than the coordinate limit forces added for the joints, but the coordinate actuators are appended to the simulation by adding the external reserve actuator files. Is that okay?
Thanks,
Vishal
Forward Dynamics with Coordinate Actuators
Re: Forward Dynamics with Coordinate Actuators
Hi, Vishal-
I vaguely remember having a similar issue a few years ago. I could only get a stable FWD solution when adding a CorrectionController to the ForwardTool. Despite CMC doing a good job of computing controls for all the actuators, there are still tiny errors in the estimated controls so, when applied in Fwd, they accumulate quickly and cause the simulation to blow up.
I have attached a test folder where I made a few versions of the Setup Files and Actuator Files. I have included Fwd Setup files that have the correction controller and give a stable solution. If you view the output controls from the version with the correction controller, you can see that the contribution is very small.
Goodluck,
-J
I vaguely remember having a similar issue a few years ago. I could only get a stable FWD solution when adding a CorrectionController to the ForwardTool. Despite CMC doing a good job of computing controls for all the actuators, there are still tiny errors in the estimated controls so, when applied in Fwd, they accumulate quickly and cause the simulation to blow up.
I have attached a test folder where I made a few versions of the Setup Files and Actuator Files. I have included Fwd Setup files that have the correction controller and give a stable solution. If you view the output controls from the version with the correction controller, you can see that the contribution is very small.
Goodluck,
-J
- Attachments
-
- test.zip
- (119.74 KiB) Downloaded 99 times
Re: Forward Dynamics with Coordinate Actuators
Thanks a lot, James! I wasn't aware of this CorrectionController at all.
May I know how you wrote this setup file after adding the controller. I mean how did you know the correct names of the tags that have to be put. The API docs show member functions only https://simtk.org/api_docs/opensim/api_ ... ml#details
Just curious to understand the process, Thanks a lot for your time![Smile :)](./images/smilies/icon_e_smile.gif)
Best,
Vishal
May I know how you wrote this setup file after adding the controller. I mean how did you know the correct names of the tags that have to be put. The API docs show member functions only https://simtk.org/api_docs/opensim/api_ ... ml#details
Just curious to understand the process, Thanks a lot for your time
![Smile :)](./images/smilies/icon_e_smile.gif)
Best,
Vishal
Re: Forward Dynamics with Coordinate Actuators
Good Question. Doxygen is decent for most things but can be pretty unwieldy since it is autogenerated.
The easiest way of finding the XML block for a class is in the OpenSim GUI. If you select Help->XML Browser.., a window will open with all the XML snippets for all the classes (Below). You scroll to the class you want, highlight the XML, copy, and paste.
Typically, my personal process is to use a combination of Doxygen and searching directly in the source code. In this case, if you search for 'CorrectionController' in the OpenSim repo, you get a bunch of hits for the C++ code but also XML examples of where it has been used. I would copy-paste the XML from one of the previous examples and use it in my file. Actually...what I do is to use Atom (it could be any decent text-editor come IDE) to index the entire OpenSim source code and use the search functionality to find the class definition and any usages of the class. Perhaps that works for me though because I am reasonably familiar with OpenSim.
Hope that helps,
-James
The easiest way of finding the XML block for a class is in the OpenSim GUI. If you select Help->XML Browser.., a window will open with all the XML snippets for all the classes (Below). You scroll to the class you want, highlight the XML, copy, and paste.
Typically, my personal process is to use a combination of Doxygen and searching directly in the source code. In this case, if you search for 'CorrectionController' in the OpenSim repo, you get a bunch of hits for the C++ code but also XML examples of where it has been used. I would copy-paste the XML from one of the previous examples and use it in my file. Actually...what I do is to use Atom (it could be any decent text-editor come IDE) to index the entire OpenSim source code and use the search functionality to find the class definition and any usages of the class. Perhaps that works for me though because I am reasonably familiar with OpenSim.
Hope that helps,
-James