You could more simply get the transformation from sensor to object via something along the lines of:
```
from morse.helpers.transformations import Transformation3d
...
if self.relative:
    # get the transformation from sensor to object
    transformation = self.position_3d.transformation3d_with(Transformation3d(obj))
else:
    transformation = Transformation3d(obj)
translation = transformation.translation
quaternion = transformation.rotation
```