# type(pose) = geometry_msgs.msg.Pose # convert from euler to quaternion quaternion = tf.transformations.quaternion_from_euler(roll, pitch, yaw) pose.orientation.x = quaternion[0] pose.orientation.y = quaternion[1] pose.orientation.z = quaternion[2] pose.orientation.w = quaternion[3] # type(pose) = geometry_msgs.msg.Pose # convert from quaternion to euler quaternion = ( pose.orientation.x, pose.orientation.y, pose.orientation.z, pose.orientation.w) euler = tf.transformations.euler_from_quaternion(quaternion) roll = euler[0] pitch = euler[1] yaw = euler[2]