ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

catkin_make fails weirdly after trying to create a new package

asked 2014-08-11 07:49:04 -0500

mister_kay gravatar image

updated 2014-08-11 07:49:42 -0500

Hello,

I am trying to build a new package in a catkin_workspace. After trying to build this package everything seems to be malfunctioning. E.g. if i delete the package under construction and only leave one surely working package in my catkin_ws (e.g. image_view, viso2_ros) i still get the following errors when doing catkin_make.

.......

  CMake Error at /opt/ros/hydro/share/catkin/cmake/catkinConfig.cmake:75 (find_package):
  Could not find a configuration file for package cv_bridge.

  Set cv_bridge_DIR to the directory containing a CMake configuration file
  for cv_bridge.  The file will have one of the following names:

    cv_bridgeConfig.cmake
    cv_bridge-config.cmake

Call Stack (most recent call first):
  viso2-hydro/viso2_ros/CMakeLists.txt:4 (find_package)


CMake Error at /opt/ros/hydro/share/catkin/cmake/catkinConfig.cmake:75 (find_package):
  Could not find a configuration file for package image_geometry.

  Set image_geometry_DIR to the directory containing a CMake configuration
  file for image_geometry.  The file will have one of the following names:

    image_geometryConfig.cmake
    image_geometry-config.cmake

Call Stack (most recent call first):
  viso2-hydro/viso2_ros/CMakeLists.txt:4 (find_package)


-- checking for module 'openni-dev'
--   package 'openni-dev' not found
-- checking for module 'openni-dev'
--   package 'openni-dev' not found
-- checking for module 'openni-dev'
--   package 'openni-dev' not found
-- looking for PCL_COMMON

........

What the f** has happened. Did my package under construction destroy anything? Sidenote: I am a beginner to ROS!

Also here is my original CMakeLists.txt for my new package "stereo_setup":

 cmake_minimum_required(VERSION 2.8.3)
project(stereo_setup)
find_package(catkin REQUIRED)
catkin_package(
   INCLUDE_DIRS include)

# set include directories for headers and libraries
include_directories($(stereo_setup_INCLUDE_DIRS), include, lib)

FIND_LIBRARY(FLYCAP_SDK NAMES libflycapture.so library
  PATHS /lib)

# set the executable for executing ROS cmds
add_executable(stereo_setup_exe src/stereo_setup.cpp)

#set the properties 
SET_TARGET_PROPERTIES(stereo_setup_exe PROPERTIES OUTPUT_NAME stereo_setup)


# add the sourcecode as a "library"
#add_library(stereo_setup src/stereo_setup.cpp)

# target; link against 
target_link_libraries(stereo_setup ${FLYCAP_SDK})

target_link_libraries(stereo_setup ${catkin_LIBRARIES})
edit retag flag offensive close merge delete

Comments

Which version of ROS are you using? Do you install it correctly? I use "sudo apt-get install ros-groovy-desktop-full" to install my ROS groovy and I can "roscd" those two packages you mention. Maybe you should add them into package.xml, or maybe you should source setup.bash.

Winston gravatar image Winston  ( 2014-08-11 15:27:51 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2014-08-11 08:30:54 -0500

Ugo gravatar image

You probably need to install image_geometry package:

sudo apt-get install ros-indigo-image-geometry

(replace indigo with the ros version you're using).

Concerning the fact that catkin_make still fails after deleting your package, try removing workspace/devel and workspace/build if you want to build from a clean environment.

Hope this helps.

edit flag offensive delete link more

Comments

Hi, I use ROS Indigo too and I have the same problem, but image-geometry is installed in my computer. It appears only when I want to declare the node as a CPP library (not if executable). Any idea?

est_CEAR gravatar image est_CEAR  ( 2016-02-22 02:27:11 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-08-11 07:49:04 -0500

Seen: 5,169 times

Last updated: Aug 11 '14