How to make actionlib service that depends on other message types?
I'm creating a new service using actionlib
, where the goal is an external standard message type, PoseWithCovarianceStamped
. Here is the .action
file:
# Define the goal
PoseWithCovarianceStamped pose
---
# Define the result
bool succeeded
---
# Define a feedback message
float32 percent_complete
When I run catkin_make
I get the error message:
CMake Error at [...] (message):
Could not find messages which
'[...]'
depends on. Did you forget to specify generate_messages(DEPENDENCIES ...)?
Cannot locate message [PoseWithCovarianceStamped] in package
So then I said "oh, duh, of course I need that." I added geometry_msgs
to my CMakeLists.txt
like this:
find_package(catkin REQUIRED genmsg actionlib_msgs actionlib geometry_msgs)
add_action_files(DIRECTORY action FILES SetPose.action)
generate_messages(DEPENDENCIES actionlib_msgs geometry_msgs)
But I still get the same error message, and I'm not sure what I'm doing wrong...
Here is a copy of my package.xml
with comments removed:
<?xml version="1.0"?>
<package format="2">
<name>set_pose</name>
<version>0.0.0</version>
<description>The set_pose package</description>
<maintainer email="edward.harvey@todo.todo">turtlebot</maintainer>
<license>GPLv3</license>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_export_depend>roscpp</build_export_depend>
<build_export_depend>rospy</build_export_depend>
<exec_depend>roscpp</exec_depend>
<exec_depend>rospy</exec_depend>
<build_depend>actionlib</build_depend>
<build_depend>actionlib_msgs</build_depend>
<exec_depend>actionlib</exec_depend>
<exec_depend>actionlib_msgs</exec_depend>
<export>
</export>
</package>
And here is a copy of my CMakeLists.txt
with comments removed:
cmake_minimum_required(VERSION 2.8.3)
project(set_pose)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
)
find_package(catkin REQUIRED genmsg actionlib_msgs actionlib geometry_msgs)
add_action_files(DIRECTORY action FILES SetPose.action)
generate_messages(DEPENDENCIES actionlib_msgs geometry_msgs)
catkin_package(
)
include_directories(
${catkin_INCLUDE_DIRS}
)
Can you please update your question with your
package.xml
andCMakeLists.txt
?@jayess Updated. Thanks for looking.