You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was just wondering if I am missing an obvious way to set an environment seed so that the arm and rgb objects are initialised in a set position and with the same rgb object combinations / deformations for a given seed?
If not, I ve modified a local version of the code in the following ways that seems to have the desired effect - does this look about right or might this not replicate something?:
To set the seed for the arm position I pass an np.random.RandomState(seed) object instance as an additional argument (i.e random_state=) when initialising the _base_env Environment object in subtask_env_builder.py in the lines here. This seems to work to get the arm to always start in the same place for a given seed.
To fix the position of the rgb objects and the type / deformation of the rgb objects I needed to make two changes:
I needed to add a sort (RGB_OBJECTS_TRAIN_SET.sort()) below these lines where I think the valid object combinations are initialised. Without this the order of the valid object deformations seems to be somewhat random (I think I m probably missing setting another seed somewhere - but this seems to work as a patch).
Then I set np.random.seed(seed) (using the same random state as used in 1.) at some point before these lines where the specific objects seem to be chosen.
One thing that is still slightly confusing me is how the above seeds when the environment is initialised feed through to the env.reset()?
Any thoughts on whether this should work / makes sense / if there is an easier way to do it would be really appreciated!
The text was updated successfully, but these errors were encountered:
Hi,
I was just wondering if I am missing an obvious way to set an environment seed so that the arm and rgb objects are initialised in a set position and with the same rgb object combinations / deformations for a given seed?
If not, I ve modified a local version of the code in the following ways that seems to have the desired effect - does this look about right or might this not replicate something?:
Any thoughts on whether this should work / makes sense / if there is an easier way to do it would be really appreciated!
The text was updated successfully, but these errors were encountered: