We have this constraint +(x, -(y, x)) == y for the boxplus/minus operators. As far as the ceres implementation goes, should this be considered a numerical constraint?
For example, in 2D pose we may have yaw in the interval [-pi, pi). If we perform the operation above we can end up with the boxplus being ~pi (pi-tiny eps) when x=-pi. And sure, pi==-pi on the manifold, and so these are nearly equal in that sense. But numerically they are very different. Is ceres sensitive to this?
Using examples\slam\pose_graph_2d\angle_manifold.h
int main()
{
AngleManifold am;
double y = -M_PI;
double x = 52 * (M_PI / 180.);
double res, res2;
am.Minus(&y, &x, &res);
am.Plus(&x, &res, &res2);
std::cout << std::format("{} vs {}", y, res2);
return 0;
}
prints "-3.141592653589793 vs 3.1415926535897927"
Similar problems occur if you compute -(+(x, delta), x), where the answers may differ by pi.
I'm guessing it is okay since Ceres' parameter steps are on the Lie algebra of the manifold (if I understand it correctly), and the cost function should also work on that algebra, hence the round trip is never done. But I want to be sure I have this correct. In general I'll be working in quaternions, so I don't 'care' about this exact example, but numerically we do 'butt up against' the open subset limits which I think of as numerically failing the bijection requirement of homeomorphism.