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

compile error with msg file

asked 2013-11-05 11:51:45 -0500

ayslegacy gravatar image

updated 2013-11-14 12:35:43 -0500

tfoote gravatar image

I keep getting an error that ROS can't find the messages which the message I am trying to publish from my executable depends on. The compiler suggests that maybe I forgot to specify them in generate_messages() but I did. Here is a copy of my CMakeLists.txt. Any help will be appreciated.

cmake_minimum_required(VERSION 2.8.3)
project(uuv_words)
find_package(catkin REQUIRED COMPONENTS message_generation roscpp 
std_msgs turtlesim)
add_message_files(FILES away.msg)
generate_messages(DEPENDENCIES std_msgs roscpp turtlesim)
catkin_package(
  INCLUDE_DIRS ##include
  LIBRARIES ${PROJECT_NAME}
  CATKIN_DEPENDS roscpp message_runtime std_msgs turtlesim
  ##DEPENDS system_lib
 )
include_directories(${catkin_INCLUDE_DIRS})
add_executable(away src/away.cpp) 
add_dependencies(away uuv_words_generate_messages_cpp)
target_link_libraries(away ${catkin_LIBRARIES})
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-11-06 22:53:46 -0500

Tirjen gravatar image

Your CMakeLists.txt is very disordered, but I think that the generate_messages() command is missing. If your message away.msg depends on other messages (for example std_msgs) you should tell catkin in a similar way:

generate_messages(
  DEPENDENCIES
  std_msgs
)
edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2013-11-05 11:51:45 -0500

Seen: 490 times

Last updated: Nov 14 '13