workspace

SCONE is a software tool for predictive simulations of biomechanical movement. It uses OpenSim for modeling and simulation, and performs optimization using various control strategies, including feed-forward control, proprioceptic feedback control, and bal
POST REPLY
User avatar
chang wang
Posts: 8
Joined: Thu Mar 21, 2024 7:54 am

workspace

Post by chang wang » Mon Oct 14, 2024 8:50 pm

Is it possible to develop such a function, similar to the matlab workspace, it allows user to see the simulation process or after the end of the simulation of some parameters, not necessarily the parameters of the controller, but also can get some user-defined parameters. Thank you.

User avatar
chang wang
Posts: 8
Joined: Thu Mar 21, 2024 7:54 am

Re: workspace

Post by chang wang » Tue Oct 15, 2024 4:32 am

One more question, I want to develop some new modules based on your Reference Manual that are usable in software, for example to improve MuscleReflex, how should I do it?

User avatar
Thomas Geijtenbeek
Posts: 483
Joined: Wed Mar 12, 2014 8:08 am

Re: workspace

Post by Thomas Geijtenbeek » Tue Oct 15, 2024 6:52 am

Which specific parameters are you interested in? There are already many parameters being stored, which you can plot in the Analysis Window, after the evaluation of a .par file. The data that is outputted can be configured via Preferences -> Data. You can also output any custom parameter using a ScriptController or ScriptMeasure.

With regards to your second question, are you interested in changing the Reflex Controller or the MuscleReflex itself? If you can provide me a little more details about what you wish to change, I can help point you in the right direction.

User avatar
Mustafa Kamal
Posts: 6
Joined: Tue Apr 30, 2024 3:51 am

Re: workspace

Post by Mustafa Kamal » Wed Feb 05, 2025 8:15 am

Hi Thomas,

I have a question about generating a .sto file from an evaluation.

I initialized the evaluation using a .par file and implemented a ScriptController to apply external forces at specific time points. Is there a way to save all result data from the evaluation in a single .sto file? I have found a way to save different data separately, but I have not been able to capture everything at once, similar to what happens when double-clicking a .par file after optimization.

Thanks for your help!

Best regards,
Mustafa

User avatar
Thomas Geijtenbeek
Posts: 483
Joined: Wed Mar 12, 2014 8:08 am

Re: workspace

Post by Thomas Geijtenbeek » Wed Feb 05, 2025 8:31 am

I'm not sure I understand -- all data should already be in the same .sto file. Are you using the store_data() function in your script to store the data?

User avatar
Mustafa Kamal
Posts: 6
Joined: Tue Apr 30, 2024 3:51 am

Re: workspace

Post by Mustafa Kamal » Thu Feb 06, 2025 2:10 am

In the tutorial, the following function is used:

function store_data( frame )
-- store some values for analysis
frame:set_value( "body_height", body:com_pos().y )
end


I would like to modify this function to store all available data, similar to what is saved in a .sto file after double-clicking the .par file. However, I want to achieve this without manually specifying each variable in the function. Is there a way to automatically log all relevant simulation data?

To give some context, I utilized a .par file as initialization ( init { file = ... .par} ) and wrote a ScriptController, that applies external forces to the model at given time points. Then, I evaluated the .scone scenario and the resulting trajectories, activations, and other data have changed. Now, I need a way to automatically save all this data into a .sto file. How can I achieve this?

Thanks for your help!
Mustafa

User avatar
Thomas Geijtenbeek
Posts: 483
Joined: Wed Mar 12, 2014 8:08 am

Re: workspace

Post by Thomas Geijtenbeek » Thu Feb 06, 2025 2:20 am

I think I understand now :) After you evaluate the .scone file, you can simply use File -> Save Evaluation Data to generate a new .sto file, with the same name as the .scone file.

POST REPLY