Page 1 of 1

Set output destination of a simulation

Posted: Mon Jun 08, 2020 10:18 pm
by kmns
Hi,

I want to run simulations with different conditions (e.g. run gait simulations while increasing a delay parameter in a control model).
Taking a cue from a past forum post (viewtopic.php?f=1180&t=11680&sid=931f56 ... 9c153f95ee), I can change leg_load_sonsor_delay parameter of GH2020 gait control model and run a simulation by using the following command.

Code: Select all

sconecmd.exe -e "...\Tutorials\Tutorial 4a - Gait.scone" CmaOptimizer.SimulationObjective.GaitStateController.leg_load_sonsor_delay=0.1
However, the output of the result is always in the same file (e.g. Tutorial 4a - Gait.scone.sto). Is it possible to set this output destination with a command or scone file?

Also, is there a better way to run such simulations with different conditions?

Thanks,
Kohei

Re: Set output destination of a simulation

Posted: Tue Jun 09, 2020 12:07 am
by tgeijten
If you change a scenario parameter, you need to run a new optimization using the -o switch for the changes to take effect:

Code: Select all

sconecmd.exe -o "...\Tutorials\Tutorial 4a - Gait.scone" CmaOptimizer.SimulationObjective.GaitStateController.leg_load_sonsor_delay=0.1
With a good initialization (using the init_file parameter), the optimization should not take too long to converge, depending on how large the change is.

Running an optimization is needed because a change in any of the parameters requires some adaptation before the gait becomes stable again.

By the way, there is also a parameter called sensor_delay_scaling_factor (see Model) that allows you to change the delays of all reflexes with a specific factor.

Re: Set output destination of a simulation

Posted: Thu Jun 11, 2020 1:23 am
by kmns
As you say, when simulating a gait, we need to optimize parameters for each condition to make stable motions. The decrease in the time for optimizations with a good initialization seems important. I want to use it effectively.

(The filename of an output .sto file depends on the filename of a .scone file. It was a problem for my iterative process, but I solved it by renaming the .sto file each time.)

Thank you very much.