Skip to content

System Architecture

Chenhao Wu edited this page Jun 24, 2021 · 6 revisions

1. Hardware Setup

The demo system is composed of 4 Lamppost Node and 1 Auto-car node.

1.1: Each lamppost node contains:

  • 1 x Host Machine (5512)
  • 1 x Raspberry PI (equipped with 2 x ZigBee CC2520 communication module)
  • 2 x Camera (accessible via RTSP video stream)

The detailed configuration is shown in the following figure:

Lamppost Node Architecture

1.2: The auto-car node contains:

  • 1 x Raspberry PI (equipped with 2 x ZigBee CC2520 communication module)
  • 1 x Laptop / Computer (use for route planning and movement control, etc.)

2. Software Architecture

The entire system consists of 3 sub-programs:

  • Lamppost Host Program (runs on the root node and slave node)
    • Source files are placed under <proj_root>/src/LPHost directory
  • Lamppost Hook Program (runs on RaspberryPI of the root node)
    • Source files are placed under <proj_root>/src/LPHook directory
  • Control Program (runs on the auto-car node)
    • Ssource files are placed under <proj_root>/src/Ctrl directory

The interactive behavior of each module is illustrated in the diagram below.

AutocarSysArch


3. Module Design

3.1 Lamppost Host Program (LHP)

LHP is deployed onto all of the Lamppost Node. The primary functionalities of LHP is detecting the GPS coordinates of Road Blocks obtained from the video stream and sent the detected GPS coordinates to the root node (excluding the general-purpose subroutines, i.e., the subroutine to parse the command line arguments, configuration files and etc).

The Lamppost Host program initials with 3 child threads in slave node and 5 threads on root node (as root node need to communicate with hook node and interact with user input):

  • Thread to detect road blocks from video stream
    • Related routine is implemented in <proj_root>/src/LPHost/LamppostHostRBDetection.cc
    • GPS coordinates of road blocks are enqueued in LamppostHostProg->RoadBlockCoordinates after the detection routine finished
  • Thread to send coordinates of detect road blocks to the root node
    • Related routine is implemented in <proj_root>/src/LPHost/LamppostHostCommPanel.cc: LamppostHostSendThread()
  • Thread to receive control signals (receive thread of slave lampposts)
  • Thread to receive obtained RBCoordinates from slave lampposts (receive thread of root lamppost)
  • Thread to receive control messages from user input (on root lamppost)
  • Thread to send to obtained RBCoordinates to hook node (launch only on root lamppost)

3.2 Lamppost Hook Program

3.3 Control Program

Clone this wiki locally