Project Structure
Folder organization and module layout
Project Structure
Overview of the OctoMY™ project folder organization and module layout.
Top-Level Folders
.
├── content/ # Documentation, design assets, website
├── integration/ # Build, deployment, CI/CD scripts
├── src/ # Source code
├── test/ # Unit and integration tests
├── LICENSE
├── MANDATE
├── OctoMY.qbs # Main Qbs project file
├── probes.qbs
└── README.md
Content Directory
content/
├── design/ # Design assets
│ ├── icons.svg
│ └── ux.svg
├── doc/ # Documentation (this site)
│ ├── api/ # Generated API docs
│ ├── explanation/ # Conceptual documentation
│ ├── howto/ # Task-oriented guides
│ ├── internal/ # Internal developer docs
│ ├── reference/ # Technical reference
│ ├── specs/ # Design specifications
│ └── tutorials/ # Learning-oriented guides
└── website/ # Website templates
Integration Directory
integration/
├── android/ # Android build scripts
├── deb/ # Debian package generation
│ └── make_deb.sh
├── doc/ # Documentation build scripts
│ ├── build_docs.sh
│ └── sync_docs.sh
├── docker/ # Docker build environment
│ └── build.sh
├── local/ # Local development tools
│ └── octomy.service
└── qbs/ # Qbs build modules
└── imports/
├── App.qbs
├── Lib.qbs
├── Test.qbs
└── utils.js
Source Directory
src/
├── agent/ # Agent application
├── hub/ # Hub application
├── remote/ # Remote application
├── zoo/ # Zoo server application
├── testapp/ # Test application
├── libs/ # Shared libraries
│ ├── libagent/ # Agent node implementation
│ ├── libapp/ # Application framework
│ ├── libardumy/ # Arduino controller protocol
│ ├── libcomms/ # Communication system
│ ├── libid/ # Identity and personality
│ ├── libnode/ # Base node class
│ ├── libpair/ # Discovery and pairing
│ ├── libplan/ # Plan/OPAL execution
│ ├── libwidgets/ # UI components
│ └── ... # (40+ libraries)
├── apps.qbs
├── libs.qbs
└── OctoMY.qdocconf
Library Organization
Libraries are organized by function:
Core Libraries
| Library | Purpose |
|---|---|
libapp |
Application framework, context, settings |
libnode |
Base Node class shared by all node types |
libservice |
Service lifecycle management |
libutil |
Common utilities |
Node Type Libraries
| Library | Purpose |
|---|---|
libagent |
Agent-specific functionality |
libhub |
Hub-specific functionality |
libremote |
Remote-specific functionality |
libzoo |
Zoo server functionality |
Communication Libraries
| Library | Purpose |
|---|---|
libcomms |
Core communication protocol |
libpair |
Discovery and pairing |
libclient |
Client connection handling |
libzooclient |
Zoo server client |
Hardware Libraries
| Library | Purpose |
|---|---|
libardumy |
ArduMY controller protocol |
libhardware |
Hardware abstraction |
libpuppet |
Pose and puppet control |
Identity and Security
| Library | Purpose |
|---|---|
libid |
Identity, personality, identicons |
libsec |
Security utilities |
libqpolarssl |
Cryptography (mbedTLS wrapper) |
librng |
Random number generation |
UI Libraries
| Library | Purpose |
|---|---|
libwidgets |
Common UI components |
libstyle |
OctoMY visual style |
libmap |
Map display (QMapControl) |
libhud |
Flight instrument widgets |
Plan and Automation
| Library | Purpose |
|---|---|
libplan |
Plan storage and management |
libeval |
Expression evaluation |
libtrigger |
Event triggers |
Test Directory
test/
├── new_test.sh # Script to create new tests
├── templates/ # Test templates
│ ├── testTemplate/
│ ├── stressTemplate/
│ └── profileTemplate/
├── testComms/ # Communication tests
├── testDiscovery/ # Discovery tests
├── testPairing/ # Pairing tests
└── ... # (100+ test folders)
Each test has its own folder with:
TestName.cpp- Test implementationTestName.hpp- Test class headertest.qbs- Build file
Peers (Applications)
The project contains 4 main peer applications:
Agent ("The Robot")
Software running on-board a robot (e.g., mobile phone). Purpose:
- Directly manipulate actuators
- Read sensors
- Operate autonomously, take remote commands, or take hub commands
src/agent/
├── AgentMain.cpp
├── AgentMain.hpp
├── app.qbs
└── README.md
Hub ("The Brain")
Software running in the cloud or on a desktop. Purpose:
- Heavy computing resources (SLAM, image processing)
- Central data hub for robot flocks
- Coordination between nodes
src/hub/
├── HubMain.cpp
├── HubMain.hpp
└── app.qbs
Remote ("The Control")
Software running on a remote control device (e.g., phone). Purpose:
- Take user input for robot control
- Display real-time data from robots/hub
src/remote/
├── RemoteMain.cpp
├── RemoteMain.hpp
└── app.qbs
Zoo ("The Server")
Discovery and coordination server. Purpose:
- Help nodes find each other across NAT
- Provide social features for robots
src/zoo/
├── ZooMain.cpp
├── ZooMain.hpp
└── app.qbs
Code Sharing
Since all peers are written in the same codebase, it's easy to move or duplicate features between them.
Example: If robot hardware is powerful enough for SLAM, invoke SLAM from Agent directly instead of Hub.
Build System
OctoMY™ uses Qbs (Qt Build Suite):
| File | Purpose |
|---|---|
OctoMY.qbs |
Main project file |
probes.qbs |
System probes |
src/apps.qbs |
Application builds |
src/libs.qbs |
Library builds |
integration/qbs/imports/ |
Build helpers |