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

How to make catkin compile packages within a metapackage?

asked 2013-12-02 00:59:00 -0600

MatthiasMayr gravatar image

I'm using hydro with catkin (v. 0.5.77) and I'm using a metapackage because I want to enhance a rosbuild-stack, which I catkinized. My problem is, that catkin_make recognizes my metapackage, but doesn't touch (in terms of compile) the package within the metapackage.

To show the problem, I created a metapackage called "metapackage" in catkins source directory (~/catkin_ws/src/metapackage) and a package "package1" in the directory of the metapackage (~/catkin_ws/src/metapackage/package1). The package "package1" is working fine and compiling, when I move it in catkins source directory. But if it's in the metapackages directory, it isn't touched by catkin.

I went through all the ros-answers questions and the wiki, but I didn't find another way telling catkin about my package except the run_depend-tag, which doesn't change anything.

Thanks in advance.


  • That's the CMakeLists.txt of my metapackage:

cmake_minimum_required(VERSION 2.8.3)
find_package(catkin REQUIRED)

  • That's the package.xml of my metapackage:
<?xml version="1.0"?>
  <description>The metapackage package</description>

  <maintainer <a href="mailto:email="user@todo.todo">user</maintainer">email="user@todo.todo">user</maintainer</a>>


  <!-- The export tag contains other, unspecified, tags -->
    <!-- You can specify that this package is a metapackage here: -->
    <!-- Other tools can request additional information be placed here-->

  • If it's interesting, that's my toplevel CMakeLists.txt:
    (it needs a http:// prefix as I do not have enough karma to post links, but it's too long to post it here)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-12-02 01:53:45 -0600

felix k gravatar image

updated 2013-12-02 01:54:40 -0600

Uhm, I don't think packages are allowed to reside within outher packages. Have you seen any indications for that to work?

Usually the parent folder, named like the meta package or just the repo name, contains no package.xml but all packages and also the folder again named like the meta package, containing the package.xml with the meta-declaration.

edit flag offensive delete link more



Your tip with the folder worked. I didn't know, that the metapackages packages.xml and CMakeLists.txt have to be within a folder named like the metapackage. I also didn't find any documentation saying that.

MatthiasMayr gravatar image MatthiasMayr  ( 2013-12-02 02:08:53 -0600 )edit
neuronet gravatar image neuronet  ( 2016-08-03 22:22:52 -0600 )edit

Question Tools

1 follower


Asked: 2013-12-02 00:59:00 -0600

Seen: 4,966 times

Last updated: Dec 02 '13