Ask Your Question
1

Install launch files cakin

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

Pototo gravatar image

folks,

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.)
install(FILES
  ${PROJECT_NAME}/launch/my_launch_file.lunch
  # myfile2
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
edit retag flag offensive close merge delete

Comments

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

gvdhoorn gravatar imagegvdhoorn ( 2016-09-30 00:51:39 -0600 )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 imagegvdhoorn ( 2016-09-30 00:52:26 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

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

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/
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
  PATTERN ".svn" EXCLUDE)

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

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: 2016-09-29 22:17:03 -0600

Seen: 1,673 times

Last updated: Sep 30 '16