real-stanford / diffusion_policy

[RSS 2023] Diffusion Policy Visuomotor Policy Learning via Action Diffusion
https://diffusion-policy.cs.columbia.edu/
MIT License
1.09k stars 203 forks source link

Why we must to use MultiStepWrapper? #81

Closed CAI23sbP closed 1 month ago

CAI23sbP commented 1 month ago

How are you @cheng-chi ?

I read your paper and code. But i didn't understand about MultiStepWrapper. It only worked in Evaluation stage, Could you explain why?

sigmundhh commented 1 month ago

Hi! As far I see, the MultiStepWrapper allows for the applications of $T_a$ actions. In this part of the code, they iterate over the list of actions (which is $T_a$ long), which is what is returned from the predict_action from Diffusion Policy:

def step(self, action):
        """
        actions: (n_action_steps,) + action_shape
        """
        for act in action:
            if len(self.done) > 0 and self.done[-1]:
         ...

Hope this helps!

CAI23sbP commented 1 month ago

Oh i see. Thank you! @sigmundhh .