catkin
is the wrapper around cmake that ROS uses. Majority of the people I
know are still using plain catkin_make
to build their workspaces but that is
pretty basic. Please use catkin
, it is much more powerful and convienient.
For one, it can resolve dependencies and parallelize your workspace compilation. When you’re building individual packages it can sometimes be useful as it’ll detect if your dependencies are out of date and compile them too.
Install catkin with
1 | pip install catkin catkin_tools |
To initialize a workspace (that already has a src
folder)
1 | catkin init |
Then you can easily set cmake parameters
1 | catkin config --install --cmake-args -DCMAKE_FIND_FRAMEWORK=LAST \ |
or
1 | catkin config --install --cmake-args -DCMAKE_FIND_FRAMEWORK=LAST \ |
If you’re using homebrewed libraries on MacOS.
To build a particular package
1 | catkin build pkg |
Or blacklist/whitelist with
1 | catkin config (--blacklist|--whitelist) pkg |
If you are building an individual package you can force it to build only that package by
1 | catkin build pkg --no-deps |
Verbosity and job control
1 | catkin build -v -jN |