diff --git a/non-ros-files/Programming_Rules.md b/non-ros-files/Programming_Rules.md index 50db9ea..e8721e3 100644 --- a/non-ros-files/Programming_Rules.md +++ b/non-ros-files/Programming_Rules.md @@ -61,3 +61,9 @@ The file _package.xml_ is used to link dependencies to this package. For example | | pubsub <---- depends on *.msg files ----< pubsub_msg ``` + +This is also done in the background when creating a new package and defining dependencies +`ros2 pkg create --dependencies [deps]` +for example +`ros2 pkg create pubsub_2 --dependencies std_msgs` +This command creates the new package `pubsub_2` but already links it to the ROS standard messages `std_msgs` so they are available.