Nesting of workspaces
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
?
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.@pitosalas A
catkin
is a bud on a willow tree (in ROS 2, the build system is namedament
, 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.@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!
What do you mean by "does the nesting structure go down indefinitely?" As in,
catkin
workspace within acatkin
workspace within acatkin
workspace within a ...?Just a quick comment: there is no nesting of workspaces. Only layering.
@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?
I believe @gvdhoorn is referring to overlaying, but I could be wrong.
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).