Skip to content

USD -> SDF transform fixes#924

Merged
ahcorde merged 3 commits intoahcorde/usd_to_sdf_transformsfrom
adlarkin/handle_xyz_zyx
Mar 31, 2022
Merged

USD -> SDF transform fixes#924
ahcorde merged 3 commits intoahcorde/usd_to_sdf_transformsfrom
adlarkin/handle_xyz_zyx

Conversation

@adlarkin
Copy link
Copy Markdown
Contributor

🦟 Bug fix

Summary

Here are some proposals I have after reviewing #871:

  1. Make sure to swap the X and Z rotation angles if the rotation is defined as RotationZYX instead of RotationXYZ
  2. Store all of the rotations in a single quaternion instead of a list of quaternions, since the angles of rotation are all along a unique axis (x, y, or z).

The following changes simplify the API for the UsdTransforms class. Now, we no longer need methods for determining whether a rotation exists and if its XYZ/ZYX.

I have also added a test case that uses the new nested_transforms_ZYX prim defined in test/usd/nested_transforms.usda. Without swapping the X and Z rotation angles for this prim, the test fails.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Signed-off-by: Ashton Larkin <42042756+adlarkin@users.noreply.github.com>
Signed-off-by: Ashton Larkin <42042756+adlarkin@users.noreply.github.com>
@adlarkin adlarkin requested a review from ahcorde March 30, 2022 22:13
@adlarkin adlarkin requested review from azeey and scpeters as code owners March 30, 2022 22:13
@adlarkin adlarkin mentioned this pull request Mar 30, 2022
8 tasks
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 30, 2022

Codecov Report

Merging #924 (412ee5b) into ahcorde/usd_to_sdf_transforms (68b26c9) will decrease coverage by 0.00%.
The diff coverage is 81.81%.

@@                        Coverage Diff                        @@
##           ahcorde/usd_to_sdf_transforms     #924      +/-   ##
=================================================================
- Coverage                          87.72%   87.72%   -0.01%     
=================================================================
  Files                                102      102              
  Lines                              14939    14906      -33     
=================================================================
- Hits                               13105    13076      -29     
+ Misses                              1834     1830       -4     
Impacted Files Coverage Δ
usd/src/usd_parser/USDTransforms.cc 64.66% <81.81%> (-4.19%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 68b26c9...412ee5b. Read the comment docs.

Copy link
Copy Markdown
Collaborator

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is breaking some transformations, the gripper is in the wrong rotation

Selection_061

Copy link
Copy Markdown
Collaborator

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the order in the multiplication of the rotations is important, we can'nt create just a rotation.

I suggest you to add a TODO in the other PR and try to improve this code when everything is merge and it's easy to test.

Signed-off-by: ahcorde <ahcorde@gmail.com>
@ahcorde ahcorde merged commit cf28342 into ahcorde/usd_to_sdf_transforms Mar 31, 2022
@ahcorde ahcorde deleted the adlarkin/handle_xyz_zyx branch March 31, 2022 10:56
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

Successfully merging this pull request may close these issues.

5 participants