ASE icon indicating copy to clipboard operation
ASE copied to clipboard

What is the meanning of function _get_pairwise_average_translation

Open yizhengzhang1 opened this issue 1 year ago • 0 comments

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!

yizhengzhang1 avatar Jun 03 '24 06:06 yizhengzhang1