21 if (linear_tolerance < 0)
return false;
22 if (angular_tolerance < 0)
return false;
26 if (this->map_id != other_loc.map_id)
30 if (sqrt(pow((this->x - other_loc.x), 2) + pow((this->y - other_loc.y), 2)) > linear_tolerance)
35 if (angular_tolerance != std::numeric_limits<double>::infinity())
44 double diff = other_loc.theta - this->theta + 180.0;
45 diff = fmod(diff, 360.0) - 180.0;
46 diff = (diff < -180.0) ? (diff + 360.0) : (diff);
47 if (fabs(diff) > angular_tolerance)
50 double angle1 = normalize_angle(this->theta);
51 double angle2 = normalize_angle(other_loc.theta);
52 double diff = angle1 - angle2;
53 diff += (diff > 180) ? -360 : (diff < -180) ? 360 : 0;
54 if (fabs(diff) > angular_tolerance)