Creates a batch of transformation matrices Args: - R: Bx3x3 array of a batch of rotation matrices - t: Bx3x1 array of a batch of translation vectors Returns: - T: Bx4x4 Transformation matrix
(R: Tensor, t: Tensor)
| 320 | |
| 321 | |
| 322 | def transform_mat(R: Tensor, t: Tensor) -> Tensor: |
| 323 | ''' Creates a batch of transformation matrices |
| 324 | Args: |
| 325 | - R: Bx3x3 array of a batch of rotation matrices |
| 326 | - t: Bx3x1 array of a batch of translation vectors |
| 327 | Returns: |
| 328 | - T: Bx4x4 Transformation matrix |
| 329 | ''' |
| 330 | # No padding left or right, only add an extra row |
| 331 | return torch.cat([F.pad(R, [0, 0, 0, 1]), |
| 332 | F.pad(t, [0, 0, 0, 1], value=1)], |
| 333 | dim=2) |
| 334 | |
| 335 | |
| 336 | def batch_rigid_transform(rot_mats: Tensor, |
no outgoing calls
no test coverage detected