Standalone Diagram Exports

Diagram sources live in software/docs/diagrams/*.mmd. PDF exports are generated automatically on every docs build (incremental — only changed diagrams are re-rendered).

Quick start

cd ~/fishing-bot/software/docs
npm ci                    # one-time: installs @mermaid-js/mermaid-cli
./build.sh                # exports PDFs + builds HTML
# PDFs: exports/pdf/*.pdf

PDF-only, no HTML:

make diagrams-pdf

Built site + report copies

Format

Location

Mermaid source

diagrams/*.mmd (git)

PDF (LaTeX)

exports/pdf/*.pdf (generated)

PDF (downloadable)

_static/diagrams/*.pdf (copied on export)

HTML render

inline on Simulation ROS 2 Graph, Hardware ROS 2 Graph, etc.

These Mermaid source files are copied into the built site at _static/diagrams/ during every docs build. Use them directly in reports, presentations, or mermaid.live.

Note

The HTML site renders the same diagrams inline via sphinxcontrib-mermaid. The .mmd files are the portable, version-controlled source of truth.

Diagram file

Description

Repo source

Built site copy

control_loop.mmd

Closed-loop tension control (mode-agnostic)

software/docs/diagrams/control_loop.mmd

_static/diagrams/control_loop.mmd (after build)

fishing_state_machine.mmd

Controller state machine (MONITOR/HOOK/REGULATE)

software/docs/diagrams/fishing_state_machine.mmd

_static/diagrams/fishing_state_machine.mmd (after build)

hardware_data_flow.mmd

Hardware sensing/actuation chain below ROS

software/docs/diagrams/hardware_data_flow.mmd

_static/diagrams/hardware_data_flow.mmd (after build)

hardware_ros2_graph.mmd

Full ROS 2 graph — Dynamixel hardware mode

software/docs/diagrams/hardware_ros2_graph.mmd

_static/diagrams/hardware_ros2_graph.mmd (after build)

package_architecture.mmd

Package dependencies and launch delegation

software/docs/diagrams/package_architecture.mmd

_static/diagrams/package_architecture.mmd (after build)

sim_data_flow.mmd

MuJoCo physics chain below the ROS layer

software/docs/diagrams/sim_data_flow.mmd

_static/diagrams/sim_data_flow.mmd (after build)

simulation_ros2_graph.mmd

Full ROS 2 graph — MuJoCo simulation mode

software/docs/diagrams/simulation_ros2_graph.mmd

_static/diagrams/simulation_ros2_graph.mmd (after build)

Export to SVG/PNG for LaTeX reports

After ./docs/build.sh, downloadable Mermaid sources are at docs/_build/html/_static/diagrams/*.mmd.

Install Mermaid CLI (npm i -g @mermaid-js/mermaid-cli) then:

cd software/docs
for f in diagrams/*.mmd; do
  mmdc -i "$f" -o "exports/$(basename "${f%.mmd}").svg"
done

Or paste any .mmd file into mermaid.live and export PNG/SVG from the editor.