Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

Incorrect Object Orientation in GRAB Environment Reconstruction in MuJoCo #23

Open
binbinbai opened this issue Nov 16, 2024 · 0 comments

Comments

@binbinbai
Copy link

Hi,thanks for this great job.
I am reconstructing the GRAB environment in MuJoCo, ensuring that the world coordinate system aligns with that of GRAB. My understanding is that the global_orient parameter represents the axis-angle rotation of the object’s local coordinate system relative to the world coordinate system. Therefore, by aligning the MuJoCo world coordinate system with GRAB, I assumed I could directly use global_orient to set the object's orientation.
However, this approach often results in incorrect orientations. For example, as shown in the attached figure with the "elephant" object, directly applying the provided global_orient does not align the object with its true pose in GRAB.
image
image

To investigate, I examined the visualize_grab.py script provided in GRAB. The code responsible for transforming the object vertices from the local coordinate system to the world coordinate system is:
vertices = torch.matmul(v_template, rot_mats) + transl.unsqueeze(dim=1)
This corresponds to the transformation formula:
image
However, I think the correct transformation should be:
image
To verify, I negated the axis-angle rotation provided in global_orient and observed that the resulting object orientation matched the true GRAB pose, as shown in the next figure. This suggests that the global_orient should either be inverted (negated axis-angle) or its corresponding rotation matrix should be transposed for the transformation to be accurate.
image

Is my understanding correct that global_orient provided by GRAB needs to be negated or its rotation matrix transposed to achieve the correct object orientation in MuJoCo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant