Catkin Workspaces and Packages
This is the last step before coding your first application and program for robots. You have to set up your working environment. To do this, you are going to learn what catkin workspaces and packages are and how to work with them.
A catkin workspace is a ROS directory where catkin packages can be created, compiled, and run. A catkin package is a container for creating ROS nodes and applications. Each of these packages work as a single project that can contain multiple nodes. It is important to know that the ROS code inside catkin packages can only be Python or C++.
Now, let's see how to create the catkin workspace:
Note
Execute these commands in the same terminal window.
- Create a standard folder containing a subfolder named "src." You can choose any location on your system:
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws
- Switch to the new catkin_ws directory and run the catkin compilation command to initialize the new workspace:
catkin_make
This command...