Where/How TO Create & Bundle Packages?

It says to always be in a specific directory, catkin_ws/src to create a new package. What if I wish to create a directory inside src as “unit1” or “topics” and inside that create all packages related to it? Then, keep services packages inside src/services directory, and so on. Is it possible to bundle a few packages and organize them in separate folders?

Hey @ashe15avijit,

Your suggestion makes a lot of sense! Yes, it’s possible to do that, and it works.

Hints:

  • When you want create a package, just ensure you cd into the related directory (e.g src/topics) before running catkin_create_pkg.
  • Run catkin_make and source devel/setup.bash from catkin_ws as usual, and all nested packages will be discovered.

Could you try and let us know how it goes?


By the way, welcome to the community!