Good morning Dr. Geijtenbeek,
First, thank you very much for this very nice and useful software!
Second, I was wondering if it would be possible to trigger the start of a perturbation force based on a contact event, e.g. when the foot touches or leaves the ground after a pre-defined number of steps?
Thank you!
Perturbation triggered by contact event
- Jerome Hausselle
- Posts: 4
- Joined: Tue May 12, 2009 2:09 am
- Thomas Geijtenbeek
- Posts: 432
- Joined: Wed Mar 12, 2014 8:08 am
Re: Perturbation triggered by contact event
Good to hear you find SCONE useful!
Perturbations via the PerturbationController are always triggered at a specific time. Alternatively, you can apply perturbations via the ScriptController (just make sure to set enable_external_forces = 1). Depending on your goal, you can either:
Perturbations via the PerturbationController are always triggered at a specific time. Alternatively, you can apply perturbations via the ScriptController (just make sure to set enable_external_forces = 1). Depending on your goal, you can either:
- Evaluate an optimized result and see at what time the event you're looking for takes place. You can then set the time in the PerturbationController to match this event. This does require the timing of the event to be fixed.
- Create your own script using a ScriptController and detect the contact event by monitoring the ground reaction force. You can then apply any perturbation force at any event you define in the script. Tutorial 6b should help to get you started with this.
- Jerome Hausselle
- Posts: 4
- Joined: Tue May 12, 2009 2:09 am
Re: Perturbation triggered by contact event
Thank you for your quick answer!
I tried option 1 but when I ran the simulation again the timing of the event changed (I guessed because the optimized parameters were slightly different). Is-it possible to run a "basic" forward simulation with SCONE (i.e. input conditions and the optimized parameters)?
I will try option 2 and keep you posted.
Thank you!
I tried option 1 but when I ran the simulation again the timing of the event changed (I guessed because the optimized parameters were slightly different). Is-it possible to run a "basic" forward simulation with SCONE (i.e. input conditions and the optimized parameters)?
I will try option 2 and keep you posted.
Thank you!
- Jerome Hausselle
- Posts: 4
- Joined: Tue May 12, 2009 2:09 am
Re: Perturbation triggered by contact event
I followed you advice for option #2 and it works perfectly!
Thank you so much!
Thank you so much!
- Thomas Geijtenbeek
- Posts: 432
- Joined: Wed Mar 12, 2014 8:08 am
Re: Perturbation triggered by contact event
That's great to hear, thanks!
In answer to your previous question: you can run a simulation with optimized parameters by specifying an init_file in the Optimizer, and pressing Ctrl + E to evaluate the scenario. However, this will use the population mean instead of the population best from the .par file, so the results will be slightly different than the optimized results. They will be consistent though, so you should get your timing here instead of from the optimized results.
In answer to your previous question: you can run a simulation with optimized parameters by specifying an init_file in the Optimizer, and pressing Ctrl + E to evaluate the scenario. However, this will use the population mean instead of the population best from the .par file, so the results will be slightly different than the optimized results. They will be consistent though, so you should get your timing here instead of from the optimized results.
- Jerome Hausselle
- Posts: 4
- Joined: Tue May 12, 2009 2:09 am
Re: Perturbation triggered by contact event
I did not realize it was using the mean individual and not the best, I guess I will test both options.
Thank you so much for your help and your quick replies!
Thank you so much for your help and your quick replies!
Re: Perturbation triggered by contact event
Dear Thomas,
I'm wondering if there is a way to use population best from the .par file instead of population mean, while evaluating a .scone scenario using init function?
I'm wondering if there is a way to use population best from the .par file instead of population mean, while evaluating a .scone scenario using init function?
tgeijten wrote: ↑Mon Nov 30, 2020 2:24 amThat's great to hear, thanks!
In answer to your previous question: you can run a simulation with optimized parameters by specifying an init_file in the Optimizer, and pressing Ctrl + E to evaluate the scenario. However, this will use the population mean instead of the population best from the .par file, so the results will be slightly different than the optimized results. They will be consistent though, so you should get your timing here instead of from the optimized results.
- Thomas Geijtenbeek
- Posts: 432
- Joined: Wed Mar 12, 2014 8:08 am
Re: Perturbation triggered by contact event
Yes, you can, using the new init syntax:
For more information, see:
https://scone.software/doku.php?id=ref: ... t_settings
Code: Select all
init { file = par_file.par use_best_as_mean = 1 }
https://scone.software/doku.php?id=ref: ... t_settings