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

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

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

the_notorious_kid gravatar image

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

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 -0500

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 image the_notorious_kid  ( 2017-07-31 17:27:59 -0500 )edit

Question Tools

Stats

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

Seen: 183 times

Last updated: Jul 31 '17