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

ros2 pkg list show cmake packages

asked 2020-01-16 09:08:50 -0500

ananya.muddu gravatar image


I have a ros2 workspace with both ament and cmake packages.

The command "ros2 pkg list" does not show cmake packages that I have built and installed. It only shows ament packages. How do I get it to list cmake packages?

For the cmake packages, in package.xml, I use package version 3 and set buildtool_depend, buildtool_export_depend, and export/build_type to cmake.

I am assuming that is problem connected with failure of "ros2 launch package launch-file" failing on cmake packages. Have not tested the xacro "$(find package)" on cmake packages, but am assuming that would fail too.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-01-16 10:37:58 -0500

Dirk Thomas gravatar image

In order to be detectable as an installed ROS package your package should do two things (which ament_cmake packages does automatically in the ament_package() function):

In contrast to ROS 1 the presence of the marker file allows for more efficient queries what packages are installed and where.

edit flag offensive delete link more


Thanks for the fast response. I installed the the empty marker file to the directory ament_index/resource_index/packages/.

ananya.muddu gravatar image ananya.muddu  ( 2020-01-17 03:41:58 -0500 )edit

Question Tools



Asked: 2020-01-16 09:08:50 -0500

Seen: 1,447 times

Last updated: Jan 16 '20