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

thijser's profile - activity

2015-05-18 03:03:12 -0500 received badge  Famous Question (source)
2015-03-16 13:38:27 -0500 received badge  Notable Question (source)
2015-02-09 08:12:53 -0500 received badge  Popular Question (source)
2014-12-01 09:41:43 -0500 received badge  Supporter (source)
2014-12-01 09:41:42 -0500 received badge  Scholar (source)
2014-12-01 08:47:08 -0500 asked a question custom message creation causes error

Hello, I'm attempting to create a custom message following this tutorial: http://wiki.ros.org/ROS/Tutorials

/CreatingMsgAndSrv#Creating_a_msg I currently have the following make file:
cmake_minimum_required(VERSION 2.8.3)
project(glados)
include_directories(include ${catkin_INCLUDE_DIRS})

find_package(catkin REQUIRED COMPONENTS roscpp message_generation threemxl std_msgs  rospy)
catkin_package()

catkin_package(
INCLUDE_DIRS include
CATKIN_DEPENDS roscpp std_msgs geometry_msgs)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

include_directories(include ${catkin_INCLUDE_DIRS})
include_directories(include ${roscpp_INCLUDE_DIRS})

######
#CORE
######

add_executable(core src/core.cpp)
target_link_libraries(core ${catkin_LIBRARIES})


#######
#SENSORS
#######

#Switchsensor
add_library(switchSensor src/sensors/switchSensor.cpp)
target_link_libraries(switchSensor ${catkin_LIBRARIES})

#UltrasoneSensor
add_library(UltrasoneSensor src/sensors/UltrasoneSensor.cpp)        
target_link_libraries(UltrasoneSensor ${catkin_LIBRARIES})

#RFIDSensor
add_library(RFIDSensor src/sensors/RFIDSensor.cpp)
target_link_libraries(RFIDSensor ${catkin_LIBRARIES})

#########
#DRIVERS
#########    

#Launch
add_library(launchDriver src/drivers/launchDriver.cpp)
target_link_libraries(launchDriver ${roscpp_LIBRARIES} switchSensor)

#######
#LOGIC
#######

#Ball ask
#add_executable(mathAsker src/mathAsker.cpp)
#target_link_libraries(mathAsker ${catkin_LIBRARIES})

# Generate messages in the 'msg' folder
add_message_files(
   FILES
   music.msg
 )

 generate_messages(
   DEPENDENCIES
   std_msgs
 )

however this causes the following error:

CMake Error at /opt/ros/indigo/share/genmsg/cmake/genmsg-extras.cmake:91 (message):
  add_message_files() directory not found:
  /home/thijs/codes/robotica-minor-5/turtleCode/src/glados/msg
Call Stack (most recent call first):
  glados/CMakeLists.txt:55 (add_message_files)

I have tried around a few times but cannot seem to find the solution, the custom message is placed inside src/msg/music.msg