I'm trying to perform a simulation using optimized parameters in another simulation (I can't divert .par files because the parameters to be optimized for these simulations are different).
For this simulation, after I optimized only an offset of each joint angle, I added the optimized offsets (second columns in .par file) to the initial joint angle values and ran the simulation using the same controller.
I expected to get the same results as the simulation run by double-clicking the .par file in the result folder on SCONE, but I got different results.
I checked that all the values were the same. Is this a related problem with significant digits?
If so, is there anything I can do to get the same simulation results that I get by double-clicking the .par file?
Thank you for your always support.
Simulation using optimized parameters
- Yuichiro Omura
- Posts: 44
- Joined: Thu Apr 04, 2019 10:03 pm
- Thomas Geijtenbeek
- Posts: 432
- Joined: Wed Mar 12, 2014 8:08 am
Re: Simulation using optimized parameters
If you only optimize joint offsets in your initial optimization, and add those to the initial pose, then the result should be very similar. There might be some minor differences due to rounding errors, but this should be minimal (although eventually errors will accumulate and the simulation can diverge).
A good way to compare the simulations is to first run the .par, then plot all coordinates in the Analysis Window, and press Tools -> Keep Current Analysis Graphs. This will keep the graphs in the background of the plot. You can then run the new simulation with the new offsets, and compare the coordinates in the graph. Perhaps this will help you spot a difference somewhere.
A good way to compare the simulations is to first run the .par, then plot all coordinates in the Analysis Window, and press Tools -> Keep Current Analysis Graphs. This will keep the graphs in the background of the plot. You can then run the new simulation with the new offsets, and compare the coordinates in the graph. Perhaps this will help you spot a difference somewhere.
- Yuichiro Omura
- Posts: 44
- Joined: Thu Apr 04, 2019 10:03 pm
Re: Simulation using optimized parameters
Thank you for the solution and information.
I have checked and it seems that the divergence was still occurring due to rounding errors.
I have checked and it seems that the divergence was still occurring due to rounding errors.
- Thomas Geijtenbeek
- Posts: 432
- Joined: Wed Mar 12, 2014 8:08 am
Re: Simulation using optimized parameters
You can also use sconecmd to evaluate an existing .par file, using:
Code: Select all
sconecmd -e <par_file.par>
- Yuichiro Omura
- Posts: 44
- Joined: Thu Apr 04, 2019 10:03 pm
Re: Simulation using optimized parameters
Thank you for sharing the method! I'll use this command to fix the problem.