From: Max B. <m.j...@gm...> - 2019-10-17 09:57:04
|
Hi Mark, Thanks for your quick response. With the following lines I changed the include path: include_directories( /usr/local/include ${catkin_INCLUDE_DIRS} ) message("---------------------") get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) foreach(dir ${dirs}) message(STATUS "dir='${dir}'") endforeach() message("---------------------") However although this prints the desired order of include paths: --------------------- -- dir='/usr/local/include/ompl' -- dir='/opt/ros/kinetic/include' -- dir='/opt/ros/kinetic/share/xmlrpcpp/cmake/../../../include/xmlrpcpp' -- dir='/usr/include' -- dir='/usr/include/eigen3' --------------------- When I run my code it still prints OMPL_VERSION = 1.2.1? Regards Max Op wo 16 okt. 2019 om 23:07 schreef Mark Moll <mm...@ri...>: > 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 > > > |