Ask Your Question
1

Rosmake takes too long

asked 2013-01-06 22:56:16 -0500

Victor_ocv2 gravatar image

I am used to compile with Makefiles and with the help of pkg-configs, where compilation time is usually under a second.

However, when I have to include some ROS stuff into my project I usually have to create a new ros pkg to be able to compile it (using rosmake). I can't just include it on my Makefile because there is not a pkg-config available for some components (move_base_msgs for example).

The problem is that when compiling with rosmake it usually takes over 10 seconds and some times it is even close to 20 seconds. This happens with simple projects with few dependencies such as these three:

<depend package="move_base_msgs"/> <depend package="actionlib"/> <depend package="roscpp"/>

Is there a way to reduce compilation time with rosmake? or to call some libraries from my own (and faster) Makefile? Thanks

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
4

answered 2013-01-07 00:19:48 -0500

KruseT gravatar image

rosmake is a wrapper around make, it basically parses the manifest.xml, builds a dependency tree of projects, and for each project invokes make. This allows convenient invocation of make in many projects spread around the filesystem.

If you want to just build one project however, you can just as well call

$ roscd someproject
$ make

Typical ROS projects use only a small makefile that invokes cmake, but you are free to use other Makefiles. However with the typical ROS cmake approach, you get the benefit of convenience macros e.g. for message generation.

edit flag offensive delete link more

Comments

Thanks for the tip, yet, using make in the project folter takes around 7 seconds vs 11 seconds using rosmake someproject. It is still a bit far from my expectations

Victor_ocv2 gravatar image Victor_ocv2  ( 2013-01-07 00:30:30 -0500 )edit
1

answered 2013-01-07 00:25:54 -0500

2_socke gravatar image

You can use rospack to get the needed compile flags inside your makefile. Note, normally there is a big bunch of include paths, that are responsible for the long lasting compilation time.

edit flag offensive delete link more

Comments

Interesting, I guess that I just have to use rospack as if it were pkg-config for example: rospack cflags-only-I move_base_msgs rospack libs-only-l move_base_msgs

Victor_ocv2 gravatar image Victor_ocv2  ( 2013-01-07 00:33:31 -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

Stats

Asked: 2013-01-06 22:56:16 -0500

Seen: 273 times

Last updated: Jan 07 '13