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

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

asked 2018-03-21 11:22:32 -0600

nbro gravatar image

updated 2018-03-21 11:24:10 -0600

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 flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2018-03-21 14:32:13 -0600

gvdhoorn gravatar image

updated 2018-03-21 14:41:36 -0600

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.

edit flag offensive delete link more

Comments

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

nbro gravatar image nbro  ( 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...

William gravatar image William  ( 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.

nbro gravatar image nbro  ( 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.

nbro gravatar image nbro  ( 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.

gvdhoorn gravatar image gvdhoorn  ( 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 ..

gvdhoorn gravatar image gvdhoorn  ( 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.

gvdhoorn gravatar image gvdhoorn  ( 2018-03-22 05:49:46 -0600 )edit
0

answered 2020-04-08 12:25:16 -0600

Yev_D gravatar image

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.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-03-21 11:22:32 -0600

Seen: 1,041 times

Last updated: Apr 08 '20