OpenSim Moco is a software toolkit to solve optimal control problems with musculoskeletal models defined in OpenSim using the direct collocation method.
-
Hojin Song
- Posts: 75
- Joined: Wed Jul 08, 2020 9:46 am
Post
by Hojin Song » Tue Oct 22, 2024 12:12 am
Hello Moco Experts,
I'm currently working on a torque-driven model, and I have a question regarding the application of torque actuators at the pelvis. I'm wondering whether it is appropriate to omit torque actuators for the 6 pelvic coordinates (3 translational and 3 rotational).
The following code snipet is how I add the actuators at each coordinate:
Code: Select all
for (int i = 6; i < coord.getSize(); i++) {
// Skip the first six coordinates (for the pelvis)
auto* coordActu = new CoordinateActuator();
coordActu->setName(coord[i].getName());
coordActu->setCoordinate(&coord[i]);
coordActu->setOptimalForce(300);
coordActu->setMinControl(-1);
coordActu->setMaxControl(1);
model.addForce(coordActu);
}
For the context, my model is a single legged torque-driven model for squats, and I used a weld constraint between the foot and the ground to fix the foot position (unfortunately, I could not stabilise the foot with using foot-ground contact models
).
I appreciate any insights or experiences you might share!
Thank you!
-
Ross Miller
- Posts: 375
- Joined: Tue Sep 22, 2009 2:02 pm
Post
by Ross Miller » Wed Oct 23, 2024 4:23 pm
Hi Hojin,
You may need to describe the problem/application in more detail to get a good answer here, e.g. what methods are you using to generate the simulation?
I don't use pelvis actuators in my Moco simulations, but that is just because they are not a necessary or helpful thing in the problems I'm working on. I want to know how well different versions of the model can track a target motion using just its own muscles and how much metabolic energy it costs, and pelvis actuators would potentially confound those comparisons. There are other problems/applications where pelvis actuators are helpful/essential. For example if you are using MocoInverse, residual and reserve actuators are generally necessary to get good results, at least for some movements.
Ross
-
Hojin Song
- Posts: 75
- Joined: Wed Jul 08, 2020 9:46 am
Post
by Hojin Song » Thu Oct 24, 2024 12:58 am
Hi Ross,
Thank you for your advice!
I was trying to generate a predictive simulation (not tracking any reference motion) using MocoStudy and make the model driven by actuators at each coordinate. I'm using a fixed based model, which is using floating based model first then constrain the foot with a weldconstraint(). My initial thought was that ideally, the net force and torque at the pelvis supposed to be 0, and hence we do not need to add actuators at pelvis's DoFs.
I have already run several simulations without them and the results seem okay, but I wanted to ensure whether it's a good practice. I'm afraid I may not have explained my question clearly
I appreciate you sharing your experience
best,
Hojin