Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There seems to be a bug in the step function of the robot_supervisor.py #80

Closed
RLMilestone opened this issue Mar 11, 2021 · 1 comment · Fixed by #120
Closed

There seems to be a bug in the step function of the robot_supervisor.py #80

RLMilestone opened this issue Mar 11, 2021 · 1 comment · Fixed by #120
Assignees
Labels
refactor Refactoring existing code base
Milestone

Comments

@RLMilestone
Copy link

        if super(Supervisor, self).step(self.timestep) == -1:
            exit()

        self.apply_action(action)
        return (
            self.get_observations(),
            self.get_reward(action),
            self.is_done(),
            self.get_info(),
        )

In RL, it seems to be more natural to apply_action and then Supervisor.step(). Otherwise, you will not get correct response of your action (delay by one timestep!)

@tsampazk
Copy link
Member

Hello @RLMilestone, thank you for opening this issue! This is a point of debate for the project since the very beginning. Indeed it seems more natural to step the controller after calling apply_action in the robot-supervisor scheme.

We will have to look into it in depth, because it would be nice for us to do the same in both the robot-supervisor scheme and the emitter-receiver scheme, but in the emitter-receiver scheme it might cause unforeseen issues due to the way the messages are transmitted.

@tsampazk tsampazk added the refactor Refactoring existing code base label Mar 14, 2021
@tsampazk tsampazk added this to the Release 0.2.0 milestone Dec 5, 2021
@tsampazk tsampazk self-assigned this Dec 5, 2021
@KelvinYang0320 KelvinYang0320 self-assigned this Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Refactoring existing code base
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants