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

CMake Error: Unknown CMake command "add_message_files". [closed]

asked 2014-07-17 19:47:50 -0600

jackcviers gravatar image
catkin_make --force-cmake 
Base path: /home/jackcviers/Development/ros_piksi_ws
Source space: /home/jackcviers/Development/ros_piksi_ws/src
Build space: /home/jackcviers/Development/ros_piksi_ws/build
Devel space: /home/jackcviers/Development/ros_piksi_ws/devel
Install space: /home/jackcviers/Development/ros_piksi_ws/install
####
#### Running command: "cmake /home/jackcviers/Development/ros_piksi_ws/src -        DCATKIN_DEVEL_PREFIX=/home/jackcviers/Development/ros_piksi_ws/devel -DCMAKE_INSTALL_PREFIX=/home/jackcviers/Development/ros_piksi_ws/install" in    "/home/jackcviers/Development/ros_piksi_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/jackcviers/Development/ros_piksi_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/hydro
-- This workspace overlays: /opt/ros/hydro
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Python version: 2.7
-- Using Debian Python package layout
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/jackcviers/Development/ros_piksi_ws/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- catkin 0.5.88
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 2 packages in topological order:
-- ~~  - piksi_sensor_msgs
-- ~~  - piksi_driver
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'piksi_sensor_msgs'
-- ==> add_subdirectory(piksi_sensor_msgs)
CMake Error at piksi_sensor_msgs/CMakeLists.txt:47 (add_message_files):
  Unknown CMake command "add_message_files".


-- Configuring incomplete, errors occurred!
Invoking "cmake" failed

-- Relevant CMakeLists.txt:

OS: Ubuntu 13.04

ROS: Hydro

Any ideas what is causing this issue? I'd love to show you the cmake file, but for some reason it thinks I'm trying to post a link if I do and I don't have enough karma...

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by ahendrix
close date 2018-06-13 11:43:21.326263

Comments

Hi, this is off topic but I have been searching the forum for solutions for using piksi with ROS. So far I have not been able to find much. It looks as though that is what you are working on here? Did you ever get it to work. Would really appreciate some help with this.

K7 gravatar image K7  ( 2015-11-03 14:26:07 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
17

answered 2014-07-17 20:08:08 -0600

ahendrix gravatar image

updated 2014-07-17 20:08:21 -0600

You need to add the message_generation package to your find_package call if you wish to generate messages.

edit flag offensive delete link more

Comments

Thank you so much!

jackcviers gravatar image jackcviers  ( 2014-07-17 20:09:43 -0600 )edit

Hello, I have added the message generation to the find_package as : find_package(catkin REQUIRED COMONENTS roscpp rospy std_msgs genmsg), but it keep telling me that add_message_files() directory not found

WaliD gravatar image WaliD  ( 2018-06-12 08:09:34 -0600 )edit

@WaliD it sounds like you have a different problem. Please ask a new question.

ahendrix gravatar image ahendrix  ( 2018-06-12 16:11:34 -0600 )edit

@ahendrix I have the same error, when I enter the command catkin_make in order to compile the talker and the listener it tells me that add_message_files() directory not found. I have already added the message generation to find_package, but it tells me the same error

WaliD gravatar image WaliD  ( 2018-06-13 03:15:50 -0600 )edit

The OP was Unknown CMake command "add_message_files"., your error is different. Please ask a new question.

ahendrix gravatar image ahendrix  ( 2018-06-13 11:43:06 -0600 )edit

It is the same error I said, but I have solved the problem: I forget to add the message_generation to the file "package.xml". Thank you

WaliD gravatar image WaliD  ( 2018-06-13 11:54:16 -0600 )edit

@WaliD Hi, Could you please tell me, how did you add 'message_generation' to 'package.xml' and where. any sample, please. Thanks.

Ashkr gravatar image Ashkr  ( 2020-06-04 01:29:35 -0600 )edit
2

answered 2014-07-17 19:52:37 -0600

DevonW gravatar image

Have you done

find_package(catkin REQUIRED COMPONENTS)?

The command add_message_files is defined in the catkin include

edit flag offensive delete link more

Comments

Indeed, find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs )

jackcviers gravatar image jackcviers  ( 2014-07-17 19:57:47 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-07-17 19:47:50 -0600

Seen: 20,996 times

Last updated: Jul 17 '14