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

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
5

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

Comments

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

Hi there, thanks for explaining the above. From my understanding: 1. I can create a launch file to call unmodified packages I need from /opt/ros/distro/share. 2. I can also create launch file and call modified packages installed in catkin_ws.

Question is, can they both work together? Thank you.

1024son gravatar image 1024son  ( 2022-02-21 01:03:43 -0500 )edit

Question Tools

1 follower

Stats

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

Seen: 2,291 times

Last updated: Oct 30 '14