Skip to content

Commit d1cc39a

Browse files
authored
docs(coding-guidelines): update directory structure (#386)
* docs: update directory structure Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> * update Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> * update directory descriptions Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> --------- Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
1 parent 64592f2 commit d1cc39a

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

docs/contributing/coding-guidelines/ros-nodes/directory-structure.md

+23-8
Original file line numberDiff line numberDiff line change
@@ -11,47 +11,62 @@
1111
├─ config
1212
│ ├─ foo_ros.param.yaml
1313
│ └─ foo_non_ros.yaml
14+
├─ doc
15+
│ ├─ foo_document.md
16+
│ └─ foo_diagram.svg
1417
├─ include
1518
│ └─ <package_name>
16-
│ └─ foo_public.hpp
19+
└─ foo_public.hpp
1720
├─ launch
1821
│ ├─ foo.launch.xml
1922
│ └─ foo.launch.py
23+
├─ schema
24+
│ └─ foo_node.schema.json
2025
├─ src
2126
│ ├─ foo_node.cpp
2227
│ ├─ foo_node.hpp
2328
│ └─ foo_private.hpp
2429
├─ test
2530
│ └─ test_foo.cpp
2631
├─ package.xml
27-
└─ CMakeLists.txt
32+
├─ CMakeLists.txt
33+
└─ README.md
2834
```
2935

30-
### config directory
36+
### Directory descriptions
3137

32-
Place configuration files such as node parameters.
38+
#### `config`
3339

40+
Place configuration files such as node parameters.
3441
For ROS parameters, use the extension `.param.yaml`.
3542
For non-ROS parameters, use the extension `.yaml`.
3643

3744
Rationale: Since ROS parameters files are type-sensitive, they should not be the target of some code formatters and linters. In order to distinguish the file type, we use different file extensions.
3845

39-
### include directory
46+
#### `doc`
47+
48+
Place document files and link from README.
49+
50+
#### `include`
4051

4152
Place header files exposed to other packages. Do not place files directly under the `include` directory, but place files under the directory with the package name.
4253
This directory is used for mostly library headers. Note that many headers do not need to be placed here. It is enough to place the headers under the `src` directory.
4354

4455
Reference: <https://docs.ros.org/en/rolling/How-To-Guides/Ament-CMake-Documentation.html#adding-files-and-headers>
4556

46-
### launch directory
57+
#### `launch`
4758

4859
Place launch files (`.launch.xml` and `.launch.py`).
4960

50-
### src directory
61+
#### `schema`
62+
63+
Place parameter definition files. See [parameters](./parameters.md) for details.
64+
65+
#### `src`
5166

5267
Place source files and private header files.
5368

54-
### test directory
69+
#### `test`
5570

5671
Place source files for testing.
5772

0 commit comments

Comments
 (0)