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

Install launch files cakin

asked 2016-09-29 22:17:03 -0500

Pototo gravatar image


How do I install launch files with catkin? I was trying the next code in my CMakeList.txt, but it was working:

## Mark other files for installation (e.g. launch and bag files, etc.)
  # myfile2
edit retag flag offensive close merge delete


I assume you meant to write "but it wasn't working"?

gvdhoorn gravatar image gvdhoorn  ( 2016-09-30 00:51:39 -0500 )edit

It's always a good idea to include any error messages or descriptions of unexpected/undesired behaviour. "it's not working" is too general, and we can't guess as to what didn't actually work.

gvdhoorn gravatar image gvdhoorn  ( 2016-09-30 00:52:26 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-09-30 00:33:29 -0500

gvdhoorn gravatar image

First (and I feel this is important): this is not a Catkin-specific problem or piece of functionality. The install(..) statement is part of regular CMake, and we just make use of it in our CMakeLists.txt. Only the DESTINATION argument has a Catkin-specific value, but install(..) would work with any path (it would just not install the launch files in the 'correct' (for ROS anyway) location).

As for your question: installing "launch files [or other resources]" (ie: not programs, libraries or headers) is documented on the ROS Wiki under wiki/catkin/CMakeLists.txt - Optional Step: Specifying Installable Targets - Installing roslaunch Files or Other Resources:

Other resources like launchfiles can be installed to ${CATKIN_PACKAGE_SHARE_DESTINATION}:

install(DIRECTORY launch/

The PATTERN ".svn" EXCLUDE only makes sense if you actually use Subversion as your VCS. In other cases you can leave it out.

Note that this installs an entire directory, which could not be what you want. Installing individual files is also possible, see the CMake documentation for install(..) for details.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-09-29 22:17:03 -0500

Seen: 4,804 times

Last updated: Sep 30 '16