Calling study.visualize in matlab will cause matlab to crash

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
Matthew Lee
Posts: 52
Joined: Sat Jun 20, 2020 7:46 pm

Calling study.visualize in matlab will cause matlab to crash

Post by Matthew Lee » Thu Jun 01, 2023 6:48 am

Dear Moco development team and Moco users,

Thank you all for your contributions to the biomechanics community!

I have some issues, when I call study.visualize() in my own code which including my own model and mocostudy, matlab will crash.If I delete the command study.visualize(),matlab will not crash.

In addition,I tried the exampleSquatToStand.m which including study.visualize().This example will not crash matlab.

The system is Windows10 and the version of Matlab is 2021a and 2023a.This issue occurs in both versions of matlab.

I am confused about this phenomenon and I have no idea about how to resolve this problem,could anyone give me some advice? Thank you very much!

Best Wishes,
Matthew

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

Re: Calling study.visualize in matlab will cause matlab to crash

Post by Nicholas Bianco » Mon Jun 05, 2023 3:07 pm

Hi Matthew,

You need to pass your solution to the visualize method for it to work properly:

Code: Select all

study = MocoStudy();
% your MocoStudy configuration
solution = study.solve();
study.visualize(solution);
Best,
Nick

POST REPLY