Ask Your Question
0

Nesting of workspaces [closed]

asked 2017-07-25 07:29:33 -0500

pitosalas gravatar image

updated 2017-07-25 21:36:49 -0500

I am following an example in the book "Programming Robots with ROS" from OReilly. Here's a snippet:

mkdir -p ~/wanderbot_ws/src
cd ~wanderbot_ws
catkin_init_workspace

Ok, so I understand that wanderbot_ws is now a valid catkin workspace. Next I did:

catkin create_pkg

At which point I have a directory structure that looks like this:

wanderbot_ws/
├── CMakeLists.txt -> /opt/ros/kinetic/share/catkin/cmake/toplevel.cmake
└── src
    └── wanderbot
        ├── CMakeLists.txt
        ├── package.xml
        └── src
            └── bluegreen.py

There is a TON of documentation on catkin, and I've looked at a lot of it, but the big picture is still not so clear to me, so here are some detailed questions:

To me this directory structure shows a clear nested structure, even if it's only one level. wanderbot_ws/ contains a file called CMakeLists.txt and a directory called src. wanderbot/also contains a CMakeLists.txt and a src/ directory. Does it make any sense to have another directory under wanderbot, again containing a CMAkeLists.txt and a src/ subdirectory?

I think the answer is no, that the top level is a workspace and the second level is a package and that's where it stops.

p.s. what is the mythology behind the name catkin?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by allenh1
close date 2017-07-30 17:10:08.169531

Comments

Probably not what you want to hear, but I think the catkin page on the ROS wiki has quite some docs on this.

As to where catkin comes from, see wiki/catkin/conceptual_overview.

gvdhoorn gravatar imagegvdhoorn ( 2017-07-25 07:49:29 -0500 )edit

@pitosalas A catkin is a bud on a willow tree (in ROS 2, the build system is named ament, which is defined as "a catkin."). Put simply, the name is a nod to Wiillow Garage, and hints some about the developmentprocess: your package is budding in the catkin stage, then it blooms when it releases.

allenh1 gravatar imageallenh1 ( 2017-07-25 13:00:49 -0500 )edit

@gvdhoorn thanks... but I've read a lot of that and it's hard to see the forest for the trees. I've added some more detailed questions in the original @allenh1 Thanks!

pitosalas gravatar imagepitosalas ( 2017-07-25 16:20:53 -0500 )edit

What do you mean by "does the nesting structure go down indefinitely?" As in, catkin workspace within a catkin workspace within a catkin workspace within a ...?

jayess gravatar imagejayess ( 2017-07-25 16:34:44 -0500 )edit

Just a quick comment: there is no nesting of workspaces. Only layering.

gvdhoorn gravatar imagegvdhoorn ( 2017-07-25 16:39:47 -0500 )edit

@jayless: I mean that literally in the folder structure I see a repeating structure of directories, recursive. My example is 2 levels deep. Can it be more? @gvdhoorn: can you clarify what you mean by layering? You mean that there's no inheritance from the containing dir to the contained dir?

pitosalas gravatar imagepitosalas ( 2017-07-25 16:41:44 -0500 )edit

I believe @gvdhoorn is referring to overlaying, but I could be wrong.

jayess gravatar imagejayess ( 2017-07-25 16:44:21 -0500 )edit

I'm still not quite clear on that question. You can have as many directories as you want, but no nested workspaces. You have packages within the (source space of the) workspace. But, even then you don't have packages within packages (except for a metapackage).

jayess gravatar imagejayess ( 2017-07-25 16:50:33 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2017-07-25 22:55:52 -0500

jayess gravatar image

updated 2017-07-25 23:04:52 -0500

If you're talking about a package within a package then it does not make sense to have a 3rd level. Like you said, wanderbot_ws is your catkin_workspace and wanderbot is the ROS package. Packages are not nested within other packages, as @gvdhoorn mentioned in a comment to your question.

The only time that you would "nest" a package within a package is with a metapackage. And the reason to do that is for logical organization of packages and to make installation of these packages easier as a distribution via apt-get or some other method.

edit flag offensive delete link more

Comments

Thanks to everyone!

pitosalas gravatar imagepitosalas ( 2017-07-26 08:14:49 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2017-07-25 07:29:33 -0500

Seen: 383 times

Last updated: Jul 25 '17