Yikes! That's not good.
Aaron, I think I might know the issue, but could you post an example that fails in the way you're describing so I can reproduce?
FunctionBasedPath
Re: FunctionBasedPath
Hi Nick,
Here's a simple replication from a pipeline, where the .osim file has muscles that include polynomials for the muscle paths.
Either one of the remove or replace muscles operators seem to cause a crash when the model is processed. If I take those operators away then the model can be processed fine.
Aaron
Here's a simple replication from a pipeline, where the .osim file has muscles that include polynomials for the muscle paths.
Code: Select all
modelProc = osim.ModelProcessor('model.osim')
modelProc.append(osim.ModOpRemoveMuscles())
modelProc.append(osim.ModOpReplaceMusclesWithDeGrooteFregly2016())
osimModel = modelProc.process()
Aaron
- Nicholas Bianco
- Posts: 1041
- Joined: Thu Oct 04, 2012 8:09 pm
Re: FunctionBasedPath
Thanks Aaron! I will investigate.
- Kaitlyn Downer
- Posts: 11
- Joined: Tue Jul 11, 2023 8:47 am
Re: FunctionBasedPath
Hi everyone,
Thank you all for providing your thoughts/experiences with function based paths - it has given me a great start with implementing them in my project! However, I am trying to add a metabolic goal to my MocoTrack problem (using the example2DWalkingMetabolics) and I am getting the following error after using finalizeConnections:
RuntimeError: std::exception in 'void OpenSim::Model::finalizeConnections()': Property 'PathPointSet' has an invalid value.(details: A valid path must be connected to a model by at least two PathPoints.).
I am now realizing that this may be because I am using the function based paths so I cannot use the finalizeConnections. Does anyone know if this is the case and if there is a workaround?
Best,
Kaitlyn
Thank you all for providing your thoughts/experiences with function based paths - it has given me a great start with implementing them in my project! However, I am trying to add a metabolic goal to my MocoTrack problem (using the example2DWalkingMetabolics) and I am getting the following error after using finalizeConnections:
RuntimeError: std::exception in 'void OpenSim::Model::finalizeConnections()': Property 'PathPointSet' has an invalid value.(details: A valid path must be connected to a model by at least two PathPoints.).
I am now realizing that this may be because I am using the function based paths so I cannot use the finalizeConnections. Does anyone know if this is the case and if there is a workaround?
Best,
Kaitlyn
- Nicholas Bianco
- Posts: 1041
- Joined: Thu Oct 04, 2012 8:09 pm
Re: FunctionBasedPath
Hi Kaitlyn,
My guess is that you correctly replaced your GeometryPaths with FunctionBasedPaths, but there is still a PathPointSet that was used by the GeometryPath lingering in the model. You might need to manually remove the PathPointSet before converting to FunctionBasedPaths for now.
Let me know if this is the case. If so, I'll need to file an issue.
Best,
Nick
My guess is that you correctly replaced your GeometryPaths with FunctionBasedPaths, but there is still a PathPointSet that was used by the GeometryPath lingering in the model. You might need to manually remove the PathPointSet before converting to FunctionBasedPaths for now.
Let me know if this is the case. If so, I'll need to file an issue.
Best,
Nick