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

[catkin] Examples for Environment Hooks that work in both devel- and install-space, referencing directories? (empy?)

asked 2014-02-08 06:35:24 -0500

eacousineau gravatar image

updated 2014-02-08 07:00:38 -0500

Are there any examples of creating environment hooks in catkin that work in both devel-space and install-space?

From the CMake API, I saw that one of the two methods for handling conditionals inside of the template file is to use the basic CMake template engine or use empy with *.em files.

I tried out empy, but wasn't sure how CMake variables are communicated. My next step is to dig a little more into the catkin docs and code to see what environment variables relate to devel-space and install-space.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-02-08 09:36:15 -0500

Dirk Thomas gravatar image

In .em templates for environment hooks only the following variables are available from the CMake context: https://github.com/ros/catkin/blob/in...

If you need additional custom variables in your template you have to use .in files (which are expanded by the CMake configure_file function which will pass all CMake variable to the template).

Independent of the template type you can either use one template which conditionally deals with devel and install space ( https://github.com/ros/ros/blob/hydro... ) or you can use separate templates for both. In that case you distinguish the template by inserting develspace / installspace between the filename and the extension ( http://docs.ros.org/api/catkin/html/d... ).

edit flag offensive delete link more

Comments

Ah, that makes sense! I had missed the point of the develspace / installspace extensions. And thank you for the empy reference.

eacousineau gravatar image eacousineau  ( 2014-02-08 12:18:51 -0500 )edit

Got to play around with these a bit -- very nice! (More) props to you, Troy, Morten, and Gerkey!

eacousineau gravatar image eacousineau  ( 2014-02-09 06:33:57 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-02-08 06:35:24 -0500

Seen: 379 times

Last updated: Feb 08 '14