[FIX BUG]: Weld constraint in multi-env #1386
Closed
LeonLiu4 wants to merge 13 commits intoGenesis-Embodied-AI:mainfrom
Closed
[FIX BUG]: Weld constraint in multi-env #1386LeonLiu4 wants to merge 13 commits intoGenesis-Embodied-AI:mainfrom
LeonLiu4 wants to merge 13 commits intoGenesis-Embodied-AI:mainfrom
Conversation
duburcqa
reviewed
Jul 10, 2025
| _, link2_idx, envs_idx = self._sanitize_1D_io_variables( | ||
| None, link2_idx, self.n_links, envs_idx, idx_name="links_idx", skip_allocation=True, unsafe=unsafe | ||
| ) | ||
|
|
Collaborator
There was a problem hiding this comment.
Do not cast from torch to numpy, this is irrelevant.
duburcqa
reviewed
Jul 10, 2025
|
|
||
| if envs_idx is not None and envs_idx.shape[0] > 1: | ||
| if link1_idx.shape[0] == 1: | ||
| link1_idx = np.repeat(link1_idx, envs_idx.shape[0]) |
Collaborator
There was a problem hiding this comment.
By the way, no need to check if it is a tensor. It has been sanitized as torch tensor already.
Collaborator
|
Why the sanitize helper was not able to catch this dimensionality issue ? This is basically the whole point of this method. |
Collaborator
|
Superseded by #1390 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If envs_idx contains multiple environments but link1_idx/link2_idx are length-1, we now np.repeat those indices so their length matches envs_idx. This prevents silent out-of-bounds reads that dropped welds in all but the first environment.
Addresses: #1383