Fix recording for PourWater#292
Open
yangchen73 wants to merge 2 commits into
Open
Conversation
yuecideng
requested changes
Jun 4, 2026
| left_arm_chain = create_pk_serial_chain( | ||
| chain=chain, end_link_name="left_ee", root_link_name="left_arm_base" | ||
| ).to(device=device) | ||
| urdf_path=urdf_path, |
Collaborator
Author
There was a problem hiding this comment.
Previously, the code moved the full chain to cuda first, then created a SerialChain from it. However, pytorch_kinematics creates some cuda tensors internally during SerialChain construction, which can mix cpu and cuda tensors and cause a device mismatch error.
Now I build the SerialChain on cpu first, then move the whole SerialChain to the target device. This avoids mixed device tensors.
| root_link_name=root_link_name, | ||
| ).to(device=device) | ||
| else: | ||
| chain_for_serial = deepcopy(chain).to(device=torch.device("cpu")) |
Collaborator
Author
There was a problem hiding this comment.
Same as above reply.
yuecideng
approved these changes
Jun 5, 2026
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.
Description
This PR simplify PourWater expert trajectory recording and fixes CUDA execution issues in the action generation path.
Type of change
Screen
episode_0_cam1.mp4
shots
Checklist
black .command to format the code base.