def test_loads(self): transform = Transform3D.loads(_DATA_TRANSFORM) assert transform.translation == Vector3D(1.0, 2.0, 3.0) assert transform.rotation == quaternion(1.0, 0.0, 0.0, 0.0)
def _loads(self, contents: Dict[str, Any]) -> None: super()._loads(contents) extrinsics = contents.get("extrinsics") if extrinsics: self.extrinsics = Transform3D.loads(contents["extrinsics"])