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

This commit is contained in:
winterhalderp 2021-04-20 11:34:44 +02:00
parent f705aec1d6
commit 02b00f8981

View File

@ -29,10 +29,10 @@ The next chapters will describe the content of the files inside a package direct
## 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
The file `<colcon_ws>/<package_dir>/setup.py` defines how you can call your scripts using a self defined in the command line. This results in commands such as
`ros2 run pubsub talker`
`ros2 run pubsub listener`.
This is done by linking the names _talker_ and _listener_ to the Python scripts of your choice, eg.
This is done by linking the correct Python scripts to the names _talker_ and _listener_ using the file _setup.py_, eg.
```python
entry_points={
'console_scripts': [
@ -41,4 +41,4 @@ entry_points={
],
},
```
From this you can see that you need to follow the Python programming style of creating a _main_ procedure, in order for the entry point to work.
From this you can see that you need to follow the Python programming style of creating a _main_ procedure, in order for the entry points to work.