Ask Your Question
1

How to make catkin compile packages within a metapackage?

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

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.

Information

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

cmake_minimum_required(VERSION 2.8.3)
project(metapackage)
find_package(catkin REQUIRED)
catkin_metapackage()

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

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

  <buildtool_depend>catkin</buildtool_depend>
  <run_depend>package1</run_depend>


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

  </export>
</package>
  • If it's interesting, that's my toplevel CMakeLists.txt: pastebin.com/h6ssccXC
    (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
2

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

felix k gravatar image

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

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

Comments

2

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 imageMatthiasMayr ( 2013-12-02 02:08:53 -0500 )edit
1
neuronet gravatar imageneuronet ( 2016-08-03 22:22:52 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 3,368 times

Last updated: Dec 02 '13