From: Mark M. <mm...@ri...> - 2019-10-16 21:07:35
|
Hi Max, You need to make sure to set up your include path right. If /opt/ros/kinetic/include comes before /usr/local/include, then the header files of the old version of OMPL will be found during the compilation of your code. Best, Mark > On Oct 16, 2019, at 11:13 AM, Max Baeten <m.j...@gm...> wrote: > > Hi OMPL wizards, > > Im having trouble linking against the correct ompl version on my ubuntu system where I have ROS kinetic installed. I have two versions installed one installed via ROS and one compiled from source: > > /opt/ros/kinetic/lib/x86_64-linux-gnu/libompl.so.1.2.1 > /usr/local/lib/libompl.so.1.4.2 > > In CMakeList.txt in my own ros package, I can use the following lines to select either version of OMPL such that I can link my code against the new from source installed 1.4.2 version. > > find_package(ompl 1.4.2 REQUIRED) > message("OMPL_VERSIOOMPL version: 1.2.1 > N: ${OMPL_VERSION}") > > This works, Cmake prints the correct 1.4.2 version. Also when I leave the version number out then it prints 1.2.1 (ROS version) and when i put 1.4.3 it gives an error that it cant't find that version. > > So the linking to the correct library seems to work. However when I run my code that includes the following: > > std::cout << "OMPL version: " << OMPL_VERSION << std::endl; > > Then it prints out: > OMPL version: 1.2.1 > > Either i am still linking to the wrong ompl lib or the printing of the ompl version is incorrect? Any ideas? > > Kind regards, > > Max > > _______________________________________________ > ompl-users mailing list > omp...@li... > https://lists.sourceforge.net/lists/listinfo/ompl-users |