Creating a ROS package
The ROS packages are the basic unit of the ROS system. We can create a ROS package, build it, and release it to the public. The current distribution of ROS we are using is kinetic. We are using the catkin
build system to build ROS packages. A build system is responsible for generating 'targets'
 (executable/libraries) from a raw source code that can be used by an end user. In older distributions, such as Electric and Fuerte, rosbuild
was the build system. Because of the various flaws of rosbuild
, catkin
came into existence, which is basically based on Cross Platform Make (CMake). This has a lot of advantages, such as porting the package into another operating system, such as Windows. If an OS supports CMake and Python, catkin
 -based packages can be easily ported into it.
The first requirement work with ROS packages is to create a ROS catkin
workspace. After installed ROS, we can create and build a catkin_workspace
 called catkin_ws
:
$ mkdir -p ~/catkin_ws/src
To compile...