Ask Your Question
0

Problem integrating ros with opencv to work with rgb camera output in ros.

asked 2017-07-30 15:22:39 -0600

the_notorious_kid gravatar image

updated 2017-07-31 17:28:25 -0600

I am trying to integrate the normal rgb camera output (OpenCV) with ros using cv_bridge and image_transport. When I compile(catkin_make) the code I receive the following error -

 /usr/bin/ld: cannot find -lopencv_calib3d/opt/ros/indigo/lib/libcv_bridge.so.

Any help would be appreciated. The project is for my university assignment and is slightly urgent. Below is also the cmakelists.txt file that I am using .

cmake_minimum_required(VERSION 2.8.3)
project(image_pro)

find_package(catkin REQUIRED COMPONENTS
  actionlib_msgs
  cv_bridge
  geometry_msgs
  image_transport
  move_base_msgs
  nav_msgs
  roscpp
  rospy
  sensor_msgs
  std_msgs
  pluginlib
  cmake_modules
)

find_package(OpenCV REQUIRED)
find_package(OpenCV 2 REQUIRED)
find_package(Boost REQUIRED system filesystem date_time thread)
find_package(Eigen REQUIRED)

catkin_package(
#  INCLUDE_DIRS include
#  LIBRARIES image_pro
  CATKIN_DEPENDS actionlib_msgs cv_bridge geometry_msgs image_transport move_base_msgs nav_msgs roscpp rospy sensor_msgs std_msgs
  DEPENDS opencv eigen
)

include_directories(include)
include_directories(
  ${catkin_INCLUDE_DIRS}
  ${OpenCV_INCLUDE_DIRS}
)
include_directories(SYSTEM ${Boost_INCLUDE_DIR} ${EIGEN_INCLUDE_DIRS})
#include_directories(include)
## Declare a C++ library
# add_library(${PROJECT_NAME}
#   src/${PROJECT_NAME}/image_pro.cpp
# )

add_executable(get_image_node src/get_image.cpp)
#add_executable(image_pro src/obj_detect.cpp)
target_link_libraries(get_image_node ${OpenCV_LIBS}${catkin_LIBRARIES})
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-07-30 19:22:33 -0600

lucasw gravatar image

You're missing a space:

${OpenCV_LIBS}${catkin_LIBRARIES}

->

${OpenCV_LIBS} ${catkin_LIBRARIES}
edit flag offensive delete link more

Comments

Thanks Lucas it worked. It was a rookie mistake.

the_notorious_kid gravatar imagethe_notorious_kid ( 2017-07-31 17:27:59 -0600 )edit

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2017-07-30 15:22:39 -0600

Seen: 127 times

Last updated: Jul 31 '17