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

Making packages with metapackage dependencies.

asked 2017-07-11 19:44:32 -0500

Mav16 gravatar image

I'm following the Gazebo ROS control tutorial and the following command is creating issues for me.

catkin_create_pkg MYROBOT_control ros_control ros_controllers

I understand that ros_control and ros_controllers are metapackages, but how can I make a the necessary control package that depends on the packages in the dependencies?

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-07-11 20:09:54 -0500

130s gravatar image

updated 2017-11-27 11:43:05 -0500

UPDATE

I want to know how I can add the necessary dependencies if I can't use the metapackages as dependencies as listed in the tutorial.

Looking at the tutorial you referred to, IMO your question is valid. I've suggested a possible fix. You must pass explicit dependencies.


Not sure if I understand your question correctly but if you're asking if it's possible for your_package to depend on metapackages, yes, and your_package can include all direct dependency defined in a metapackage as well as transitive ones no normal catkin package cannot depend on metapackages (ref. REP-0127).

Only metapackages can depend on other metapackages. E.g. ros-kinetic-desktop-full, which is a metapackage that includes standard packages, depends on another metapackage ros-kinetic-desktop, which depends on another metapackages.

edit flag offensive delete link more

Comments

When I run catkin_make after running the command listed above, it fails with an error saying "metapackages cannot be used as dependencies"

Mav16 gravatar image Mav16  ( 2017-07-11 21:20:30 -0500 )edit

My bad. I've updated my answer. Btw as I mentioned I still don't know what you were asking.

130s gravatar image 130s  ( 2017-07-11 21:28:21 -0500 )edit

I want to know how I can add the necessary dependencies if I can't use the metapackages as dependencies as listed in the tutorial.

Mav16 gravatar image Mav16  ( 2017-07-11 21:30:07 -0500 )edit

@tjvt That sounds like a requirement for a Catkin package to be a Catkin metapackage, without having to do dependency. No?

130s gravatar image 130s  ( 2020-01-13 01:20:19 -0500 )edit

What @tjvt adds in his comment is indeed a required export for metapackages. Without that export, the package will not be a metapackage.

gvdhoorn gravatar image gvdhoorn  ( 2020-01-13 01:44:45 -0500 )edit
1

I'm not entirely sure what you're writing here, but two comments:

  • don't depend on metapackages from regular packages. Depend on the actual dependencies instead (ie: don't depend on transitive dependencies, metapackages can (and will) change)
  • metapackages don't get built
gvdhoorn gravatar image gvdhoorn  ( 2020-01-13 04:07:21 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2017-07-11 19:44:32 -0500

Seen: 1,089 times

Last updated: Nov 27 '17