# Quaternion rotation

Hi guys, i'm having some problems with the rotation through quaternions. I have two quaternions coming one from a nav_msgs::odometry and the other one from a geometry_msgs::pose. I want to rotate the robot until the quaternion of the nav_msgs is equal, or almost equal, to the geometry_msgs one. How is it possible to solve my problem? Thanks in advance.