I am using ROS kinetic with default libpcl (PCL 1.7) that came with the installation. I have already install rtabmap earlier (latest version). I, however, need PCL 1.8 for a new project and afraid that installing that from source would break my rtabmap installation. I do not want to reinstall everything from scratch. Is there a way I can avoid breaking rtabmap install. Should I rebuild the library after installing PCL 1.8. How about other libraries (g2o, GTSAM, openCV etc). Can I keep both PCL 1.7 and 1.8. If yes, can you describe how should I go about installing this to avoid any failures. Thanks
Do you need to use PCL 1.8 under ROS? If not, just not "install" PCL1.8, just build it. Then for your project using PCL1.8, set cmake -DPCL_DIR="path/to/pcl18/build" to the build directory of PCL 1.8 to find the correct PCLConfig.cmake.
If you need PCL 1.8 under ROS, then the best is to remove 1.7 and rebuild all binary packages depending on pcl from source (like pcl_conversions and pcl_ros). To make rtabmap rebuild correctly without rebuilding g2o and GTSAM, disable -march=native set by default in PCL 1.8: comment this line before building 1.8. When rebuilding rtabmap, you can cleanup its build directory to make sure cmake is correctly updating PCL paths to 1.8.