Update 'non-ros-files/Programming_Rules.md'

This commit is contained in:
winterhalderp 2021-04-20 11:31:23 +02:00
parent 70b7f6b7ca
commit f705aec1d6

View File

@ -23,6 +23,10 @@ colcon_workspace/
|- pubsub/
|- pubsub_msg/
```
The `src` directory is also the place where you create your new packages using `ros2 pkg create ...` and not in the root of the workspace.
The next chapters will describe the content of the files inside a package directory. However, the occuring files depend on the type of package (`ament_cmake` for C++ scripts or `ament_python` for Python scripts). This is described in detail [here](https://docs.ros.org/en/foxy/Tutorials/Creating-Your-First-ROS2-Package.html). The following chapters only describe Python packages.
## setup.py
The file `<colcon_ws>/<package_dir>/setup.py` defines how to call your scripts using the command line. This results in commands such as