ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I believe almost all of your questions are answered by these pages:

  • https://wiki.ros.org/catkin/workspaces
  • https://catkin-tools.readthedocs.io/en/latest/mechanics.html

Given that I am not very familiar with make and cmake, what does it mean "to build a package" in the context of catkin?

I would suggest reading some introductory material on cmake and make development on Linux, that's a pretty core concept that you'll need to work with ROS.

There are lots of cmake tutorials and guides out there, but I don't have one to recommend over others. Specifically for the question about targets, you might benefit from this:

https://stackoverflow.com/questions/11971917/why-does-cmake-make-a-distinction-between-a-target-and-a-command

It's asking/answering a more complex question, but the answer has some foundational details on what a target means in cmake and how it relates to make.

what is a target in the context of catkin, workspaces and ROS packages?

It means the same thing as it does for make and cmake (both of which are target oriented), again I believe that's out of the scope of this forum. There's not thing special about targets in catkin, they're just cmake or make targets.

What is a built target? Why do we need to place built targets here before installing them?

How is building a package different from installing?

Again, this is a generic cmake question, but basically you need to build the code and see that it successfully built and then you'll install some but not all of those files from build, usually for the purpose of redistribution.

I understood we are building packages, but what are we installing?

It depends on the package, but usually it's executables, libraries, and headers for C++.

When do we need to install after building (which I associate more to compiling and linking source files)? When don't we need to install?

Again it depends. catkin lets you do more than normal without installing (that's the purpose of the devel space, again see https://wiki.ros.org/catkin/workspaces), but in normal cmake/make type setups, you usually can run tests and examples after building, but you usually install to produce a result which only includes what you need to actually run the program or use the library.