NeBula-Autonomy/LAMP

Build Issues on ubuntu 20.04

Closed this issue · 5 comments

Hello, thank you for this library.

I'm on ubuntu 20.04 with ROS noetic, and I've been experiencing build issues with this project. I made a new clean catkin workspace just for this library. I've been encountering issues from the catkin build lamp command

Here are the issues I encountered in order and what I did to attempt to fix, and where I am stuck right now:

/home/glenn/catkin_lamp/src/localizer_lamp/lamp_utils/src/PoseGraphBookkeeping.cc:493:19: error: no matching function for call to ‘dynamic_pointer_cast<gtsam::BetweenFactor<gtsam::Pose3> >(const std::shared_ptr<gtsam::NonlinearFactor>&)’
 493 |         	factor)) {
  • I added #include <gtsam/slam/PriorFactor.h> at the top of PoseGraphBookkeeping.cc
/home/glenn/catkin_lamp/src/localizer_lamp/lamp_utils/src/PoseGraphBookkeeping.cc:594:6: error: no ‘operator++(int)’ declared for postfix ‘++’ [-fpermissive]
  594 | 	v++;
  • I changed the command to ++v;
/home/glenn/catkin_lamp/devel/include/gtsam/base/Vector.h:75:52: error: static assertion failed: Error: GTSAM was built against a different version of Eigen
   75 | 	GTSAM_EIGEN_VERSION_WORLD==EIGEN_WORLD_VERSION &&
  • rebuilt the entire project with the argument -DGTSAM_USE_SYSTEM_EIGEN=ON. Note, I have Eigen 3.3.7 in my default directory, and I don't know if this step would cause any further issues.
/home/glenn/catkin_lamp/src/localizer_lamp/lamp_utils/include/lamp_utils/gicp.h:167:7: error: expected identifier before string constant
  167 |   	"[pcl::registration::MultithreadedGeneralizedIterativeClosestPoint::"

/home/glenn/catkin_lamp/src/localizer_lamp/lamp_utils/include/lamp_utils/CommonFunctions.h:99:69: error: no matching function for call to ‘dynamic_pointer_cast<gtsam::noiseModel::Gaussian>(const SharedNoiseModel&)’

  • Here is where I'm stuck. I put the line #include <gtsam/linear/NoiseModel.h> at the top of CommonFunctions.h but it still didn't fix the issue. From gtsam's NoiseModel.h, the Gaussian noise model is defined, but maybe I'm assuming this is the incorrect way of calling the constructor?

Thanks,

Have you solved the problem?

yunzc commented

Might be due to incompatibility with GTSAM develop. I will find some time to look into that in more detail, but for now I would just use version 4.2a9.

https://github.com/NeBula-Autonomy/LAMP/pull/18/files here's a quick PR I put together to get LAMP to compile on 20.04, feel free to give it a try. This builds on 20.04 and Noetic for me, but I have not test it further yet.

Thank you.

Hello @yunzc, your solution helped to successfully build it.

As I'm running a simple example, I can visualize anything due to no TF data:
Screenshot from 2023-10-31 17-08-34

I think it's a python issue right now as I installed with 2 but it's still running with 3. I'll try to fix this tomorrow and close this issue if I resolve it.

Thanks,

I tried rebuilding with a Python 2.7 virtual environment but it still tries to run on Python3, as I think noetic only supports Python3. I'll try building on docker and I'll close this issue as it pertains to 20.04.