Error: Component '3DGaitModel2392' could not find '/jointset/hip_r/hip_flexion_r/value

OpenSim Moco is a software toolkit to solve optimal control problems with musculoskeletal models defined in OpenSim using the direct collocation method.
POST REPLY
User avatar
Ebenezer Adorão
Posts: 5
Joined: Wed Oct 26, 2022 8:27 am

Error: Component '3DGaitModel2392' could not find '/jointset/hip_r/hip_flexion_r/value

Post by Ebenezer Adorão » Tue Sep 10, 2024 6:56 am

Hello,

I'm working on a MocoStudy using 3DGaitModel2392 and I'm experiencing an error when I try to initialize

A Java exception occurred:

java.lang.RuntimeException: Component '3DGaitModel2392' could not find '/jointset/hip_r/hip_flexion_r/value' of type Component. Make sure a component exists
at this path and that it is of the correct type.
Thrown at Component.h:772 in getComponent().

at org.opensim.modeling.opensimMocoJNI.MocoStudy_initCasADiSolver(Native Method)

at org.opensim.modeling.MocoStudy.initCasADiSolver(MocoStudy.java:229)


This error happens when I call MocoStudy.initCasADiSolver()

In my code, I have:
1. Loaded the 3DGaitModel2392 model.
2. Modifications applied, such as ignoring tendon compliance and replacing muscles.
3. Set time limits and joint positions including the hip, knee and ankle.

I'm not sure if the problem is path related or something deeper in the model configuration. Has anyone encountered a similar issue or have any advice on how to resolve this?

Any help or guidance would be appreciated

Thanks!

User avatar
Nicholas Bianco
Posts: 1045
Joined: Thu Oct 04, 2012 8:09 pm

Re: Error: Component '3DGaitModel2392' could not find '/jointset/hip_r/hip_flexion_r/value

Post by Nicholas Bianco » Wed Sep 11, 2024 10:30 am

Hi Ebenezer,

Could you provide more details about the MocoStudy you are trying to solve? Also, have you checked that your model has a joint named "hip_r" with coordinate named "hip_flexion_r"?

Best,
Nick

User avatar
Ebenezer Adorão
Posts: 5
Joined: Wed Oct 26, 2022 8:27 am

Re: Error: Component '3DGaitModel2392' could not find '/jointset/hip_r/hip_flexion_r/value

Post by Ebenezer Adorão » Fri Sep 13, 2024 5:20 am

Hi Nick,

Yes, my model has a joint named "hip_r" with a coordnate named "hip_flexion_r".

"<CustomJoint name="hip_r">

<Coordinate name="hip_flexion_r">"

The MocoStudy is set up with MocoOutputGoal to maximize the velocity of the knee joint.

If you need more information, please let me know what is necessary.

I thank you in advance for your help.

Best,

Ebenezer

User avatar
Carlos Gonçalves
Posts: 136
Joined: Wed Jun 08, 2016 4:56 am

Re: Error: Component '3DGaitModel2392' could not find '/jointset/hip_r/hip_flexion_r/value

Post by Carlos Gonçalves » Fri Sep 13, 2024 1:48 pm

Hello Ebenezer.

I will take a wild guess ...

When you load your model in OpenSim 4.4 (or higher) do you get this message?

Code: Select all

Updating Model file from 20303 to latest format...
Loaded model 3DGaitModel2392 from file C:\OpenSim44_Models\Models\Gait2392_Simbody\gait2392_simbody.osim
ControllerSet 'Controllers' was renamed and is being reset to 'controllerset'.
ComponentSet 'MiscComponents' was renamed and is being reset to 'componentset'.
If so, your file is original from OpenSim installation and it is in an old format. In old formats there is no /jointset component. Everything is inside the /Bodyset.

What I did previously was to go to OpenSim and "Save as" the model. You could give it another name. OpenSim will save in the current format.

Take a look at the differences:
erroOpenSim.PNG
erroOpenSim.PNG (62.21 KiB) Viewed 233 times
So right now the CasADiSolver will find everything in the right place.

Hope it helps.

Best regards.

POST REPLY