Creating a package
Any node you create will exist within a package. Hence, to create a node, you first have to create a package (inside your workspace). You will now learn how to create your own packages, and we will see the differences between Python and C++ packages.
But first, what exactly is a package?
What is a ROS 2 package?
A ROS 2 package is a sub-part of your application.
Let’s consider a robotic arm that we want to use to pick up and place objects. Before we create any node, we can try to split this application into several sub-parts, or packages.
We could have one package to handle a camera, another package for the hardware control (motors), and yet another package to compute motion planning for the robot.
Figure 4.1 – Example of a package organization for a robot
Each package is an independent unit, responsible for one sub-part of your application.
Packages are very useful for organizing your nodes, and also...