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

What is the meanning of function _get_pairwise_average_translation #80

Open
Privilger opened this issue Jun 3, 2024 · 0 comments
Open

Comments

@Privilger
Copy link

Hi,

In the retarget_motion process, there is a function called "_get_pairwise_average_translation".

The comment said:
re-compute the local rotation to match the original joint position as much as possible。

Can someone explain the math behind this? I don't quite understand it.

 def _get_pairwise_average_translation(self):
    global_transform_inv = transform_inverse(self.global_transformation)
    p1 = global_transform_inv.unsqueeze(-2)
    p2 = self.global_transformation.unsqueeze(-3)

    pairwise_translation = (
        transform_translation(transform_mul(p1, p2))
        .reshape(-1, len(self.skeleton_tree), len(self.skeleton_tree), 3)
        .mean(axis=0)
    )
    return pairwise_translation

Thanks!

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