Hi
I want to add a path spring to a 3D walking model and optimize stiffness and rest length while tracking kinematic file (joints angle). I found that this task can be done using MOCO. I am not familiar with MOCO. Can you guide me step by step on this task?
I appreciate any helps
optimizing path spring variables
- Nicholas Bianco
- Posts: 1041
- Joined: Thu Oct 04, 2012 8:09 pm
Re: optimizing path spring variables
Hi Vahid,
You can optimize spring stiffness and rest length using MocoParameters. To get started, check out the cheat sheet on the "User Guide" page of our documentation (https://opensim-org.github.io/opensim-moco-site/docs/).
We have two solvers in Moco: MocoTropterSolver and MocoCasADiSolver. When optimizing many parameters, it is advised to use MocoTropterSolver, since MocoCasADiSolver can require extra calls to update the model for parameters that change the underlying Simbody system (e.g., mass parameters), which can slow things down.
However, if you are using an OpenSim PathSpring, using MocoCasADiSolver is fine to optimize stiffness and rest length (these only get changed at the OpenSim level). If you do use MocoCasADiSolver (which is faster if your machine can exploit parallelization), then be sure to set the property 'parameters_require_initsystem()' to false before solving your problem.
-Nick
You can optimize spring stiffness and rest length using MocoParameters. To get started, check out the cheat sheet on the "User Guide" page of our documentation (https://opensim-org.github.io/opensim-moco-site/docs/).
We have two solvers in Moco: MocoTropterSolver and MocoCasADiSolver. When optimizing many parameters, it is advised to use MocoTropterSolver, since MocoCasADiSolver can require extra calls to update the model for parameters that change the underlying Simbody system (e.g., mass parameters), which can slow things down.
However, if you are using an OpenSim PathSpring, using MocoCasADiSolver is fine to optimize stiffness and rest length (these only get changed at the OpenSim level). If you do use MocoCasADiSolver (which is faster if your machine can exploit parallelization), then be sure to set the property 'parameters_require_initsystem()' to false before solving your problem.
-Nick