Hi Nick,
My bushingforce should have no errors, I have already conducted forward simulation verification on the Opensim GUI interface. In addition, when I set the stiffness and damping parameters of all bushingforce to 0, there will still be crashes, so I should rule out the situation where bushingforce is infinite and causes non convergence.When I switch to another computer for the same task, it still crashes.
Best,
Jingke
After using Moco simulation, how to extract the contact force between the sole of the foot and the ground?
- Jingke Song
- Posts: 34
- Joined: Tue Oct 19, 2021 4:52 am
- Nicholas Bianco
- Posts: 992
- Joined: Thu Oct 04, 2012 8:09 pm
Re: After using Moco simulation, how to extract the contact force between the sole of the foot and the ground?
Hi Jingke,
It's possible during the optimization Moco finds an intermediate iterate for the joint configurations that leads to large bushing forces and subsequently a crash. I'm not sure about this though. I've used bushing forces in my simulations without issue in my simulations.
Could you provide more information about how the robot model is connected to the body (i.e., number of DOFs, types of joints, etc)?
-Nick
It's possible during the optimization Moco finds an intermediate iterate for the joint configurations that leads to large bushing forces and subsequently a crash. I'm not sure about this though. I've used bushing forces in my simulations without issue in my simulations.
Could you provide more information about how the robot model is connected to the body (i.e., number of DOFs, types of joints, etc)?
-Nick
- Jingke Song
- Posts: 34
- Joined: Tue Oct 19, 2021 4:52 am
Re: After using Moco simulation, how to extract the contact force between the sole of the foot and the ground?
Hi Nick,
I have now solved this problem by using ExpressionBasedBushingForce instead of BushingForce, but after repeated attempts, I still believe that there is a bug in Moco: when the exoskeleton is connected to the human body through BushingForce and there are no muscles in the model, using CoordinateActor to drive will cause a crash, and if muscle drive is used, no crash will occur.
Best,
Jingke
I have now solved this problem by using ExpressionBasedBushingForce instead of BushingForce, but after repeated attempts, I still believe that there is a bug in Moco: when the exoskeleton is connected to the human body through BushingForce and there are no muscles in the model, using CoordinateActor to drive will cause a crash, and if muscle drive is used, no crash will occur.
Best,
Jingke
- Jingke Song
- Posts: 34
- Joined: Tue Oct 19, 2021 4:52 am
Re: After using Moco simulation, how to extract the contact force between the sole of the foot and the ground?
Hi Nick,
Currently, I want to use the computeForce() command to calculate the amplitude of spring force SpringGeneralizedForce or CoordinateLimitForce in order to use it as the moco output goal, but the following error message occurred: The function or variable 'computeForce' is not recognized. I would like to inquire if the computeForce() command has been removed in the new version of OpenSim? If not, what is the correct way to use computeForce()? Or what other command can I use to calculate the magnitude of the force?
My program is shown below.
springForce = forceSet.get('springgeneralizedforce');
springForceObj = SpringGeneralizedForce.safeDownCast(springForce);
force = springForceObj.computeForce(State);
I look forward to your reply very much.
Best,
Jingke
Currently, I want to use the computeForce() command to calculate the amplitude of spring force SpringGeneralizedForce or CoordinateLimitForce in order to use it as the moco output goal, but the following error message occurred: The function or variable 'computeForce' is not recognized. I would like to inquire if the computeForce() command has been removed in the new version of OpenSim? If not, what is the correct way to use computeForce()? Or what other command can I use to calculate the magnitude of the force?
My program is shown below.
springForce = forceSet.get('springgeneralizedforce');
springForceObj = SpringGeneralizedForce.safeDownCast(springForce);
force = springForceObj.computeForce(State);
I look forward to your reply very much.
Best,
Jingke
- Nicholas Bianco
- Posts: 992
- Joined: Thu Oct 04, 2012 8:09 pm
Re: After using Moco simulation, how to extract the contact force between the sole of the foot and the ground?
Hi Jingke,
Best,
Nick
I'm glad you found a temporary fix for this. I doubt this bug is related to Moco, but rather probably has something to do with the model itself. If you can create a reproducible example of the bug, feel free to post an issue to the opensim-core GitHub.I have now solved this problem by using ExpressionBasedBushingForce instead of BushingForce, but after repeated attempts, I still believe that there is a bug in Moco: when the exoskeleton is connected to the human body through BushingForce and there are no muscles in the model, using CoordinateActor to drive will cause a crash, and if muscle drive is used, no crash will occur.
All classes derived from Force can use "getRecordValues()" to compute forces. You can call "getRecordLabels()" to get the labels for each output in getRecordValues().Currently, I want to use the computeForce() command to calculate the amplitude of spring force SpringGeneralizedForce or CoordinateLimitForce in order to use it as the moco output goal
Best,
Nick