Ask Your Question
1

Could not find a package configuration file provided by "libcaer-dev" with any of the following names:

asked 2021-11-29 21:17:27 -0500

luna wu gravatar image

updated 2021-11-30 07:23:31 -0500

When I run the code :catkin build davis_ros_driver, I got the problem

Errors << davis_ros_driver:cmake /home/wjh/catkin_ws/logs/davis_ros_driver/build.cmake.010.log
CMake Error at /home/wjh/catkin_ws/src/rpg_dvs_ros/davis_ros_driver/CMakeLists.txt:5 (find_package):
By not providing "Findlibcaer.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"libcaer", but CMake did not find one.



Could not find a package configuration file provided by "libcaer" with
    any of the following names:
    libcaer-Config.cmake
    libcaer-config.cmake



Add the installation prefix of "libcaer" to CMAKE_PREFIX_PATH or set
"libcaer_DIR" to a directory containing one of the above files. If
"libcaer" provides a separate development package or SDK, be sure it
has been installed.

I use melodic

What's more, I have installed "libcaer" successfully by the code "sudo apt-get install libcae-devemphasized text", so I don't understand why this error occurred, and how to solve the problem?

Hope you guys can help me.

best wishes, xiaowu

edit retag flag offensive close merge delete

Comments

Hi @luna wu

Have you installed dependencies as per repo instructions?:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo add-apt-repository ppa:inivation-ppa/inivation-bionic
sudo apt-get update
sudo apt-get install dv-gui
osilva gravatar image osilva  ( 2021-11-30 06:22:52 -0500 )edit

Yes, I have installed the codes you listed. But there was still the same error.

I really want to know why it has been installed successfully, but it still shows no ``libcaer''. How should I solve this problem?

Thanks.

luna wu gravatar image luna wu  ( 2021-11-30 07:23:48 -0500 )edit

Can you pls share CMakelists.txt?

osilva gravatar image osilva  ( 2021-11-30 07:32:58 -0500 )edit

Here is the CMakelist.txt

cmake_minimum_required(VERSION 2.8.3)
project(davis_ros_driver)

find_package(catkin_simple REQUIRED)
find_package(libcaer REQUIRED)

catkin_simple()

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3")

find_package(Boost REQUIRED COMPONENTS system thread)

# make the executable
cs_add_executable(davis_ros_driver
  src/driver_node.cpp
  src/driver.cpp
)

# make the nodelet into a library
cs_add_library(davis_ros_driver_nodelet
  src/driver_nodelet.cpp
  src/driver.cpp
)

# link the executable to the necesarry libs
target_link_libraries(davis_ros_driver
  ${catkin_LIBRARIES}
  ${Boost_LIBRARIES}
  libcaer::caer
)

# link the executable to the necesarry libs
target_link_libraries(davis_ros_driver_nodelet
  ${catkin_LIBRARIES}
  ${Boost_LIBRARIES}
  libcaer::caer
)

# Install the nodelet library
cs_install()

# Install other support files for installation
install(FILES davis_ros_driver_nodelet.xml
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)

# Expo
luna wu gravatar image luna wu  ( 2021-11-30 07:35:27 -0500 )edit

Searching for the error message, this is what I found: https://github.com/uzh-rpg/rpg_dvs_ro...

If you look at the instructions, catkin_simple is used not catkin buildhttps://github.com/uzh-rpg/rpg_dvs_ros

Clone the catkin_simple package (https://github.com/catkin/catkin_simple), which will be used to build the DVS/DAVIS driver packages:

$ cd ~/catkin_ws/src
$ git clone https://github.com/catkin/catkin_simple.git

Clone this repository:

$ cd ~/catkin_ws/src
$ git clone https://github.com/uzh-rpg/rpg_dvs_ros.git
Build the packages:
$ catkin build dvs_ros_driver (if you are using the DVS128)
$ catkin build davis_ros_driver (if you are using the DAVIS)
$ catkin build dvxplorer_ros_driver (if you are using the DVXplorer)

What installation instructions are you following?

osilva gravatar image osilva  ( 2021-11-30 10:26:55 -0500 )edit

Thanks again

I used https://github.com/uzh-rpg/rpg_dvs_ros, and followed the above steps exactly (I have replaced kinetic with melodic)

I have run it many times, but there was still the same error.

luna wu gravatar image luna wu  ( 2021-11-30 20:28:25 -0500 )edit

I was able to reproduce the same error. I will work on it, to see how. I couldn't install libcaer from apt though.

osilva gravatar image osilva  ( 2021-11-30 21:11:26 -0500 )edit

It's a pity。I have posted an issue at https://github.com/uzh-rpg/rpg_dvs_ro... but no one has responded yet。

luna wu gravatar image luna wu  ( 2021-11-30 21:36:19 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2021-12-01 19:16:55 -0500

luna wu gravatar image

updated 2021-12-01 19:21:36 -0500

I have solved this problem!

According to the error message:

Add the installation prefix of "libcaer" to CMAKE_PREFIX_PATH or set
  "libcaer_DIR" to a directory containing one of the above files.  If
  "libcaer" provides a separate development package or SDK, be sure it has
  been installed.

I added this command to the CMakeLists.txt file:

set(libcaer_DIR "/usr/lib/x86_64-linux-gnu/cmake/libcaer/")
find_package(libcaer REQUIRED)

(The first line is the address of my llibcaerConfig.cmake file)

Note : you have to follow this order: first :set(...),
then:find_package(...)

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

3 followers

Stats

Asked: 2021-11-29 21:17:27 -0500

Seen: 239 times

Last updated: Dec 01 '21