You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/_09_development/_develop_guide/_develop_guide/_develop_new_pkg.rst
+148-90
Original file line number
Diff line number
Diff line change
@@ -4,44 +4,105 @@
4
4
Developing a New Package
5
5
------------------------
6
6
7
-
TDB
8
-
9
-
10
-
11
7
.. _development_guide_new_pkg_architecture:
12
8
13
9
Architecture of a New Package
14
10
=============================
15
11
16
-
Every new package should have the following architecture:
12
+
Structure of a C++ Package
13
+
--------------------------
14
+
15
+
Every new C++ package should have the following architecture:
16
+
17
+
.. code-block::
18
+
19
+
/package_name
20
+
/include
21
+
/package_name
22
+
### header files ###
23
+
node_name(.hpp)
24
+
/launch
25
+
/src
26
+
### implementation_files ###
27
+
node_name(.cpp)
28
+
### main_files ###
29
+
node_name_node(.cpp)
30
+
/tests
31
+
CMakeLists.txt
32
+
### test_files ###
33
+
gtest_test(.cpp)
34
+
CmakeLists.txt
35
+
package.xml
36
+
README.md
37
+
LICENSE
38
+
CONTRIBUTING.md
39
+
.gitignore
40
+
41
+
Structure of a Python Package
42
+
-----------------------------
43
+
44
+
Every new Python package should have the following architecture:
17
45
18
46
.. code-block::
19
47
20
48
/package_name
21
-
/include
22
49
/package_name
23
-
header_files(.hpp)
24
-
/launch
25
-
/src
26
-
implementation_files(.cpp)
27
-
main_files(.cpp)
28
-
/tests
29
-
CMakeLists.txt
30
-
test_files(.cpp)
31
-
CmakeLists.txt
32
-
package.xml
33
-
Readme.md
34
-
.gitignore
50
+
__init__.py
51
+
### source_files ###
52
+
file(.py)
53
+
/launch
54
+
/tests
55
+
### test_files ###
56
+
test(.py)
57
+
setup.cfg
58
+
setup.py
59
+
package.xml
60
+
README.md
61
+
LICENSE
62
+
CONTRIBUTING.md
63
+
.gitignore
64
+
65
+
Structure of a Hybrid Package
66
+
-----------------------------
67
+
68
+
A package that includes both Python and C++ files should have the following architecture:
35
69
70
+
.. code-block::
36
71
72
+
/package_name
73
+
/package_name
74
+
__init__.py
75
+
### python_source_files ###
76
+
file(.py)
77
+
/include
78
+
/package_name
79
+
### C++ header files ###
80
+
node_name(.hpp)
81
+
82
+
/launch
83
+
/src
84
+
### C++ implementation_files ###
85
+
node_name(.cpp)
86
+
### C++ main_files ###
87
+
node_name_node(.cpp)
88
+
/tests
89
+
### test_files ###
90
+
test(.py)
91
+
CMakeList.txt
92
+
package.xml
93
+
README.md
94
+
LICENSE
95
+
CONTRIBUTING.md
96
+
.gitignore
37
97
38
98
.. _development_guide_new_pkg_code_style:
39
99
40
100
Code Style
41
101
==========
42
102
43
-
Aerostack2 follows the `ROS 2 code style and language versions <https://docs.ros.org/en/humble/The-ROS2-Project/Contributing/Code-Style-Language-Versions.html>`_.
44
-
103
+
Aerostack2 mainly follows the `ROS 2 code style and language versions <https://docs.ros.org/en/humble/The-ROS2-Project/Contributing/Code-Style-Language-Versions.html>`_.
104
+
There are, though, some exceptions, as ROS 2 claims to follow Goggle code style but uses snake_case
105
+
instead of camelCase. Aerostack2 uses camelCase.
45
106
46
107
47
108
.. _development_guide_new_pkg_code_style_c++:
@@ -55,37 +116,33 @@ Every file should start with the Licence text, which looks like this:
0 commit comments