Saving and loading complete state of predictive simulation
Posted: Tue Nov 24, 2015 3:34 pm
I am trying to save the complete state of my system based on PredictiveSim by Dorn et al. in order to use the state as a start-condition in new simulations.
I have saved out all inner variables in the controller, each muscle as well as the position and velocity of each limb and I can load them all into place again but I cannot seem to recreate the exact state that I saved out. Position, velocity and muscle activation at load point match initially but diverge at the first time step.
I guess I am missing something somewhere but I don't know where and I have spent a week now trying to solve the issue.
I am currently going through all the values one by one making sure that they match between save-point and load-point but if anyone here by any chance has a suggestion then I am all ears. I may even be doing it in a completely silly way but if that's the case then I'll be more than happy to hear a better approach!
I am setting the muscle state by overwriting their local MuscVars struct (My actuators are 'SimpleMuscles' defined by Dorn and Wang)
Controller state is set by overwriting all inner variables as well, including the lists containing accumulated data points for delayed retrieval.
Position and velocity is handled by updating an .sto file used to initiate the simulation
Cheers and thanks in advance
- Jakob
I have saved out all inner variables in the controller, each muscle as well as the position and velocity of each limb and I can load them all into place again but I cannot seem to recreate the exact state that I saved out. Position, velocity and muscle activation at load point match initially but diverge at the first time step.
I guess I am missing something somewhere but I don't know where and I have spent a week now trying to solve the issue.
I am currently going through all the values one by one making sure that they match between save-point and load-point but if anyone here by any chance has a suggestion then I am all ears. I may even be doing it in a completely silly way but if that's the case then I'll be more than happy to hear a better approach!
I am setting the muscle state by overwriting their local MuscVars struct (My actuators are 'SimpleMuscles' defined by Dorn and Wang)
Controller state is set by overwriting all inner variables as well, including the lists containing accumulated data points for delayed retrieval.
Position and velocity is handled by updating an .sto file used to initiate the simulation
Cheers and thanks in advance
- Jakob