Skip to content

Instantly share code, notes, and snippets.

@robobe
Created May 31, 2019 11:40
Show Gist options
  • Save robobe/90d9f761b64ce5a47bede5e306f75c93 to your computer and use it in GitHub Desktop.
Save robobe/90d9f761b64ce5a47bede5e306f75c93 to your computer and use it in GitHub Desktop.
Gazebo cmake file , Camera sensor with opencv
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
project(cv_plugin)
find_package(gazebo REQUIRED)
include_directories(${GAZEBO_INCLUDE_DIRS})
link_directories(${GAZEBO_LIBRARY_DIRS})
list(APPEND CMAKE_CXX_FLAGS "${GAZEBO_CXX_FLAGS}")
set(PLUG_NAME cv_plugin)
find_package( OpenCV REQUIRED )
add_library(${PLUG_NAME} SHARED ${PLUG_NAME}.cpp)
target_link_libraries(${PLUG_NAME}
${GAZEBO_LIBRARIES}
CameraPlugin
${OpenCV_LIBS})
install (TARGETS ${PLUG_NAME} DESTINATION /home/user/projects/gazebo_tutorial/plugins/bin)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment