Custom service with custom message
Hi All,
I am trying to create a package in which I define my messages and use the same in defining services like
foo_msgs/msg/MS1.msg
foo_msgs/srv/SRV1/srv
where SRV1.srv contains a line with foo_msgs/MS1[] some_name
I have all the dependencies set in CMakeLists.txt file as
set( MESSAGE_DEPENDENCIES
std_msgs
geometry_msgs
)
find_package(catkin REQUIRED
COMPONENTS
message_generation
${MESSAGE_DEPENDENCIES}
)
include_directories(${catkin_INCLUDE_DIRS})
link_directories(${catkin_LIBRARY_DIRS})
add_message_files( DIRECTORY msg
FILES
AgentState.msg
AllAgentsState.msg
)
# the services
add_service_files( DIRECTORY srv
FILES
SetAgentState.srv
GetAgentState.srv
SetAllAgentsState.srv
GetAllAgentsState.srv
)
# generate the messages
generate_messages(DEPENDENCIES ${MESSAGE_DEPENDENCIES})
#Declare package run-time dependencies
catkin_package( CATKIN_DEPENDS message_runtime ${MESSAGE_DEPENDENCIES})
But this always fails with this error
/opt/ros/hydro/share/genmsg/cmake/pkg-genmsg.cmake.em:50: error: <class 'genmsg.base.InvalidMsgSpec'>: Invalid declaration: pedsim_msgs/AgentState
I am using Hydro on Ubuntu 12.04.