Computes the absolute rotation of a joint from the kinematic chain.
(kin_chain, root_pose, body_pose)
| 210 | |
| 211 | |
| 212 | def find_joint_global_rotation(kin_chain, root_pose, body_pose): |
| 213 | """Computes the absolute rotation of a joint from the kinematic chain.""" |
| 214 | # Create a single vector with all the poses |
| 215 | parents_pose = torch.cat([root_pose, body_pose], dim=1)[:, kin_chain] |
| 216 | output_pose = parents_pose[:, 0] |
| 217 | for idx in range(1, parents_pose.shape[1]): |
| 218 | output_pose = torch.bmm(parents_pose[:, idx], output_pose) |
| 219 | return output_pose |
| 220 | |
| 221 | |
| 222 | class CropSampler(): |
no outgoing calls
no test coverage detected