Ask Your Question

How to set CMake with Orocos-bfl in Ubuntu 18.04 - ROS Melodic

asked 2019-06-05 10:22:45 -0600

RayROS gravatar image

updated 2019-06-05 11:14:47 -0600

gvdhoorn gravatar image

Hello, I am building a project that required the use of Orocos-bfl. I read official documentation where it explains how to incluse Orocos-bfl into a CMake project. However without success. I also read this other source where it explains that it is not possible to build my own package against BFL. So despite trying different options I cannot make my CMake compile the project with Orocos-bfl inside my catkin_ws. See below the project tree structure I have so far and that I am trying to compile:

         -- project A
         -- project B
         --pf_localization (this is the project that should use `orocos-bfl`)
                  --pf_node.cpp (which is my executable file)

I think that CMake is not accepting how I am setting the orocos-bfl and I am attaching below the CMake file I am trying to compile:

cmake_minimum_required(VERSION 2.8.3)

## Compile as C++11, supported in ROS Kinetic and newer

find_package(rosbag REQUIRED)
find_package(catkin REQUIRED COMPONENTS

pkg_check_modules(BFL REQUIRED orocos-bfl)
message("BFL include dirs:" ${BFL_INCLUDE_DIRS})
message("BFL library dirs:" ${BFL_LIBRARY_DIRS})

## Build ##

# include



add_executable(pf_node src/pf_node.cpp ${INCLUDES})
target_link_libraries(pf_node ${BFL_LIBRARIES})

Also, just to cross off a possible doubts, I added <build_depend>bfl</build_depend> on my package.xml file

The Error of the compiler is below:

CMake Error at /usr/local/share/cmake-3.13/Modules/FindPkgConfig.cmake:452 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/local/share/cmake-3.13/Modules/FindPkgConfig.cmake:622 (_pkg_check_modules_internal)
  pf_localization/ros_float/CMakeLists.txt:19 (pkg_check_modules)

Thank you for pointing in the right direction with this issue.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-06-18 05:39:55 -0600

RayROS gravatar image

I found out the solution to my question for anyone that has/could have the same problem and wanted to share it. After installing orocos-bfl from source for some reason that I still can't explain myself the CMake would not run and incur in continuous mistakes.

The solution was: sudo synaptics search for orocos-bfl and install it from there.

After restarting and updating no problems. So the CMake file I provided above is actually correct, but the installation had to be done from command line. I hope this was useful if anyone incur in the same problem.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2019-06-05 10:22:45 -0600

Seen: 265 times

Last updated: Jun 18 '19