Search found 34 matches

by Daniel Gordon
Mon Feb 14, 2022 9:07 am
Forum: OpenSim Moco
Topic: Struggling with MocoOutputGoals
Replies: 2
Views: 375

Struggling with MocoOutputGoals

Hello, I can't figure out how to get MocoOutputGoal costs to work through the Matlab or C++ API's. Here's how I've been defining the goals: // Set up kinetic energy goal if (w_kinetic > 0) { auto* kinetic_goal = problem.addGoal<MocoOutputGoal>("kinetic", w_kinetic); kinetic_goal->setOutputPath(kinet...
by Daniel Gordon
Thu Sep 09, 2021 7:42 am
Forum: OpenSim Moco
Topic: Trouble running MocoTrack in implicit mode?
Replies: 1
Views: 411

Trouble running MocoTrack in implicit mode?

Hello, I'm trying to run the MocoTrack tool for a problem in implicit mode using Matlab, but am running in to this error: java.lang.RuntimeException: casVector should be 1-dimensional, but has size 0 x 0. Thrown at MocoCasOCProblem.h:108 in convertToSimTKVector(). The same code when run in explicit ...
by Daniel Gordon
Fri Mar 19, 2021 3:13 am
Forum: OpenSim
Topic: Problems visualising forces in GUI
Replies: 1
Views: 380

Problems visualising forces in GUI

I would like to visualise assistance forces in the GRF which are not applied in the normal location for GRFs. However, whenever I try to do this OpenSim gets an error. Here's a minimal example. Steps: 1) Load default gait2392 model from resources folder. 2) Load subject01_walk1_ik file. 3) Associate...
by Daniel Gordon
Sun Oct 18, 2020 2:43 pm
Forum: OpenSim
Topic: SO unable to equilibrate muscles at few timesteps
Replies: 1
Views: 480

SO unable to equilibrate muscles at few timesteps

Hello, I'm running static optimisations on some data. I find that static optimisation solves fine for most timesteps, but for some (typically 1 - 2 timesteps per gait cycle), I get an error similar to the following: time = 0.89 Performance = 524.291 Constraint violation = 1.56921e-09 WARNING- Analyz...
by Daniel Gordon
Mon Sep 28, 2020 1:58 pm
Forum: OpenSim
Topic: Output no longer displayed to command window in Matlab
Replies: 8
Views: 1073

Re: Output no longer displayed to command window in Matlab

Hi Russell,

I now have the same problem as you (amusingly the opposite problem to when I originally created this post).

Did you find a nice way of suppressing the output to the command window?

Cheers,

Daniel
by Daniel Gordon
Thu Jun 11, 2020 4:45 pm
Forum: OpenSim Moco
Topic: Error when attempting parameter optimisation in Matlab
Replies: 5
Views: 639

Re: Error when attempting parameter optimisation in Matlab

Thanks for the quick help. I'll try that or maybe using the Tropter solver without prescribing kinematics.

Out of interest, is there an easy way to know which model parameters require calls to initSystem() and which don't?

Thanks again
by Daniel Gordon
Thu Jun 11, 2020 1:52 pm
Forum: OpenSim Moco
Topic: Error when attempting parameter optimisation in Matlab
Replies: 5
Views: 639

Error when attempting parameter optimisation in Matlab

Hi, I've set up a MocoStudy tracking prescribed kinematics and minimising muscle activations as well as penalising deviations from reference control values in the cost term. This runs fine. However, when I try to add a MocoParameter to optimise the max isometric force value for a muscle, like so: pa...
by Daniel Gordon
Thu May 28, 2020 3:21 am
Forum: OpenSim
Topic: Muscle Moments vs Inverse Dynamics Moments
Replies: 4
Views: 776

Re: Muscle Moments vs Inverse Dynamics Moments

Hi Dimitar, Thanks for the help. However, we are running inverse dynamics on the CMC_Kinematics_q file that is output from the CMC simulation - in this case, wouldn't we expect the ID torques to be equivalent to the sum of the muscle force/reserve actuator contributions, since it is computed for the...
by Daniel Gordon
Wed May 27, 2020 6:21 am
Forum: OpenSim
Topic: Muscle Moments vs Inverse Dynamics Moments
Replies: 4
Views: 776

Muscle Moments vs Inverse Dynamics Moments

Apologies for the quite simple question but I seem to have a gap in my understanding somewhere that I can't figure out. Basically, I want to show that the summed contributions of muscle forces & reserve actuators matches the inverse dynamics solution for a set of motion states obtained from CMC. Inp...
by Daniel Gordon
Wed Apr 08, 2020 2:43 am
Forum: OpenSim
Topic: Creating Custom Controller in Matlab
Replies: 3
Views: 596

Creating Custom Controller in Matlab

Hi, I was wondering if it's possible in OpenSim 4.1 to create a custom controller component in Matlab (e.g. in a similar manner to as is done in the TugOfWar Controller example in the C++ files). I know this wasn't possible in OpenSim 3.3 but just wanted to check. I have a work-around involving the ...