10
$\begingroup$

When using ROS:

Why should I use catkin build from catkin_tools instead of catkin_make?

I've been told that catkin build is better but no one who tells me this can give me a reason why.

$\endgroup$
10
$\begingroup$

The main difference is the isolated environment that you get with catkin build. This makes the whole build configuration much more compartmentalized and robust to changes in the configuration (add/remove package, modify a cmake variable etc.)

Apart from that you also get much better and easily-readable colored cmdline output which makes the whole experience much more pleasant.

@SteveO's link also gives a nice summary of the changes between the tools.

Adding to catkin build you also get many other useful subcommands with catkin including catkin clean for cleaning the build, devel and install spaces, as well as catkin list , catkin locate, catkin profile

| improve this answer | |
$\endgroup$
2
$\begingroup$

Apart from the isolated build, it is much more convenient to use:

  • Independent packages are build in parallel which makes it much faster.
  • catkin build can be used from any directory in the workspace while catkin_make only works in the top level directory.
  • It is easy to only build a single package (+ dependencies): catkin build package_name or, when called from the package directory, catkin build --this. Add --no-deps to skip dependencies.
    (Note that catkin_make has a --only-pkg-with-deps flag for this, but there it will result in a persistent setting so next call of just catkin_make would also only build this package which is very unintuitive.)
  • catkin clean makes it easy to wipe build/devel without having to use a scary rm -rf.
  • Some other useful commands (list, locate, ...) as already mentioned by @bergercookie.
| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.