CMake error :Could not find a package configuration file provided by "gazebo"

Kindly update the notebook . There are so many mistakes and steps forgot to mention in it, it’s wasting our time and becoming difficult to learn consistently . The stuffs there in Mastering Gazebo is already free but if you guys can’t explain clearly what realy is happening in the CMakelist.txt file and other stuffs ,then what’s the point in charging for the course ?

Hello @nayakluckykant01 ,

Could you please provide some more data on the error? In what exercise/unit is it happening? Thanks for the feedback.

Unit 5: Write Gazebo Plugins

Hello @nayakluckykant01 ,

Please substitute your CMakeLists.txt with the following:

cmake_minimum_required(VERSION 3.0.2)
project(writing_plugins)

find_package(gazebo REQUIRED)

find_package(catkin REQUIRED COMPONENTS
  gazebo_plugins
  gazebo_ros
  roscpp
)

catkin_package()

include_directories(
# include
  ${catkin_INCLUDE_DIRS}
)

include_directories(${GAZEBO_INCLUDE_DIRS})
link_directories(${GAZEBO_LIBRARY_DIRS})
list(APPEND CMAKE_CXX_FLAGS "${GAZEBO_CXX_FLAGS}")

add_library(my_gazebo_plugin SHARED src/my_gazebo_plugin.cc)
target_link_libraries(my_gazebo_plugin ${GAZEBO_LIBRARIES})

This should solve the issue. I’ve already updated the notebook to fix this (and also a couple of other errors spotted in the unit). Sorry for the inconvenience and please let us know if you get other errors.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.