def METHOD_NAME(self, pose_msg: PoseWithCovarianceStamped):
    with self.ukf_lock:
        if self.robot_state.status not in [
            RobotState.STATUS_LOCALIZING,
            RobotState.STATUS_READY,
            RobotState.STATUS_WALKING,
        ]:
            return
        if self.odom_t_previous is None:
            self.odom_t_previous = Transformation(pose_with_covariance_stamped=pose_msg)
            self.odom_t_previous.orientation_euler = [self.odom_t_previous.orientation_euler[0], 0, 0]  # Needed to remove non yaw values
            return
        odom_t = Transformation(pose_with_covariance_stamped=pose_msg)
        odom_t.orientation_euler = [odom_t.orientation_euler[0], 0, 0]  # Needed to remove non yaw values
        diff_transformation: Transformation = scipy.linalg.inv(self.odom_t_previous) @ odom_t
        dt = odom_t.timestamp - self.odom_t_previous.timestamp
        dt_secs = dt.secs + dt.nsecs * 1e-9
        if dt_secs == 0:
            return
        if self.robot_state.status == RobotState.STATUS_LOCALIZING:
            self.ukf.Q = self.Q_localizing
            self.ukf.R = self.R_localizing
        elif self.robot_state.status == RobotState.STATUS_READY:
            self.ukf.Q = self.Q_ready
            self.ukf.R = self.R_ready
        else:
            self.ukf.Q = self.Q_walking
            self.ukf.R = self.R_walking
        self.predict(u=diff_transformation.pos_theta / dt_secs, dt=dt_secs)
        self.odom_t_previous = odom_t
        self.broadcast_tf_position(pose_msg.header.stamp)
        self.publish_amcl_pose(timestamp=pose_msg.header.stamp)
        return odom_t