Ask Your Question

catkin_ws/ vs share/

asked 2014-10-29 23:59:57 -0500

kost9 gravatar image

Can anyone plaease explain to me what the difference between folders catkin_ws/ and /opt/ros/hydro/share is? what is the purpose of each? thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-10-30 01:49:47 -0500

l0g1x gravatar image

catkin_ws (could be called anything you want really, foo_ws) is the workspace in which you want to develop your packages on. Inside the catkin_ws folder in the devel/ folder you will see a setup.bash file. If you source this bash file, it will mean that your current terminal window is set up to the environment of your catkin_ws.

opt/ros/hydro/share is where all the debian packages you download from sudo apt-get install ros-hydro-whatever package will be installed to. Inside that folder is just the binary executables, and you most likely won't see any source files in there, except maybe for some include files. As a good practice, You don't want to edit things in this folder because this is where pre-approved, tested, and working ros packages go. If you want to possibly modify some code (say for a pull request) for some package, you should rather download the source for that package from github or wherever, put it into your catkin_ws and then build it inside your catkin_ws. So to sum things up, put the code you will write/modify, into your catkin_ws. apt-get installed ros packages into the /opt/ros/[distro]/share folder.

Hope this clarifies some things

edit flag offensive delete link more


Thank you so much!!

kost9 gravatar image kost9  ( 2014-10-30 02:20:55 -0500 )edit

The /opt/ros/kinetic/share folder of ros kinetic only includes the cmake modules, and the executables you mentioned are stored in the /opt/ros/kinetic/lib directory.

anonymous userAnonymous ( 2019-03-12 09:21:27 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-10-29 23:59:57 -0500

Seen: 1,298 times

Last updated: Oct 30 '14