add_service_files does not exist. Message: message file not found

asked 2020-04-18 02:29:22 -0600

Abhishek_mishra gravatar image

updated 2020-04-18 11:24:38 -0600

I have been trying out the tutorials in wiki.ros.org. I am facing problem in one of the tutorials in which I need to write a publisher and subscriber model in python. To build the nodes, when I tried catkin_make, I am having the below listed error

lucifer@LuciferMorningstar:~/catkin_ws$ catkin_make
Base path: /home/lucifer/catkin_ws
Source space: /home/lucifer/catkin_ws/src
Build space: /home/lucifer/catkin_ws/build
Devel space: /home/lucifer/catkin_ws/devel
Install space: /home/lucifer/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/lucifer/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/lucifer/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/lucifer/catkin_ws/devel;/home/lucifer/ws_moveit/devel;/opt/ros/melodic
-- This workspace overlays: /home/lucifer/catkin_ws/devel;/home/lucifer/ws_moveit/devel;/opt/ros/melodic
-- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.17", minimum required is "2") 
-- Using PYTHON_EXECUTABLE: /usr/bin/python2
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/lucifer/catkin_ws/build/test_results
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Found gmock sources under '/usr/src/googletest': gmock will be built
-- Found PythonInterp: /usr/bin/python2 (found version "2.7.17") 
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.20
-- BUILD_SHARED_LIBS is on
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 3 packages in topological order:
-- ~~  - panda_moveit_config
-- ~~  - beginner_tutorials
-- ~~  - moveit_tutorials
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'panda_moveit_config'
-- ==> add_subdirectory(panda_moveit_config)
-- +++ processing catkin package: 'beginner_tutorials'
-- ==> add_subdirectory(beginner_tutorials)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
----------
**CMake Error at /opt/ros/melodic/share/catkin/cmake/assert.cmake:20 (message):**

  **Assertion failed: file
  '/home/lucifer/catkin_ws/src/beginner_tutorials/msg/add_service_files' does
  not exist.  Message: message file not found**

Call Stack (most recent call first):
  /opt/ros/melodic/share/genmsg/cmake/genmsg-extras.cmake:113 (assert_file_exists)
  beginner_tutorials/CMakeLists.txt:51 (add_message_files)

-- Configuring incomplete, errors occurred!
See also "/home/lucifer/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/lucifer/catkin_ws/build/CMakeFiles/CMakeError.log".
Makefile:530: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed
edit retag flag offensive close merge delete

Comments

You'll want to show your CMakeLists.txt.

gvdhoorn gravatar image gvdhoorn  ( 2020-04-18 04:18:04 -0600 )edit

So what was the problem?

gvdhoorn gravatar image gvdhoorn  ( 2020-04-18 13:48:36 -0600 )edit

I had a minor issue with my CMakeslists.txt file. Fixed it and it worked completely fine. :)

Abhishek_mishra gravatar image Abhishek_mishra  ( 2020-04-18 23:06:32 -0600 )edit

Please post what you did to solve it as an answer and accept your own answer.

Clearly describe your minor issue and how you fixed it.

Right now future readers would not have any clue what you did to solve your problem.

gvdhoorn gravatar image gvdhoorn  ( 2020-04-19 04:37:00 -0600 )edit

I tried commenting message in CMakeslists file at first. Searching a bit more about this issue on Google, I found out that this could be an issue with my moveit packages. Then i tried updating tmy moveit packages from the source and then uncommenting my messages & then it worked fine.

I believe the only issue was with my moveit packages.

Abhishek_mishra gravatar image Abhishek_mishra  ( 2020-04-19 09:48:42 -0600 )edit