Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge lavida (7.6.0) branch into master #595

Merged
merged 30 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
842aa5b
V2XHub / CARMA Streets to process and broadcast SSM (#533)
dan-du-car May 24, 2023
4528b26
modified: src/v2i-hub/ImmediateForwardPlugin/manifest.json (#541)
jwillmartin Jun 16, 2023
37eeb9b
Routable metadata (#545)
jwillmartin Jul 5, 2023
b708d32
updated initialization script for amd64 and arm64. (#546)
gainesaw Jul 5, 2023
1c5a862
CARMA Streets Plugin Kafka Consumers (#547)
dan-du-car Jul 7, 2023
639ad08
modified: initialization.sh (#548)
jwillmartin Jul 10, 2023
e81bdc0
update dockercompose files to point latest images and syc with 7.5.1 …
SaikrishnaBairamoni Jul 19, 2023
b3be4ff
Sync develop with master branch for Xil release (#553)
paulbourelly999 Jul 19, 2023
77127e2
Issue-549: Moved Kafka time producer from CDASimAdapter to CARMA-Stre…
paulbourelly999 Jul 20, 2023
678784c
Streets MOSAIC integration: CDASimAdapter register with Simulation am…
dan-du-car Jul 27, 2023
d4a370f
MOSAIC-CARMA-Streets: CDASimAdapter listens on port for incoming Simu…
dan-du-car Jul 28, 2023
f4a2e61
V2xHub: Update the code for ASN1.c parser to recognize SDSM message t…
dan-du-car Aug 10, 2023
e1b7cf8
Fixed spelling of SemanticLidar sensors in test config file (#556)
paulbourelly999 Aug 16, 2023
aae33e6
Fix CARMAStreets Plugin undefined behavior for Kafka Producer (#559)
paulbourelly999 Aug 24, 2023
2079d64
Added conversion between ASN.1 and JSON for SDSM (#560)
willjohnsonk Aug 28, 2023
746e8e6
Temporary fix for TimeSyncMessage invalid json serialization
paulbourelly999 Sep 7, 2023
a8c58fe
Temporary fix for TimeSyncMessage invalid json serialization (#563)
willjohnsonk Sep 8, 2023
5328f89
Added conversion between JSON and ASN.1 C-struct for SDSM with Kafka …
willjohnsonk Sep 11, 2023
a098635
Rsu health monitor (#564)
dan-du-car Nov 14, 2023
774b31f
v2x hub Integration: Implement telematic plugin to subscribe to all T…
dan-du-car Nov 21, 2023
6b604b7
Telematic bridge nats (#567)
dan-du-car Nov 30, 2023
40d8b14
Telematic bridge: Fix available topic return null value in topics fie…
dan-du-car Dec 7, 2023
ada57ac
Fix SDSM encoding in CARMA Streets Plugin (#571)
paulbourelly999 Dec 18, 2023
70e798b
Fix/json serialization detected object (#573)
paulbourelly999 Dec 20, 2023
136439a
Added SDSM to immediate forward plugin configuration (#574)
paulbourelly999 Jan 11, 2024
623713b
CDAR-756: Update UDPSockets to listen at higher frequency (#579)
paulbourelly999 Feb 6, 2024
84251ed
update dockercompose files to point lavida candidate images
SaikrishnaBairamoni Feb 10, 2024
5525e53
vh-1277: Fix README and install nats.c version (#586)
paulbourelly999 Mar 21, 2024
6d60d91
add time sync logs (#583)
MishkaMN Mar 21, 2024
bce7236
Update version to 7.6.0 (#596)
paulbourelly999 Apr 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@
// "forwardPorts": [],

// Uncomment the next line to run commands after the container is created - for example installing curl.
"postCreateCommand": "container/database.sh && container/library.sh && container/setup.sh && ldconfig"
"postCreateCommand": "container/database.sh && container/library.sh && container/setup.sh && ldconfig",

"shutdownAction": "stopCompose"

// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.
// "mounts": [
Expand Down
8 changes: 5 additions & 3 deletions .devcontainer/docker-compose-vscode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ services:
- TIME_SYNC_TOPIC=time_sync
- TIME_SYNC_PORT=7575
- SIM_V2X_PORT=5757
- SIM_INTERACTION_PORT=7576
- V2X_PORT=8686
- INFRASTRUCTURE_ID=1
- KAFKA_BROKER_ADDRESS=127.0.0.1:9092
- INFRASTRUCTURE_ID=rsu_<J2735 MAP MESSAGE INTERSECTION ID>
- INFRASTRUCTURE_NAME=<RSU_NAME>
- SENSOR_JSON_FILE_PATH=/var/www/plugins/MAP/sensors.json
secrets:
- mysql_password

Expand Down Expand Up @@ -72,7 +74,7 @@ services:
DOCKER_HOST_IP: 127.0.0.1
KAFKA_ADVERTISED_HOST_NAME: 127.0.0.1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_CREATE_TOPICS: "time_sync:1:1"
KAFKA_CREATE_TOPICS: "time_sync:1:1,modified_spat:1:1,v2xhub_scheduling_plan_sub:1:1,v2xhub_ssm_sub:1:1"
KAFKA_LOG_DIRS: "/kafka/kafka-logs"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonar-scanner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
fetch-depth: 0
submodules: recursive
- name: Install sonar-scanner and build-wrapper
uses: sonarsource/sonarcloud-github-c-cpp@v1
uses: sonarsource/sonarcloud-github-c-cpp@v2
- name: Run install_dependencies.sh script
run: |
scripts/install_dependencies.sh
Expand Down
13 changes: 11 additions & 2 deletions .sonarqube/sonar-scanner.properties
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ sonar.modules= PedestrianPlugin, \
MessageReceiverPlugin, \
CARMAStreetsPlugin, \
ERVCloudForwardingPlugin, \
CDASimAdapter
CDASimAdapter, \
RSUHealthMonitorPlugin, \
TelematicBridgePlugin



Expand All @@ -82,6 +84,8 @@ TimPlugin.sonar.projectBaseDir =src/v2i-hub/TimPlugin
CARMAStreetsPlugin.sonar.projectBaseDir =src/v2i-hub/CARMAStreetsPlugin
ERVCloudForwardingPlugin.sonar.projectBaseDir =src/v2i-hub/ERVCloudForwardingPlugin
CDASimAdapter.sonar.projectBaseDir =src/v2i-hub/CDASimAdapter
RSUHealthMonitorPlugin.sonar.projectBaseDir =src/v2i-hub/RSUHealthMonitorPlugin
TelematicBridgePlugin.sonar.projectBaseDir =src/v2i-hub/TelematicBridgePlugin



Expand Down Expand Up @@ -117,7 +121,10 @@ CARMAStreetsPlugin.sonar.exclusions =test/**
ERVCloudForwardingPlugin.sonar.sources =src
CDASimAdapter.sonar.sources =src
CDASimAdapter.sonar.exclusions =test/**

RSUHealthMonitorPlugin.sonar.sources =src
RSUHealthMonitorPlugin.sonar.exclusions =test/**
TelematicBridgePlugin.sonar.sources =src
TelematicBridgePlugin.sonar.exclusions =test/**

# Tests
# Note: For C++ setting this field does not cause test analysis to occur. It only allows the test source code to be evaluated.
Expand Down Expand Up @@ -145,3 +152,5 @@ SpatPlugin.sonar.tests=test
CARMAStreetsPlugin.sonar.tests=test
ERVCloudForwardingPlugin.sonar.tests=test
CDASimAdapter.sonar.tests=test
RSUHealthMonitorPlugin.sonar.tests=test
TelematicBridgePlugin.sonar.tests=test
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
| CicleCI Build Status | Sonar Code Quality |
## Develop CI/CD Processes
| V2X-Hub Docker Image Builds (x86 or AMD) | V2X-Hub Docker Image Builds (ARM) | Sonar Code Quality |
|----------------------|---------------------|---------------------|
[![Build Workflows](https://github.com/usdot-fhwa-OPS/V2X-Hub/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/usdot-fhwa-OPS/V2X-Hub/actions/workflows/build.yml)|[![CircleCI](https://dl.circleci.com/status-badge/img/gh/usdot-fhwa-OPS/V2X-Hub/tree/develop.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/usdot-fhwa-OPS/V2X-Hub/tree/develop)| [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=usdot-fhwa-ops_V2X-Hub&metric=alert_status)](https://sonarcloud.io/dashboard?id=usdot-fhwa-ops_V2X-Hub) |
## Release CI/CD Processes
| V2X-Hub Docker Image Builds (x86 or AMD) | V2X-Hub Docker Image Builds (ARM) |
|----------------------|---------------------|
[![CircleCI](https://circleci.com/gh/usdot-fhwa-OPS/V2X-Hub.svg?style=svg)](https://circleci.com/gh/usdot-fhwa-OPS/V2X-Hub) | [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=usdot-fhwa-ops_V2X-Hub&metric=alert_status)](https://sonarcloud.io/dashboard?id=usdot-fhwa-ops_V2X-Hub) |

[![Build Workflows](https://github.com/usdot-fhwa-OPS/V2X-Hub/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/usdot-fhwa-OPS/V2X-Hub/actions/workflows/build.yml)|[![CircleCI](https://dl.circleci.com/status-badge/img/gh/usdot-fhwa-OPS/V2X-Hub/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/usdot-fhwa-OPS/V2X-Hub/tree/master)|
# Overview
In order to bring infrastructure components into the Connected Vehicle architecture, you need software that will facilitate the exchange of data in a format that can be understood by both vehicles and infrastructure devices The V2X Hub, takes in data from vehicles via Basic Safety Messages (BSM) in a Society of Automotive Engineers (SAE) standard format and translates the data to a National Transportation Communications for ITS Protocol (NTCIP) that infrastructure components can understand. And vice versa. It translates Signal Phase and Timing (SPaT) data from NTCIP to SAE and sends it to the Roadside Unit (RSU) for broadcast to mobile devices, including vehicles.

Expand Down
8 changes: 5 additions & 3 deletions configuration/amd64/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
- mysql-datavolume:/var/lib/mysql

php:
image: usdotfhwaops/php:7.5.1
image: usdotfhwaops/php:lavida
container_name: php
network_mode: host
depends_on:
Expand All @@ -30,21 +30,23 @@ services:
tty: true

v2xhub:
image: usdotfhwaops/v2xhubamd:7.5.1
image: usdotfhwaops/v2xhubamd:lavida
container_name: v2xhub
network_mode: host
restart: always
depends_on:
- db
environment:
- MYSQL_PASSWORD=/run/secrets/mysql_password
- INFRASTRUCTURE_ID=rsu_<J2735 MAP MESSAGE INTERSECTION ID>
- INFRASTRUCTURE_NAME=<RSU_NAME>
secrets:
- mysql_password
volumes:
- ./logs:/var/log/tmx
- ./MAP:/var/www/plugins/MAP
port_drayage_webservice:
image: usdotfhwaops/port-drayage-webservice:7.5.1
image: usdotfhwaops/port-drayage-webservice:lavida
container_name: port_drayage_webservice
network_mode: host
secrets:
Expand Down
49 changes: 47 additions & 2 deletions configuration/amd64/initialization.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,57 @@
#!/bin/bash
directory=$(pwd)
mysqlDir="$directory/mysql"

# update and upgrade commands to update linux OS
sudo apt update -y && sudo apt upgrade -y

#installing necessary and useful apps
sudo apt-get install chromium-browser -y #Chrome required for CARMA platform/V2X Hub UI(?)
sudo apt install curl -y #Curl for downloading files over internet

#install docker
curl -L https://raw.githubusercontent.com/usdot-fhwa-stol/carma-platform/develop/engineering_tools/install-docker.sh | bash

#make passwords for mysql
mkdir -p secrets && cd secrets

#creates password files where user inputs password
FILE1=mysql_root_password.txt
FILE2=mysql_password.txt
if test -f "$FILE1"; then
echo "$FILE1 exists."
else
read -p "enter password for the mysql_root_password: " sql_root_pass
echo "$sql_root_pass" > sql_root_pass.txt
#remove endline characters from password files
tr -d '\n' <sql_root_pass.txt> mysql_root_password.txt && rm sql_root_pass.txt
fi

if test -f "$FILE2"; then
echo "$FILE2 exists."
else
read -p "enter password for mysql_password: " sql_pass
echo "$sql_pass" > sql_pass.txt
#remove endline characters from password files
tr -d '\n' <sql_pass.txt> mysql_password.txt && rm sql_pass.txt
fi

#AMD64 initialzation
cd $directory
sudo apt-get -y remove docker docker-engine docker.io containerd runc
sudo apt-get update
sudo apt-get -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get -y install docker-ce docker-ce-cli containerd.io
sudo apt -y install python3-pip
sudo pip3 install docker-compose
sudo docker-compose pull
sudo apt update -y && sudo apt upgrade -y
sudo docker-compose up -d

#create v2xhub user
cd $mysqlDir
./add_v2xhub_user.bash

chromium-browser "http://127.0.0.1" > /dev/null 2>&1 &
chromium-browser "https://127.0.0.1:19760" > /dev/null 2>&1 &
6 changes: 3 additions & 3 deletions configuration/arm64/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
- mysql-datavolume:/var/lib/mysql

php:
image: usdotfhwaops/php_arm:7.5.1
image: usdotfhwaops/php_arm:lavida
container_name: php
network_mode: host
depends_on:
Expand All @@ -30,7 +30,7 @@ services:
tty: true

v2xhub:
image: usdotfhwaops/v2xhubarm:7.5.1
image: usdotfhwaops/v2xhubarm:lavida
container_name: v2xhub
network_mode: host
restart: always
Expand All @@ -44,7 +44,7 @@ services:
- ./logs:/var/log/tmx
- ./MAP:/var/www/plugins/MAP
port_drayage_webservice:
image: usdotfhwaops/port-drayage-webservice_arm:7.5.1
image: usdotfhwaops/port-drayage-webservice_arm:lavida
container_name: port_drayage_webservice
network_mode: host
secrets:
Expand Down
49 changes: 47 additions & 2 deletions configuration/arm64/initialization.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,58 @@
#!/bin/bash
directory=$(pwd)
mysqlDir="$directory/mysql"

# update and upgrade commands to update linux OS
sudo apt update -y && sudo apt upgrade -y

#installing necessary and useful apps
sudo apt-get install chromium-browser -y #Chrome required for CARMA platform/V2X Hub UI(?)
sudo apt install curl -y #Curl for downloading files over internet

#install docker
curl -L https://raw.githubusercontent.com/usdot-fhwa-stol/carma-platform/develop/engineering_tools/install-docker.sh | bash

#make passwords for mysql
mkdir -p secrets && cd secrets

#creates password files where user inputs password
FILE1=mysql_root_password.txt
FILE2=mysql_password.txt
if test -f "$FILE1"; then
echo "$FILE1 exists."
else
read -p "enter password for the mysql_root_password: " sql_root_pass
echo "$sql_root_pass" > sql_root_pass.txt
#remove endline characters from password files
tr -d '\n' <sql_root_pass.txt> mysql_root_password.txt && rm sql_root_pass.txt
fi

if test -f "$FILE2"; then
echo "$FILE2 exists."
else
read -p "enter password for mysql_password: " sql_pass
echo "$sql_pass" > sql_pass.txt
#remove endline characters from password files
tr -d '\n' <sql_pass.txt> mysql_password.txt && rm sql_pass.txt
fi

#ARM initialization
cd $directory
sudo apt-get -y remove docker docker-engine docker.io containerd runc
sudo apt-get update
sudo apt-get -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
OS=$(lsb_release -i | awk 'FS=":" {print $3;}' | awk '{print tolower($0)}')
arch=$(dpkg --print-architecture)
curl -fsSL https://download.docker.com/linux/$OS/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=$arch] https://download.docker.com/linux/$OS $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin
sudo apt -y install python3-pip
sudo pip3 install docker-compose
sudo apt update -y && sudo apt upgrade -y
sudo docker-compose up -d

#create v2xhub user
cd $mysqlDir
./add_v2xhub_user.bash

chromium-browser "http://127.0.0.1" > /dev/null 2>&1 &
chromium-browser "https://127.0.0.1:19760" > /dev/null 2>&1 &
33 changes: 26 additions & 7 deletions ext/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@
# exit on errors
set -e

# Find number of cores available
numCPU=$(nproc)

# An OPENAPI based Qt webservice is needed by the plugins for http requests processing. A custom generated code using OPENAPI framework is located in GitHub.
pushd /tmp
QHTTPENGINE_VERSION=1.0.1
wget -O qhttpengine-${QHTTPENGINE_VERSION}.tar.gz https://github.com/nitroshare/qhttpengine/archive/refs/tags/${QHTTPENGINE_VERSION}.tar.gz
tar xvf qhttpengine-${QHTTPENGINE_VERSION}.tar.gz
cd qhttpengine-${QHTTPENGINE_VERSION}/
cmake .
make
make -j${numCPU}
make install
popd

Expand All @@ -20,7 +23,7 @@ wget -O date-${DATELIB_VERSION}.tar.gz https://github.com/HowardHinnant/date/arc
tar xvf date-${DATELIB_VERSION}.tar.gz
cd date-${DATELIB_VERSION}/
cmake .
make
make -j${numCPU}
make install
popd

Expand All @@ -29,27 +32,43 @@ ldconfig
# Server for the Qt webservice
pushd server
cmake .
make
make -j${numCPU}
make install
popd

pushd ccserver
cmake .
make
make -j${numCPU}
make install
popd

pushd pdclient
cmake .
make
make -j${numCPU}
make install
popd

# GPS Parser
pushd /tmp
if [ -d "NemaTode" ]; then
rm -r NemaTode
fi
git clone https://github.com/ckgt/NemaTode.git
cd NemaTode
cmake .
make
make -j${numCPU}
make install
popd
popd

# Nats C API
pushd /tmp
if [ -d "nats.c" ]; then
rm -r nats.c
fi
git clone https://github.com/nats-io/nats.c --branch v3.7.0
cd nats.c
cmake . -DNATS_BUILD_NO_SPIN=ON
make -j${numCPU}
make install
popd

6 changes: 6 additions & 0 deletions scripts/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ DEPENDENCIES="build-essential \
wget \
zip \
zlib1g \
rapidjson-dev \
librapidxml-dev \
libprotobuf-c-dev \
curl"

# STOL library dependencies
Expand All @@ -41,9 +44,12 @@ LIBRARY_DEPENDENCIES=" \
# install all things needed for deployment, always done
apt-get install -y $DEPENDENCIES ${LIBRARY_DEPENDENCIES}

numCPU=$(nproc)

# install gtest
cd /usr/src/googletest/
mkdir -p build/
cd build
cmake ..
make -j${numCPU}
make install
Loading
Loading