locusrobotics / fuse

The fuse stack provides a general architecture for performing sensor fusion live on a robot. Some possible applications include state estimation, localization, mapping, and calibration.
Other
729 stars 123 forks source link

Support gcc12 and ceres 2.1.0 #341

Closed efernandez closed 7 months ago

efernandez commented 1 year ago

This MR has all the changes required to support gcc12 and Ceres 2.1.0.

$ g++ --version
g++ (GCC) 12.2.0

With Ceres 2.1.0 the ceres::LocalParameterization was marked as deprecated in favour of the new ceres::Manifold that implements the Plus and Minus methods; in Ceres 2.2.0 the ceres::LocalParameterization is already removed.

gcc12 spotted some issues:

I also added SYSTEM to 3rd party headers to ignore warnings from those libraries.

The Minus Jacobian implementation of ceres::Manifold only computes the jacobian wrt the 1st argument, which differs from the fuse_core::LocalParameterization implementation, that computes it wrt the 2nd argument, which seems to be wrong. For that reason, I fixed the following bugs:

efernandez commented 1 year ago

Not sure why tests are failing now. I run all tests with both configurations, and all tests passed in both cases. That is, gcc 11.3.0 with Ceres 2.0 and gcc 12.2.0 with Ceres 2.1.

If you share the output errors with me, I can have a look.

svwilliams commented 1 year ago

Looks like some transient issues we are having with our own build server. I don't think it is related to this MR at all.

jakemclaughlin6 commented 9 months ago

The general logic for the conditional compilation is as follows:

clalancette commented 8 months ago

It would be great to get this PR merged; the use of ceres::LocalParameterization is currently causing fuse_core to fail to build on Ubuntu 24.04 in ROS 2 Rolling: https://build.ros2.org/view/Rbin_uN64/job/Rbin_uN64__fuse_core__ubuntu_noble_amd64__binary/9/console

svwilliams commented 8 months ago

Yep, it's just not ready yet. I'm hoping to get some time next week to finish this up, and then port it over to ROS 2.

svwilliams commented 8 months ago

I've finished up the work on serializing the Manifolds. I didn't have permission to push to this fork/branch, so I created a new PR here for safe-keeping: #363

Once this is reviewed by my team, my intention is to merge this PR then rebase #363 on top of it. That should hopefully keep the contributions clear.

Let me know if you have any concerns on the changes that were made. And thanks for doing the vast majority of the work here. I'll be starting on a ROS 2 port of this work next week.

jakemclaughlin6 commented 7 months ago

That works for me. The changes look fine to me, lets wait for @efernandez to see if its good with him as well

svwilliams commented 7 months ago

Reviews for the final set of changes is here: #363 Merging this PR and rebasing #363