Skip to content

Commit

Permalink
docs(coding-guidelines): update directory structure (#386)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
isamu-takagi authored Jun 13, 2023
1 parent 64592f2 commit d1cc39a
Showing 1 changed file with 23 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,47 +11,62 @@
├─ config
│ ├─ foo_ros.param.yaml
│ └─ foo_non_ros.yaml
├─ doc
│ ├─ foo_document.md
│ └─ foo_diagram.svg
├─ include
│ └─ <package_name>
│ └─ foo_public.hpp
└─ foo_public.hpp
├─ launch
│ ├─ foo.launch.xml
│ └─ foo.launch.py
├─ schema
│ └─ foo_node.schema.json
├─ src
│ ├─ foo_node.cpp
│ ├─ foo_node.hpp
│ └─ foo_private.hpp
├─ test
│ └─ test_foo.cpp
├─ package.xml
└─ CMakeLists.txt
├─ CMakeLists.txt
└─ README.md
```

### config directory
### Directory descriptions

Place configuration files such as node parameters.
#### `config`

Place configuration files such as node parameters.
For ROS parameters, use the extension `.param.yaml`.
For non-ROS parameters, use the extension `.yaml`.

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.

### include directory
#### `doc`

Place document files and link from README.

#### `include`

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.
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.

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

### launch directory
#### `launch`

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

### src directory
#### `schema`

Place parameter definition files. See [parameters](./parameters.md) for details.

#### `src`

Place source files and private header files.

### test directory
#### `test`

Place source files for testing.

Expand Down

0 comments on commit d1cc39a

Please sign in to comment.