diff --git a/docs/departments/perception/clustering_algo.md b/docs/departments/perception/clustering_algo.md
index c00e064..bfb3937 100644
--- a/docs/departments/perception/clustering_algo.md
+++ b/docs/departments/perception/clustering_algo.md
@@ -416,14 +416,14 @@ Despite these, the pipeline provides a strong foundation for autonomous track pe
```mermaid
flowchart TD
- A[LiDAR /velodyne_points] --> B[ROI Filter]
- B --> C[Ground Plane Removal
(via /cluster/plane_model)]
- C --> D[Cluster Non-Ground Points]
- D --> E[Color Classification
(optional)]
- E --> F[Publish ConeArrayWithCovariance
/cones/lidar]
- C --> G[/cluster/filtered_point_cloud]
- D --> H[/cluster/cluster_cloud]
- A --> I[/cluster/ransac_point_cloud]
+ A["LiDAR /velodyne_points"] --> B["ROI Filter"]
+ B --> C["Ground Plane Removal
(via /cluster/plane_model)"]
+ C --> D["Cluster Non-Ground Points"]
+ D --> E["Color Classification
(optional)"]
+ E --> F["Publish ConeArrayWithCovariance
/cones/lidar"]
+ C --> G["/cluster/filtered_point_cloud"]
+ D --> H["/cluster/cluster_cloud"]
+ A --> I["/cluster/ransac_point_cloud"]
```
---
diff --git a/docs/guidelines/documentation.md b/docs/guidelines/documentation.md
index 64de3c9..6911d0e 100644
--- a/docs/guidelines/documentation.md
+++ b/docs/guidelines/documentation.md
@@ -14,6 +14,31 @@
- Always include meaningful alt text for accessibility
- Store images in the `media/` directory relative to your markdown file
+#### Adding diagrams
+
+- [Mermaid](https://mermaid.ai/open-source) can be used to easily create diagrams to explain systems, create flowcharts, etc.
+- In order to add a Mermaid diagram into a page:
+ 1. Start a new line with triple backticks and the codeword `mermaid`.
+ 2. Type the diagram using the Mermaid syntax
+ 3. End on a new line with triple backticks
+- For example:
+````markdown
+```mermaid
+graph LR
+ hello --> world
+ world --> again
+ again --> hello
+```
+````
+Becomes
+```mermaid
+graph LR
+ hello --> world
+ world --> again
+ again --> hello
+```
+- Reference the [Mermaid documentation](https://mermaid.ai/open-source/intro/) to learn more about how you can use Mermaid.
+
### Keeping Documentation up to Date
In general you will encounter cases where documentation is inadequate / out of date when people start complaining or asking questions. It can be very easy to issue a temporary fix or give a verbal explanation in this case but it's always best to incorporate such issues in the docs.
diff --git a/mkdocs.yml b/mkdocs.yml
index 5f391b7..54fa858 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -44,7 +44,11 @@ markdown_extensions:
- attr_list
- footnotes
- pymdownx.details
- - pymdownx.superfences
+ - pymdownx.superfences:
+ custom_fences:
+ - name: mermaid
+ class: mermaid
+ format: !!python/name:mermaid2.fence_mermaid_custom
- md_in_html
- pymdownx.tabbed:
alternate_style: true
@@ -69,6 +73,7 @@ plugins:
custom_format: "%b %d, %Y" # e.g. "Oct 17, 2025"
timezone: Europe/Dublin
locale: en
+ - mermaid2
nav: # This is the structure of the sidebar
diff --git a/requirements.txt b/requirements.txt
index d840699..76b655d 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -14,4 +14,6 @@ mkdocs-material-extensions>=1.3
#Zoom in for pictures
mkdocs-glightbox
+# Mermaid diagrams plugin
+mkdocs-mermaid2-plugin