Ask Your Question

Why is catkin_make_isolated trying to build so much ?

asked 2020-10-14 19:27:46 -0500

elpidiovaldez gravatar image

Basically I don't understand the ROS build system.

I installed ROS from source on a Raspberry Pi 4 under Raspbian Buster Stretch using this method. I also managed to get raspicam_node to compile and install. I used Raspbian because it provides support for the Pi's GPU.

Everything works, but whenever I try to build my own package with catkin_make_isolated, ROS appears to try to rebuild the entire system - it takes hours ! Also I don't know if I should be using catkin_make(like I always used to), or catkin_make_isolated. I don't know why ROS wants to rebuild the whole system - I installed the system to /opt/ROS/melodic, and thought that it should now just recompile my own package. Something has got very messed up.

My directory structure is now:

  • catkin_ws

    • build
    • build_isolated
    • devel
    • devel_isolated
    • install
    • src

I don't think I should have build and build_isolated etc. Some packages exist in both, and some are just in one. I don't know why I have both.

Any clarification would be welcome.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-10-16 03:16:42 -0500

ahcorde gravatar image

Hi elpidiovaldez,

You have this directory structure because you have used catkin_build (build and install) and catkin_build_isolated (build_isolated and install_isolated) in this workspace. You should use only one.

  • catkin_make treats the entire workspace as a single cmake project, and builds it with a single invocation of cmake. Since catkin_make treats the entire workspace as a single package, it's faster for incremental builds that only change code, but slower when you need to regenerate the build files, and more sensitive to dependency issues between packages.

  • catkin_make_isolated treats each package as a separate cmake project, and builds and installs each separately, in dependency order. This is why it's able to build plain cmake packages.

You can find more detail in this thread

If you want to build only your package try to run:

catkin_make_isolated --pkg <your package name>

for more usefull arguments and/or options:

catkin_make_isolated -h


edit flag offensive delete link more


Suggestion to the OP: read up on workspace overlaying, and don't re-use the workspace you used to build your base ROS install for development of your own packages. Use a new, overlayed workspace for that.

gvdhoorn gravatar image gvdhoorn  ( 2020-10-16 03:20:00 -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


Asked: 2020-10-14 19:27:46 -0500

Seen: 23 times

Last updated: Oct 16