# What exactly is a target in the context of ROS, catkin and workspaces?

I have seen the word "target" used in different articles, but I have not seen a clear definition of it. For example, this article http://wiki.ros.org/eros/Tutorials/In... is about installing targets. In this question https://answers.ros.org/question/2174... , the author states

CMakeLists.txt is a build script, it does not explicitly express the run dependencies of the targets that get built

I have seen so many places using the word "target" in the context of ROS and catkin, but the uses do not always seem consistent. I suppose this has something to do with make and cmake, but I am not very familiar with these tools. So, could you please explain to me what a target, in the context of ROS, catkin and workspaces, is?

edit retag close merge delete

Sort by » oldest newest most voted

I suppose this has something to do with make and cmake, but I am not very familiar with these tools. So, could you please explain to me what a target, in the context of ROS, catkin and workspaces, is?

That would be difficult (without knowledge of the buildtools that you refer to), as it in most cases is the same concept as in make and cmake or very closely related to it.

I would suggest to review fi wikipedia/Makefile - Contents and perhaps OSDev/Makefile.

Edit: there is also CMake's documentation: cmake-buildsystem(7). This may be a bit technical though.

more

I hadn't accepted your answer and it today it turned out to be accepted. What the heck is going on?

( 2018-03-22 03:56:08 -0600 )edit
1

When the user has a history of not accepting answers moderators will sometimes accept an answer that appears to be correct. Note moderators cannot accept their own answers and there is a period of time where only you can accept an answer. However, I'm not sure why you wouldn't accept this answer...

( 2018-03-22 05:05:02 -0600 )edit

@William. I am not satisfied with this answer yet, that's why I don't accept it.

( 2018-03-22 05:19:03 -0600 )edit

So, what are (the usual) targets in ROS? Examples of targets? Are packages targets? I more or less understand what a target in the context of make is. In my question I also say that the term "target" seems to be used to signify different things or, at least, people seem to abuse of its usage.

( 2018-03-22 05:21:22 -0600 )edit

What the heck is going on?

I wouldn't know. I certainly didn't accept it for you.

( 2018-03-22 05:45:36 -0600 )edit
1

And an observation: re: "what the heck" and "why on earth": this may be your normal way of expressing yourself, but I must say that for me personally it comes across as antagonistic and unnecessarily strong.

These are good questions, but your phrasing seems to imply that you're feeling very ..

( 2018-03-22 05:48:52 -0600 )edit
1

.. strongly about the subjects raised and can't see any reasonable explanation for why they are in their current state or why they are there in the first place.

That may not be the best way to approach a community forum.

( 2018-03-22 05:49:46 -0600 )edit

Here is my take on the answer.

Let's say you create a ROS package where you have a script that takes in the sensor data from temperature gage, and sounds the alarm when temperature is critical. In very simple terms here, the targets are the commands to READ_SENSOR and SOUND_ALARM. You build this package, using catkin_make for example, and now you can share this package with a friend's, robot. This robot would then use these two commands to interact with your package.

Think of a "catkin build" (or a "CMake" or a "make" or a "rosbuild") as a tank in the deep woodlands of workspace folders, custom libraries, classes and scripts, and all dependencies. Take your tank and point at the commands or executable files that you want blow out of these woodlands into the real world (run-time environment where users live), by using some sort of teleportation ammunition.

P.S. That's how I understood "targets" at the moment. I may be wrong, and might come back here to update this answer later on as I learn more about it. But for now, that's what I understood from the links posted by @gvdhoorn.

more