The difference and use of catkin build and catkin_make

The information found on the Internet is very fragmented. The best information is the official github document:

https://github.com/catkin/catkin_tools

https://catkin-tools.readthedocs.io/en/latest/quick_start.html#initializing-a-new-workspace

It introduces the usage and differences of various tools of the catkin family in detail, please read it yourself.

Simply put, if there is only one ros package in the ros workspace, then catkin_make and catkin build are not much different;

If there are multiple ros packages in a caktin workspace, then catkin build is obviously a better compilation tool.

Because catkin_make is just a shorthand for a few lines of Cmake and make commands, no matter how many packages are in it, they are compiled together.

But catkin_build will compile all the packages in the workspace separately (isolated) at the same time, and the compilation process will not affect each other.

It is more effective to use with tools such as catkin init, catkin config, catkin create pkg, catkin build, catkin list, catkin clean, etc.

Catkin init can initialize the workspace, and after initialization, using the catkin tool in any subdirectory of the workspace is equivalent to using it in the workspace folder, and it will automatically sense the workspace.

catkin config can view the structure and parameters of the workspace.

catkin config --merge-devel can make the devel products compiled by each package be in the same devel folder, of course, you can also use catkin config --isolate-devel to separate the devel of each package.

catkin list can view which ros packages are in the workspace.

catkin clean is equivalent to rm -r ${build} ${devel}, but it avoids the dangerous operation of rm -r!

In short, it is recommended to use catkin build

 

Guess you like

Origin blog.csdn.net/benchuspx/article/details/113847854
Recommended