Step1 :
First, create the top level catkin workspace directory and a sub-directory named src
(pronounced source). The top level directory’s name is arbitrary, but is often called catkin_ws (an abbreviation of catkin_workspace), so we will follow this convention. You can create these two directories with a single command:
$ mkdir -p ~/catkin_ws/src
Step2:
Next, navigate to the src
directory with the cd command:
$ cd ~/catkin_ws/src
Step3:
initialize the catkin workspace:
$ catkin_init_workspace
Let’s list the contents of the current directory to see what changed.
$ ls -l
Notice that a symbolic link (CMakeLists.txt) has been created to
/opt/ros/kinetic/share/catkin/cmake/toplevel.cmake
Step4:
Return to top level directory
$ cd ~/catkin_ws
Step5:
build the workspace
Note: you must issue this command from within the top level directory (i.e., within catkin_ws
NOT catkin_ws/src
)
$ catkin_make