Service custom service

Hello,
I created my own custom service but when i compiling it using catkin_make. I am getting following error.

add_subdirectory(custom_service)
CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
Could not find a package configuration file provided by “ropsy” with any of
the following names:

ropsyConfig.cmake
ropsy-config.cmake

Add the installation prefix of “ropsy” to CMAKE_PREFIX_PATH or set
“ropsy_DIR” to a directory containing one of the above files. If “ropsy”
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
custom_service/CMakeLists.txt:10 (find_package)

– Could not find the required component ‘ropsy’. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by “ropsy” with any of
the following names:

ropsyConfig.cmake
ropsy-config.cmake

Add the installation prefix of “ropsy” to CMAKE_PREFIX_PATH or set
“ropsy_DIR” to a directory containing one of the above files. If “ropsy”
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
custom_service/CMakeLists.txt:10 (find_package)

– Configuring incomplete, errors occurred!
See also “/home/user/catkin_ws/build/CMakeFiles/CMakeOutput.log”.
See also “/home/user/catkin_ws/build/CMakeFiles/CMakeError.log”.
Makefile:318: recipe for target ‘cmake_check_build_system’ failed
make: *** [cmake_check_build_system] Error 1
Invoking “make cmake_check_build_system” failed

Hello @abhinavabhi742,

Well, that’s really weird. My 1st guess would be that there’s something broken in your current environment. I will suggest you a couple of things:

  1. Change to another Unit (with a different simulation) and go back to your current Unit. This will reset your environment and get rid of possible errors.

  2. Remove your build and devel folders before compiling your workspace.

If the error still persists, let me know.

Best,

hello @albertoezquerro ,

How can i remove build and devel folders??

Hi @abhinavabhi742,

You can remove your build and devel folders by running

cd ~/catkin_ws/
rm -rf build devel

Also when making custom messages, please ensure you follow the given instructions carefully and make no typos or accidental deletions when changing CMakeLists.txt and package.xml as this can cause weird errors like this.

Hello,

I tried both but the error still continues.

Okay, Let me have a look then. Please download and send package to baderinola@theconstructsim.com

Hi @abhinavabhi742,

The problem is that on line 10 of your CMakeLists.txt you have written ropsy instead of rospy. :sweat_smile:.

I think that was also affecting the other packages because if you just run catkin_make, it will stop because of this error and other packages will not compile well.