-
Notifications
You must be signed in to change notification settings - Fork 38
Catkin Command Line Tools
Catkin can be a little slow for two reasons:
- Catkin processes the dependencies of your workspace before starting to build the actual packages.
- Catkin parallelizes the build of object files inside a package, but does not build packages in parallel.
One reason for that is that catkin creates a single make target for all packages in your source space. A new command called catkin-make-isolated builds each package in the workspace individually (cmi ROS). This can be parallelized better by resolving dependencies on the fly and therefore speeding up your build significantly.
This feature is part of the catkin-tools, which is the preferred way of building catkin workspaces.
Can be found here.
-
catkin build
: Verb for building a catkin workspace <commands/catkin_build> -
catkin list
: Verb for finding and listing information about catkin packages <commands/catkin_list>
THIS IS PARTIALLY OUTDATED : since https://github.com/catkin/catkin_tools/commit/518a2867b09a1020a1299e9736df04dc89d9466a there is no '--merge-devel' option anymore. Instead it is the default behavior! Of course there is still the possibility to add verbs like explained below but for the particular example there is no reason/user anymore!
We advocate the use of --merge-devel
whenever using catkin-tools but it can be annoying to type this all the time.
Thankfully, catkin tools has a mechanism for adding command aliases.
Go to ~/.config/catkin/verb_aliases
and add a file called 01-asl-aliases.yaml
. Add the following text:
bmd: build --merge-devel
build-md: build --merge-devel
This defines two new aliases that will run build --merge-devel
for you if you type
catkin bmd
or
catkin build-md
sudo apt-get install python-setuptools
cd /tmp
git clone https://github.com/catkin/catkin_tools.git
cd catkin_tools
sudo python setup.py install
From now on you can issue a parallel catkin_make
by using the command catkin build
where you have used catkin_make
before, e.g.:
cd $CATKIN_WS
catkin build --merge-devel