Advantage of linking to genmsg in CMakeLists.txt / package.xml?
As of now (Nov 26 '12), rospy_tutorials/Tutorials/Makefile page states for package.xml
:
<buildtool_depend>genmsg</buildtool_depend>
This line will have no effect when genmsg exists ouside your workspace, since genmsg is already installed. But for people using your package in the same workspace as genmsg will benefit from this line.
In my current particular case, I'm using genmsg
that resides under /opt/ros/groovy/share/
so it makes sense if I'm not taking any advantage.
Also for CMakeLists.txt
:
cmake_minimum_required(VERSION 2.8.3)
project(my_pkg)
find_package(catkin REQUIRED COMPONENTS rospy genmsg)
Without declaring both of above for genmsg
, I'm able to generate srv
binding files (in python as I want) by commenting in 2 macros in CMakeLists.txt
as following:
find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs)
add_service_files(
DIRECTORY srv
FILES
AddTwoInts.srv
)
generate_messages(
DEPENDENCIES
std_msgs # Or other packages containing msgs
)
(I'm working on this tutorial).
Question is that is there any advantage of declaring genmsg
in either/both package.xml
& CMakeLists.txt
as above?