Skip to content

[Bug Report] MARL Quadcopter Reset function problem #1625

Answered by JulienHansen
JulienHansen asked this question in Q&A
Discussion options

You must be logged in to vote

I just found the error , the reset function was not correct and was causing Nan value to be generated, here is a corrected snippet of the corrected version :

    def _reset_idx(self, env_ids: Sequence[int] | torch.Tensor | None):
        print("Reset start")
        if env_ids is None:
            env_ids = self._robot1._ALL_INDICES

        if len(env_ids) == self.num_envs:
            self.episode_length_buf = torch.randint_like(self.episode_length_buf, high=int(self.max_episode_length))

        # Reset robots
        self._robot1.reset(env_ids)
        self._robot2.reset(env_ids)
        self._robot3.reset(env_ids)
        self._robot4.reset(env_ids)
        self._robot5.reset(env_ids)…

Replies: 3 comments 11 replies

Comment options

You must be logged in to vote
3 replies
@JulienHansen
Comment options

@JulienHansen
Comment options

@Rishi-V
Comment options

Comment options

You must be logged in to vote
3 replies
@JulienHansen
Comment options

@Rishi-V
Comment options

@JulienHansen
Comment options

Comment options

You must be logged in to vote
5 replies
@JulienHansen
Comment options

@RandomOakForest
Comment options

@JulienHansen
Comment options

@JulienHansen
Comment options

Answer selected by JulienHansen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested reinforcement learning
3 participants
Converted from issue

This discussion was converted from issue #1594 on January 04, 2025 00:30.