How ROS Packages work with each other?
Update2:
As the source code is configured in a catkin workspace, does every package needs a catkin work space or I can put all what I need and what I am developing in one workspace?
Thanks for the answer from @jarvisschultz
Update:
If I want to make modification to some packages, should it be installed by source or sudo install? Any difference?
Thanks for the answer from @jarvisschultz
How ros packages work with each other?
There are packages built from source or built from binary packages, but how do they work?
Any explanations or examples are welcomed
If you would like to modify the source code for packages you should definitely be installing the packages from source. One reason would be that many apt-get packages don't include the source code (e.g. C++ nodes will only include the compiled binary not the code).
As another rule of thumb, you generally want to avoid editing code, configurations, scripts, etc. that are placed in areas of your filesystem requiring "root access". Let's say you edit a Python script in /opt/ros/indigo/ . Then the next update to the containing package will overwrite your changes.
The "root access" rule, of course, doesn't always apply. Sometimes you have to edit these things, but try to avoid it unless absolutely necessary.
You can put many packages into a single workspace. You may also want to investigate the concept of workspace chaining AKA workspace overlaying. http://wiki.ros.org/catkin/Tutorials/...