From 09f138a25365ba8016cb2f3b8a219ec070a21cef Mon Sep 17 00:00:00 2001 From: Elvin Yang Date: Wed, 21 Feb 2024 13:50:09 -0500 Subject: [PATCH] Add ARCHITECTURE.md --- ARCHITECTURE.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 ARCHITECTURE.md diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md new file mode 100644 index 0000000..8cc69a2 --- /dev/null +++ b/ARCHITECTURE.md @@ -0,0 +1,41 @@ +# Package Organization + +This repository is a ROS 2 wrapper around the Ultralytics YOLOv8 library. As is +standard with learning-based Python packages, a virtual environment is used to +avoid Python dependency conflicts with other packages on the system. Virtual +environments appear to be incompatible with the standard ROS 2 Python package +architecture, thus `ament_cmake` is used instead of `ament_python`. + +## Virtual Environment Specification + +`pyproject.toml`, `poetry.lock`, and `poetry.toml` are used by the Poetry +dependency manager to set up a virtual environment. `pyproject.toml` contains +the editable list of Python dependencies used by the package. In general, +`poetry.lock` and `poetry.toml` do not need to be manually edited. + +## `yolov8_ros/` + +This folder contains this package's ROS 2 nodes. ROS 2 nodes are implemented as +modules with the suffix `_node` and must contain a `main()` function that can +accept zero arguments. Nodes are not meant to be imported by other Python +modules. `parameters.py` contains the sets of ROS 2 parameters declared by each +node and their accompanying documentation. + +## ROS 2 Files + +### Package and Build System Files + +`package.xml` is a required ROS 2 package specification file. + +`CMakeLists.txt` defines where files and folders in this repository are copied +or linked during the ROS 2 workspace build and install process. + +### Runtime Files + +`launch/` contains ROS 2 launch files. + +`scripts/python_entrypoint.py` is an internal script used to run Python modules +within the virtual environment from launch files. See additional documentation +at the top of this file. + +`rviz2/` contains saved configuration files for the `rviz2` tool.