Skip to content

Commit

Permalink
improved flowchart looks
Browse files Browse the repository at this point in the history
  • Loading branch information
mehulgoel873 committed Oct 16, 2024
1 parent 74b2b90 commit a34c0f0
Showing 1 changed file with 59 additions and 38 deletions.
97 changes: 59 additions & 38 deletions docs/architecture/code_flow_detailed.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,73 +2,77 @@
## Scope
The purpose of this file is to outline the desired framework of the auton stack (and the simulator + logging capabilities) of the RD25 software on a file level. This document should be referenced when writing new files for this framework.

The large boxes are ROSNodes. Each individual smaller box is a file. Data within ROSNodes are transferred via function calls, while data between node are transferred via publishers and subscribers.

## Viewing On VSCode
Install `bierne
r.markdown-mermaid` from the extension marketplace to render the charts in VSCode markdown preview.

## Chart!
## Legend
- Green Boxes are marking ros topic gropus, labeled at the top
- Orange boxes are marking ros nodes and their functions
- Hexagonal black boxes are marking the ros topics that the ros nodes subscribe and publish to
- Rectangular black boxes are marking individual files within the ros node and what topics they interact with

## Chart


```mermaid
flowchart LR
subgraph "ROS Topic - Raw State"
self/raw_state
other/raw_state
self/gps
self/encoder_speed
self/stepper_steering
flowchart TB
subgraph RT-RS["ROS Topic - Raw State"]
self/raw_state{{"self/raw_state"}}
other/raw_state{{"other/raw_state"}}
self/gps{{"self/gps"}}
self/encoder_speed{{"self/encoder_speed"}}
self/stepper_steering{{"self/stepper_steering"}}
end
subgraph "ROS Topic - Clean State"
self/state
other/state
subgraph RT-CS["ROS Topic - Clean State"]
self/state{{"self/state"}}
other/state{{"other/state"}}
end
subgraph "ROS Topic - Trajectory"
self/global_traj
self/cur_traj
subgraph RT-TRAJ["ROS Topic - Trajectory"]
self/global_traj{{"self/global_traj"}}
self/cur_traj{{"self/cur_traj"}}
end
subgraph "ROS Topic - Output"
self/steering
subgraph RT-OUT["ROS Topic - Output"]
self/steering{{"self/steering"}}
end
subgraph "ROS Topic - Debug"
self/ins_topics
self/gnss1
self/gnss2
self/firmware_debug
self/sanity
subgraph RT-DEB["ROS Topic - Debug"]
self/ins_topics{{"self/ins_topics "}}
self/gnss1{{"self/gnss1"}}
self/gnss2{{"self/gnss2"}}
self/firmware_debug{{"self/firmware_debug"}}
self/sanity{{"self/sanity"}}
end
subgraph "Serial Node"
subgraph RN-SER["Serial Node"]
ROS_serial_translator
serial_port_parser
end
subgraph "UKF Node"
subgraph RN-UKF["UKF Node"]
UKF
end
subgraph "Buggy State Node"
subgraph RN-STATE["Buggy State Node"]
buggy_state_converter
end
subgraph "Debug Telem Node"
subgraph RN-DEB["Debug Telem Node"]
telemetry
watchdog
end
subgraph "Pathplanner Node - 10 Hz"
subgraph RN-PATH["Pathplanner Node - 10 Hz"]
initialize_trajectory
path_planner
trajectory_wrapper
end
subgraph "Controller Node - 100 Hz"
subgraph RN-CTRL["Controller Node - 100 Hz"]
controller
end
Expand All @@ -82,13 +86,6 @@ flowchart LR
INS --> |"10 Hz"| self/gnss2
INS --> |"10 Hz - SC"| self/gps
ROS_serial_translator --> |"10 Hz - SC"| self/encoder_speed
ROS_serial_translator --> |"10 Hz - SC"| self/stepper_steering
ROS_serial_translator --> |"10 Hz - SC"| other/raw_state
ROS_serial_translator --> |"100 Hz - NAND"| self/raw_state
ROS_serial_translator --> |"100 Hz"| self/firmware_debug
self/steering --> |"100 Hz"| ROS_serial_translator
other/raw_state --> |"10 Hz"| buggy_state_converter
buggy_state_converter --> |"10 Hz"| other/state
self/raw_state --> |"100 Hz"| buggy_state_converter
Expand All @@ -110,5 +107,29 @@ flowchart LR
other/state --> telemetry
self/cur_traj --> telemetry
watchdog --> self/sanity
ROS_serial_translator --> |"10 Hz - SC"| self/encoder_speed
ROS_serial_translator --> |"10 Hz - SC"| self/stepper_steering
ROS_serial_translator --> |"10 Hz - SC"| other/raw_state
ROS_serial_translator --> |"100 Hz - NAND"| self/raw_state
ROS_serial_translator --> |"100 Hz"| self/firmware_debug
self/steering --> |"100 Hz"| ROS_serial_translator
RT-RS:::RT
RT-CS:::RT
RT-TRAJ:::RT
RT-OUT:::RT
RT-DEB:::RT
RN-SER:::RN
RN-UKF:::RN
RN-STATE:::RN
RN-DEB:::RN
RN-PATH:::RN
RN-CTRL:::RN
classDef RT color:#000,fill:#74a57f;
classDef RN color:#000,fill:#ee5622;
linkStyle default stroke-width:3px;
```

0 comments on commit a34c0f0

Please sign in to comment.