# sreyanmbasu/lab3 architecture

> Architecture diagram of the GitHub repository sreyanmbasu/lab3, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sreyanmbasu/lab3
- Repository: https://github.com/sreyanmbasu/lab3

## Overview

This is a Lab 3 robotics coursework repository with two independent work paths: Step 1 analyzes motion-capture data and rotation representations, while Step 2 visualizes a Metafly in ROS 2. In the demonstrated ROS workflow, the launch file starts a transform publisher and robot visualization nodes; the publisher repeatedly converts recorded pose data into a world-to-base transform. The Python analysis excerpt shows CSV loading and a main entry point, but many calculations remain TODOs. MATLAB and other description assets are represented from the tree; their internal connections were not sampled.

Main entry points: [`ws3/src/metafly_description/launch/metafly.launch.py`](https://github.com/sreyanmbasu/lab3/blob/main/ws3/src/metafly_description/launch/metafly.launch.py) (Simulation Launch), [`ws3/src/metafly_tf_pub/metafly_tf_pub/metafly_tf_pub.py`](https://github.com/sreyanmbasu/lab3/blob/main/ws3/src/metafly_tf_pub/metafly_tf_pub/metafly_tf_pub.py) (TF Publisher), [`Step1/Python/Step1.py`](https://github.com/sreyanmbasu/lab3/blob/main/Step1/Python/Step1.py) (Pose Analysis), [`Step1/Python/mocap_data.csv`](https://github.com/sreyanmbasu/lab3/blob/main/Step1/Python/mocap_data.csv) (Mocap Data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_analysis["Step 1 Analysis"]
  node_pyanalysis["Pose Analysis<br/>[Step1.py]"]
  node_pydata["Mocap Data<br/>[mocap_data.csv]"]
  node_matlabexercise["MATLAB Exercises<br/>[Lab3_StarterCode.m]"]
  node_matlabrot["Rotation Functions"]
  node_matlabdata["MATLAB Mocap Data<br/>[mocap_data.csv]"]
end

subgraph group_ros["ROS 2 Visualization"]
  node_launch["Simulation Launch<br/>[metafly.launch.py]"]
  node_publisher["TF Publisher<br/>[metafly_tf_pub.py]"]
  node_rosdata["Publisher Mocap Data<br/>[mocap_data.csv]"]
  node_tf["TF Broadcaster"]
  node_robotstate["Robot State Publisher"]
  node_jointstate["Joint State Publisher"]
  node_rviz["RViz"]
end

subgraph group_model["Robot Description"]
  node_description["Metafly URDF<br/>[metafly.urdf.xacro]"]
  node_macro["Robot Macro"]
  node_materials["Model Materials<br/>[materials.xacro]"]
  node_rvizconfig["RViz Config<br/>[metafly.rviz]"]
end

node_student(("Lab User"))
node_rosuser(("ROS Operator"))

node_student -->|"runs analysis"| node_pyanalysis
node_pyanalysis -->|"reads CSV"| node_pydata
node_rosuser -->|"starts simulation"| node_launch
node_launch -->|"starts node"| node_publisher
node_publisher -->|"reads CSV"| node_rosdata
node_publisher -->|"broadcasts transform"| node_tf
node_launch -->|"starts node"| node_robotstate
node_launch -->|"starts node"| node_jointstate
node_launch -->|"starts node"| node_rviz
node_launch -->|"expands xacro"| node_description
node_launch -->|"loads config"| node_rvizconfig

click node_pyanalysis "https://github.com/sreyanmbasu/lab3/blob/main/Step1/Python/Step1.py"
click node_pydata "https://github.com/sreyanmbasu/lab3/blob/main/Step1/Python/mocap_data.csv"
click node_matlabexercise "https://github.com/sreyanmbasu/lab3/blob/main/MATLAB%20Solution/Lab3_StarterCode.m"
click node_matlabrot "https://github.com/sreyanmbasu/lab3/blob/main/MATLAB%20Solution/ECE569_MatrixLog3.m"
click node_matlabdata "https://github.com/sreyanmbasu/lab3/blob/main/MATLAB%20Solution/mocap_data.csv"
click node_launch "https://github.com/sreyanmbasu/lab3/blob/main/ws3/src/metafly_description/launch/metafly.launch.py"
click node_publisher "https://github.com/sreyanmbasu/lab3/blob/main/ws3/src/metafly_tf_pub/metafly_tf_pub/metafly_tf_pub.py"
click node_rosdata "https://github.com/sreyanmbasu/lab3/blob/main/ws3/src/metafly_tf_pub/resource/mocap_data.csv"
click node_description "https://github.com/sreyanmbasu/lab3/blob/main/ws3/src/metafly_description/urdf/metafly.urdf.xacro"
click node_macro "https://github.com/sreyanmbasu/lab3/blob/main/ws3/src/metafly_description/urdf/metafly_macro.xacro"
click node_materials "https://github.com/sreyanmbasu/lab3/blob/main/ws3/src/metafly_description/urdf/materials.xacro"
click node_rvizconfig "https://github.com/sreyanmbasu/lab3/blob/main/ws3/src/metafly_description/rviz/metafly.rviz"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_pyanalysis,node_pydata,node_matlabexercise,node_matlabrot,node_matlabdata,node_student toneBlue
class node_launch,node_publisher,node_rosdata,node_tf,node_robotstate,node_jointstate,node_rviz toneAmber
class node_description,node_macro,node_materials,node_rvizconfig toneMint
class node_rosuser toneIndigo
```

## Components

### Step 1 Analysis

- [Pose Analysis](https://github.com/sreyanmbasu/lab3/blob/main/Step1/Python/Step1.py): `Step1/Python/Step1.py`
- [Mocap Data](https://github.com/sreyanmbasu/lab3/blob/main/Step1/Python/mocap_data.csv): `Step1/Python/mocap_data.csv`
- [MATLAB Exercises](https://github.com/sreyanmbasu/lab3/blob/main/MATLAB%20Solution/Lab3_StarterCode.m): `MATLAB Solution/Lab3_StarterCode.m`
- [Rotation Functions](https://github.com/sreyanmbasu/lab3/blob/main/MATLAB%20Solution/ECE569_MatrixLog3.m): `MATLAB Solution/ECE569_MatrixLog3.m`
- [MATLAB Mocap Data](https://github.com/sreyanmbasu/lab3/blob/main/MATLAB%20Solution/mocap_data.csv): `MATLAB Solution/mocap_data.csv`

### ROS 2 Visualization

- [Simulation Launch](https://github.com/sreyanmbasu/lab3/blob/main/ws3/src/metafly_description/launch/metafly.launch.py): `ws3/src/metafly_description/launch/metafly.launch.py`
- [TF Publisher](https://github.com/sreyanmbasu/lab3/blob/main/ws3/src/metafly_tf_pub/metafly_tf_pub/metafly_tf_pub.py): `ws3/src/metafly_tf_pub/metafly_tf_pub/metafly_tf_pub.py`
- [Publisher Mocap Data](https://github.com/sreyanmbasu/lab3/blob/main/ws3/src/metafly_tf_pub/resource/mocap_data.csv): `ws3/src/metafly_tf_pub/resource/mocap_data.csv`
- **TF Broadcaster**
- **Robot State Publisher**
- **Joint State Publisher**
- **RViz**

### Robot Description

- [Metafly URDF](https://github.com/sreyanmbasu/lab3/blob/main/ws3/src/metafly_description/urdf/metafly.urdf.xacro): `ws3/src/metafly_description/urdf/metafly.urdf.xacro`
- [Robot Macro](https://github.com/sreyanmbasu/lab3/blob/main/ws3/src/metafly_description/urdf/metafly_macro.xacro): `ws3/src/metafly_description/urdf/metafly_macro.xacro`
- [Model Materials](https://github.com/sreyanmbasu/lab3/blob/main/ws3/src/metafly_description/urdf/materials.xacro): `ws3/src/metafly_description/urdf/materials.xacro`
- [RViz Config](https://github.com/sreyanmbasu/lab3/blob/main/ws3/src/metafly_description/rviz/metafly.rviz): `ws3/src/metafly_description/rviz/metafly.rviz`

### Other components

- **Lab User**
- **ROS Operator**

## Connections

- Lab User → Pose Analysis: runs analysis (evidence: `Step1/Python/Step1.py`)
- Pose Analysis → Mocap Data: reads CSV (evidence: `Step1/Python/Step1.py`)
- ROS Operator → Simulation Launch: starts simulation (evidence: `ws3/src/metafly_description/launch/metafly.launch.py`)
- Simulation Launch → TF Publisher: starts node (evidence: `ws3/src/metafly_description/launch/metafly.launch.py`)
- TF Publisher → Publisher Mocap Data: reads CSV (evidence: `ws3/src/metafly_tf_pub/metafly_tf_pub/metafly_tf_pub.py`)
- TF Publisher → TF Broadcaster: broadcasts transform (evidence: `ws3/src/metafly_tf_pub/metafly_tf_pub/metafly_tf_pub.py`)
- Simulation Launch → Robot State Publisher: starts node (evidence: `ws3/src/metafly_description/launch/metafly.launch.py`)
- Simulation Launch → Joint State Publisher: starts node (evidence: `ws3/src/metafly_description/launch/metafly.launch.py`)
- Simulation Launch → RViz: starts node (evidence: `ws3/src/metafly_description/launch/metafly.launch.py`)
- Simulation Launch → Metafly URDF: expands xacro (evidence: `ws3/src/metafly_description/launch/metafly.launch.py`)
- Simulation Launch → RViz Config: loads config (evidence: `ws3/src/metafly_description/launch/metafly.launch.py`)
