Build error with GTSAM 4.3a0 + gtsam_points v1.1.0: shared_ptr type mismatch in Jetson Orin
Hi, thank you for the great work on GLIM!
I'm trying to build GLIM from source on Jetson Orin (Ubuntu 22.04 + CUDA 12.5), following the [installation instructions](https://github.com/koide3/glim#install-from-source). I made sure to use:
-
GTSAM 4.3a0 (
git describe --tags→4.3a0) -
gtsam_points v1.1.0 (
git describe --tags→v1.1.0-28-g814bd1e)
However, the build fails with the following error:
/home/nano/ws/src/glim/src/glim/odometry/odometry_estimation_imu.cpp:316:43: error: cannot convert ‘gtsam::ImuFactor::shared_ptr’ {aka ‘std::shared_ptr<gtsam::ImuFactor>’} to ‘const boost::shared_ptr<gtsam::ImuFactor>&’
316 | new_factors.add(create_factors(current, imu_factor, new_values));
| ^~~~~~~~~~
| |
| gtsam::ImuFactor::shared_ptr {aka std::shared_ptr<gtsam::ImuFactor>}
From the function signature:
virtual gtsam::NonlinearFactorGraph create_factors(
const int current,
const boost::shared_ptr<gtsam::ImuFactor>& imu_factor,
gtsam::Values& new_values) = 0;
…it seems the code still expects boost::shared_ptr, but GTSAM 4.3a0 uses std::shared_ptr by default.
Could you confirm:
- Should GLIM now be fully compatible with GTSAM using
std::shared_ptr? - If yes, are there pending updates to GLIM that switch from
boost::shared_ptrtostd::shared_ptrin its interfaces? - If not, should I downgrade to an older version of GTSAM that still uses Boost?
Let me know if I can help test anything. Thanks again!
- We recently adopted the recent version of GTSAM 4.3a0 that introduced some API changes including switching from
std::shared_ptrtoboost::shared_ptr. gtsam_points v.1.2.0 in the latest main branch is fully compatible GTSAM 4.3a0. - GLIM has also been updated accordingly. It is now compatible with GTSAM 4.3a0.
Note if you want to downgrade to the previous GTSAM 4.2a9, please checkout v1.1.0 tags of gtsam_points and GLIM.
Hello @koide3 .
There is not a v.1.2.0 tag in gtsam_points repo:
Do you mean just taking the last commit of master branch? Or some specific commit you'd suggest?