octo-models / octo

Octo is a transformer-based robot policy trained on a diverse mix of 800k robot trajectories.
https://octo-models.github.io/
MIT License
896 stars 168 forks source link

`UnnormalizeActionProprio`'s observation function is not called in env.step #55

Open pengzhenghao opened 9 months ago

pengzhenghao commented 9 months ago

Hi, when following 03_eval_finetuned.py to create environment like:

    env = gym.make("aloha-sim-cube-v0")

    # add wrappers for history and "receding horizon control", i.e. action chunking
    env = HistoryWrapper(env, horizon=1)
    env = RHCWrapper(env, exec_horizon=50)

    # wrap env to handle action/proprio normalization -- match normalization type to the one used during finetuning
    env = UnnormalizeActionProprio(
        env, model.dataset_statistics, normalization_type="normal"
    )

The environment is finally wrapped by UnnormalizeActionProprio who is both ActionWrapper and ObservationWrapper.

I noticed that the function unnormalize is called when env.step(actions) - this is expected as we need to unnormalize the action.

However the normalize, as well as observetion function is not called in env.step. They are called in env.reset but not step. Would this leads to any critical outcome?

andrearosasco commented 5 months ago

80