Ask Your Question

Is it possible to change "msg" and "srv" folder position in a package ?

asked 2011-04-23 21:55:28 -0500

Willy Lambert gravatar image

As I am working on a multi-framework environment I wanted to separate what is related to ROS from the other. I would like to put the "msg" and "srv" folder into ros/msg and ros/srv. Is there any Cmake variable to configure this ?

In the same way, I would like to customize the position of srv_gen and msg_gen, is there also a variable ?

edit retag flag offensive close merge delete


nobody knows ?
Willy Lambert gravatar image Willy Lambert  ( 2011-05-07 22:45:19 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2011-05-08 04:23:21 -0500

Brian Gerkey gravatar image

updated 2011-05-08 12:46:46 -0500

tfoote gravatar image

Those locations are not configurable.

Unfortunately, the assumptions about where the message/service source files are and where the generated code goes are embedded in both rosbuild and in the code-generation logic in all the client libraries. The msg_gen and srv_gen locations are further embedded in rospack, which looks for a file called generated in each of those directories to decide whether to add msg_gen/cpp/include and srv_gen/cpp/include to the compiler include path.

While all those assumptions in code could be made configurable, it would be a large, and largely untested, change.

If relocating those files is important to you, I recommend requesting an enhancement in rosbuild2. Be sure to describe your use case thoroughly so that we can understand what's needed, and judge the tradeoffs involved.

edit flag offensive delete link more


thanks for this clear answer. It is just a matter of folder organization and confort. It's as being able to configure the build bin or lib directory. As srv and msg are "sources" and msg_gen and srv_gen headers files, they coud go in my src or include dirs. I am not sure this worth the changes
Willy Lambert gravatar image Willy Lambert  ( 2011-05-08 20:28:51 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2011-04-23 21:55:28 -0500

Seen: 420 times

Last updated: May 08 '11