How do I get the displacement vector from one object to another?
I have two objects A and B, each in the form of geometry_msgs/PoseStamped. I would like to calculate the displacement (translation & rotation) vector that I can apply to any (similar) object A' and arrive to a (similar) object B' (respectively).
I guess the vector should also be of the form PoseStamped.
For translation, can I simply take B.PoseStamped.position.x - A.PoseStamped.position.x (similar for y,z)?
For the quaternion, I am not sure if I can simply do division (since adding angles in quaternions is done by multiplication?) i.e. B.PoseStamped.quaternion.x/A.PoseStamped.quaternion.x ?
I would like to avoid having to transform the quaternion to euler and back.