From 9dfd481c3e0ca529d49c4c150306b19f128f99f5 Mon Sep 17 00:00:00 2001 From: Saikrishna Bairamoni <84093461+SaikrishnaBairamoni@users.noreply.github.com> Date: Mon, 8 May 2023 16:40:00 -0400 Subject: [PATCH 01/12] Update Release_notes.md with k900(7.5.0) release --- docs/Release_notes.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/Release_notes.md b/docs/Release_notes.md index c03fe51c1..3ab4842c9 100644 --- a/docs/Release_notes.md +++ b/docs/Release_notes.md @@ -1,5 +1,31 @@ V2X-Hub Release Notes --------------------------------- + +Version 7.5.0, released May 5th, 2023 +-------------------------------------------------------- + +**Summary:** +V2X Hub release 7.5.0 is comprised of the following new features: a new ERVCloudForwardingPlugin to enable BSMs from active Emergency Response Vehicles (ERVs) to be forwarded to CARMA Cloud in support of message forwarding to V2X Hub instances along an ERV’s future route when deployed along with other CARMA tools to demonstrate move-over law when an ERV is approaching a CDA vehicle from behind; new features to support CARMA Simulation integration such as simulation clock functionality; and a newly developed CARMA Simulation adaptor shell and handshake functionality to allow multiple V2X Hub instances to connect with a single CARMA Simulation platform. Along with the above enhancements, several enhancements and bug fixes are included in this release. + +**Freight Emergency Response Functionalities** + +Enhancements in this release related to Freight Emergency Response: + +- PR 460: The creation of a new ERVCloudForwardingPlugin that enables V2X Hub to register a connected RSU, along with its location information, with CARMA Cloud. Additionally, this plugin is responsible for sending received BSMs from active Emergency Response Vehicles (ERVs) to CARMA Cloud in support of message forwarding to V2X Hub instances located along the ERV’s future route. + +**Other** + +Enhancements in this release: + +- Issue 262: Updated CARMA Streets plugin to receive and decode Mobility Path messages into JSON through Kafka. +- PR 486: Updated the V2X Hub docker images to Ubuntu 22 (Jammy) which has LTS support through April 2027. This will also support new libraries created using the Carma-builds project. +- PR 487: Added some changes to allow for Docker to be installed on different Linux distros for arm64. + +Fixes in this release: + +- Issue 484: Fixed PedestrianPlugin does not update when any configuration changes are made with in Plugin, either when plugin is off or on. +- PR 494: Sets some error message in the Command Plugin for file upload operations to ERROR instead of DEBUG so they can be seen on the command line by default. + Version 7.4.0, released Feb 10th, 2023 -------------------------------------------------------- From 71a6fe3b484febdbc3d41f8ef60451ddba0d1b91 Mon Sep 17 00:00:00 2001 From: paulbourelly999 <77466294+paulbourelly999@users.noreply.github.com> Date: Thu, 18 May 2023 16:32:23 -0400 Subject: [PATCH 02/12] Fix infrastructure sim message string (#532) # PR Details ## Description V2X-Hub CDASimAdapter would throw stoul invalid argument exceptions when attempting to set a string for the INFRASTRUCTURE_ID. This id needs to support string since NS-3/Mosiac rsu registration needs the rsu registration id to match the following format `rsu_`. This fixed the internal infrastructure id field to be string as well as removing the stoul casting of a string to a long to remove this exception. ## Related Issue #525 ## Motivation and Context See description ## How Has This Been Tested? Tested in AWS XIL Cloud deployment and on ubuntu v2xhub deployment. ## Types of changes - x] Defect fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that cause existing functionality to change) ## Checklist: - [ ] I have added any new packages to the sonar-scanner.properties file - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. - [x] I have read the **CONTRIBUTING** document. [V2XHUB Contributing Guide](https://github.com/usdot-fhwa-OPS/V2X-Hub/blob/develop/Contributing.md) - [ ] I have added tests to cover my changes. - [ ] All new and existing tests passed. --- src/v2i-hub/CDASimAdapter/src/CDASimAdapter.cpp | 8 +++++++- src/v2i-hub/CDASimAdapter/src/CDASimConnection.cpp | 6 +++--- .../CDASimAdapter/src/include/CDASimConnection.hpp | 8 ++++---- .../CDASimAdapter/test/TestCARMASimulationConnection.cpp | 9 ++++----- 4 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/v2i-hub/CDASimAdapter/src/CDASimAdapter.cpp b/src/v2i-hub/CDASimAdapter/src/CDASimAdapter.cpp index a036ff6f2..b0883891d 100644 --- a/src/v2i-hub/CDASimAdapter/src/CDASimAdapter.cpp +++ b/src/v2i-hub/CDASimAdapter/src/CDASimAdapter.cpp @@ -86,7 +86,7 @@ namespace CDASimAdapter{ uint time_sync_port = std::stoul(sim::get_sim_config(sim::TIME_SYNC_PORT)); uint v2x_port = std::stoul(sim::get_sim_config(sim::V2X_PORT)); uint sim_v2x_port = std::stoul(sim::get_sim_config(sim::SIM_V2X_PORT)); - uint infrastructure_id = std::stoul(sim::get_sim_config(sim::INFRASTRUCTURE_ID));; + std::string infrastructure_id = sim::get_sim_config(sim::INFRASTRUCTURE_ID); PLOG(logINFO) << "CDASim connecting " << simulation_ip << "\nUsing Registration Port : " << std::to_string( simulation_registration_port) << @@ -106,6 +106,12 @@ namespace CDASimAdapter{ catch (const TmxException &e) { PLOG(logERROR) << "Exception occured attempting to initialize CDASim Connection : " << e.what() << std::endl; return false; + } + catch (const std::invalid_argument &e ) { + // std::stoul throws invalid arguement exception when provided with a string that contains characters that are not numbers. + PLOG(logERROR) << "Exception occured attempting to initialize CDASim Connection : " << e.what() << + ". Check environment variables are set to the correct type!"; + return false; } return connection->connect(); } diff --git a/src/v2i-hub/CDASimAdapter/src/CDASimConnection.cpp b/src/v2i-hub/CDASimAdapter/src/CDASimConnection.cpp index 7349bda38..54ac69758 100644 --- a/src/v2i-hub/CDASimAdapter/src/CDASimConnection.cpp +++ b/src/v2i-hub/CDASimAdapter/src/CDASimConnection.cpp @@ -4,7 +4,7 @@ using namespace tmx::utils; namespace CDASimAdapter{ - CDASimConnection::CDASimConnection(const std::string &simulation_ip, const uint infrastructure_id, const uint simulation_registration_port, const uint sim_v2x_port, + CDASimConnection::CDASimConnection(const std::string &simulation_ip, const std::string infrastructure_id, const uint simulation_registration_port, const uint sim_v2x_port, const std::string &local_ip, const uint time_sync_port, const uint v2x_port, const WGS84Point &location) : _simulation_ip(simulation_ip), _infrastructure_id(infrastructure_id), _simulation_registration_port(simulation_registration_port), @@ -33,7 +33,7 @@ namespace CDASimAdapter{ return _connected; } - std::string CDASimConnection::get_handshake_json(const uint infrastructure_id, const std::string &local_ip, const uint time_sync_port, const uint v2x_port, + std::string CDASimConnection::get_handshake_json(const std::string infrastructure_id, const std::string &local_ip, const uint time_sync_port, const uint v2x_port, const WGS84Point &location) const { @@ -52,7 +52,7 @@ namespace CDASimAdapter{ return message_str; } - bool CDASimConnection::carma_simulation_handshake(const std::string &simulation_ip, const uint infrastructure_id, const uint simulation_registration_port, + bool CDASimConnection::carma_simulation_handshake(const std::string &simulation_ip, const std::string infrastructure_id, const uint simulation_registration_port, const std::string &local_ip, const uint time_sync_port, const uint v2x_port, const WGS84Point &location) { diff --git a/src/v2i-hub/CDASimAdapter/src/include/CDASimConnection.hpp b/src/v2i-hub/CDASimAdapter/src/include/CDASimConnection.hpp index ab6771609..4ee21d643 100644 --- a/src/v2i-hub/CDASimAdapter/src/include/CDASimConnection.hpp +++ b/src/v2i-hub/CDASimAdapter/src/include/CDASimConnection.hpp @@ -32,7 +32,7 @@ namespace CDASimAdapter { * @param location Simulationed location of infrastructure. * @param producer Kafka Producer for forwarding time synchronization messages. */ - explicit CDASimConnection( const std::string &simulation_ip, const uint infrastructure_id, const uint simulation_registration_port, + explicit CDASimConnection( const std::string &simulation_ip, const std::string infrastructure_id, const uint simulation_registration_port, const uint sim_v2x_port, const std::string &local_ip, const uint time_sync_port, const uint v2x_port, const tmx::utils::WGS84Point &location); @@ -95,7 +95,7 @@ namespace CDASimAdapter { * @param location simulated location of infrastructure hardware. * @return true if handshake successful and false if handshake unsuccessful. */ - bool carma_simulation_handshake(const std::string &simulation_ip, const uint infrastructure_id, const uint simulation_registration_port, + bool carma_simulation_handshake(const std::string &simulation_ip, const std::string infrastructure_id, const uint simulation_registration_port, const std::string &local_ip, const uint time_sync_port, const uint v2x_port, const tmx::utils::WGS84Point &location); @@ -131,12 +131,12 @@ namespace CDASimAdapter { * @param location simulated location of infrastructure hardware. * @return true if handshake successful and false if handshake unsuccessful. */ - std::string get_handshake_json(const uint infrastructure_id, const std::string &local_ip, const uint time_sync_port, + std::string get_handshake_json(const std::string infrastructure_id, const std::string &local_ip, const uint time_sync_port, const uint v2x_port, const tmx::utils::WGS84Point &location) const; std::string _simulation_ip; uint _simulation_registration_port; - uint _infrastructure_id; + std::string _infrastructure_id; uint _simulation_v2x_port; std::string _local_ip; uint _time_sync_port; diff --git a/src/v2i-hub/CDASimAdapter/test/TestCARMASimulationConnection.cpp b/src/v2i-hub/CDASimAdapter/test/TestCARMASimulationConnection.cpp index 442c83142..32882a18d 100644 --- a/src/v2i-hub/CDASimAdapter/test/TestCARMASimulationConnection.cpp +++ b/src/v2i-hub/CDASimAdapter/test/TestCARMASimulationConnection.cpp @@ -24,7 +24,7 @@ namespace CDASimAdapter { void SetUp() override { // Initialize CARMA Simulation connection with (0,0,0) location and mock kafka producer. WGS84Point location; - connection = std::make_shared("127.0.0.1", 1212, 4567, 4678, "127.0.0.1", 1213, 1214, location); + connection = std::make_shared("127.0.0.1", "1212", 4567, 4678, "127.0.0.1", 1213, 1214, location); } void TearDown() override { @@ -87,15 +87,14 @@ namespace CDASimAdapter { location.Elevation = 1000; location.Latitude = 38.955; location.Longitude = -77.149; - - ASSERT_EQ(connection->get_handshake_json(4566, "127.0.0.1", 4567, 4568, location), - "{\n \"infrastructureId\" : 4566,\n \"location\" : {\n \"elevation\" : 1000.0,\n \"latitude\" : 38.954999999999998,\n \"longitude\" : -77.149000000000001\n },\n \"rxMessageIpAddress\" : \"127.0.0.1\",\n \"rxMessagePort\" : 4568,\n \"timeSyncPort\" : 4567\n}\n"); + ASSERT_EQ(connection->get_handshake_json("4566", "127.0.0.1", 4567, 4568, location), + "{\n \"infrastructureId\" : \"4566\",\n \"location\" : {\n \"elevation\" : 1000.0,\n \"latitude\" : 38.954999999999998,\n \"longitude\" : -77.149000000000001\n },\n \"rxMessageIpAddress\" : \"127.0.0.1\",\n \"rxMessagePort\" : 4568,\n \"timeSyncPort\" : 4567\n}\n"); } TEST_F( TestCARMASimulationConnection, carma_simulation_handshake) { WGS84Point location; // UDP creation error - ASSERT_FALSE(connection->carma_simulation_handshake("", 45, NULL, + ASSERT_FALSE(connection->carma_simulation_handshake("", "45", NULL, "", 45, 45, location)); } From 53f34f0e380879b3d0461adc171600cac53574a4 Mon Sep 17 00:00:00 2001 From: paulbourelly999 <77466294+paulbourelly999@users.noreply.github.com> Date: Mon, 22 May 2023 18:08:15 -0400 Subject: [PATCH 03/12] Added Point class and used as cartesian point for (#535) CDASim Infrastructure registration # PR Details ## Description Updated infrastructure registration to use a cartesian point as location over a geodetic point to allow for easier configuration of simulated location of rsu ## Related Issue ## Motivation and Context ## How Has This Been Tested? Tested using dev-container 1) Started up dev container with SIMULATION_MODE true 2) Saw log message for sending Infrastructure Registration Message ## Types of changes - [x] Defect fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that cause existing functionality to change) ## Checklist: - [ ] I have added any new packages to the sonar-scanner.properties file - [x] My change requires a change to the documentation. - [x] I have updated the documentation accordingly. - [x] I have read the **CONTRIBUTING** document. [V2XHUB Contributing Guide](https://github.com/usdot-fhwa-OPS/V2X-Hub/blob/develop/Contributing.md) - [ ] I have added tests to cover my changes. - [x] All new and existing tests passed. --- src/tmx/TmxUtils/src/Point.h | 19 +++++++++++++++++++ src/v2i-hub/CDASimAdapter/manifest.json | 12 ++++++------ .../CDASimAdapter/src/CDASimAdapter.cpp | 10 +++++----- .../CDASimAdapter/src/CDASimConnection.cpp | 14 +++++++------- .../src/include/CDASimAdapter.hpp | 2 +- .../src/include/CDASimConnection.hpp | 12 ++++++------ .../test/TestCARMASimulationConnection.cpp | 17 +++++++++-------- 7 files changed, 53 insertions(+), 33 deletions(-) create mode 100644 src/tmx/TmxUtils/src/Point.h diff --git a/src/tmx/TmxUtils/src/Point.h b/src/tmx/TmxUtils/src/Point.h new file mode 100644 index 000000000..b075d4430 --- /dev/null +++ b/src/tmx/TmxUtils/src/Point.h @@ -0,0 +1,19 @@ +#pragma once + +namespace tmx::utils { + + + /// Cartesian Coordinates on a . + typedef struct Point + { + Point() : X(0), Y(0), Z(0) {} + + Point(double x, double y, double z = 0.0): + X(x), Y(y), Z(z) { } + + double X; + double Y; + double Z; + } Point; + +} // namespace tmx::utils diff --git a/src/v2i-hub/CDASimAdapter/manifest.json b/src/v2i-hub/CDASimAdapter/manifest.json index e01753f7a..00859a144 100755 --- a/src/v2i-hub/CDASimAdapter/manifest.json +++ b/src/v2i-hub/CDASimAdapter/manifest.json @@ -14,19 +14,19 @@ "description":"The log level for this plugin" }, { - "key":"Longitude", + "key":"X", "default":"0.0", - "description":"Longitude (in degrees) of the location of the simulated infrastructure." + "description":"Cartesian X coordinate in simulated map (in meters)." }, { - "key":"Latitude", + "key":"Y", "default":"0.0", - "description":"Latitude (in degrees) of the location of the simulated infrastructure." + "description":"Cartesian Y coordinate in simulated map (in meters)." }, { - "key":"Elevation", + "key":"Z", "default":"0.0", - "description":"Elevation (in degrees) of the location of the simulated infrastructure." + "description":"Cartesian Z coordinate in simulated map (in meters)." } ] diff --git a/src/v2i-hub/CDASimAdapter/src/CDASimAdapter.cpp b/src/v2i-hub/CDASimAdapter/src/CDASimAdapter.cpp index b0883891d..4820a413b 100644 --- a/src/v2i-hub/CDASimAdapter/src/CDASimAdapter.cpp +++ b/src/v2i-hub/CDASimAdapter/src/CDASimAdapter.cpp @@ -13,11 +13,11 @@ namespace CDASimAdapter{ } void CDASimAdapter::UpdateConfigSettings() { - GetConfigValue("Longitude", location.Longitude); - GetConfigValue("Latitude", location.Latitude); - GetConfigValue("Elevation", location.Elevation); - PLOG(logINFO) << "Location of Simulated V2X-Hub updated to : {" << location.Longitude << ", " - << location.Latitude << ", " << location.Elevation << "}." << std::endl; + GetConfigValue("X", location.Z); + GetConfigValue("Y", location.Y); + GetConfigValue("Z", location.X); + PLOG(logINFO) << "Location of Simulated V2X-Hub updated to : {" << location.X << ", " + << location.Y << ", " << location.Z << "}." << std::endl; } void CDASimAdapter::OnConfigChanged(const char *key, const char *value) { diff --git a/src/v2i-hub/CDASimAdapter/src/CDASimConnection.cpp b/src/v2i-hub/CDASimAdapter/src/CDASimConnection.cpp index 54ac69758..e5e3a4a66 100644 --- a/src/v2i-hub/CDASimAdapter/src/CDASimConnection.cpp +++ b/src/v2i-hub/CDASimAdapter/src/CDASimConnection.cpp @@ -6,7 +6,7 @@ using namespace tmx::utils; namespace CDASimAdapter{ CDASimConnection::CDASimConnection(const std::string &simulation_ip, const std::string infrastructure_id, const uint simulation_registration_port, const uint sim_v2x_port, const std::string &local_ip, const uint time_sync_port, const uint v2x_port, - const WGS84Point &location) : + const Point &location) : _simulation_ip(simulation_ip), _infrastructure_id(infrastructure_id), _simulation_registration_port(simulation_registration_port), _simulation_v2x_port(sim_v2x_port), _local_ip(local_ip), _time_sync_port(time_sync_port), _v2x_port(v2x_port), _location(location) { @@ -33,8 +33,8 @@ namespace CDASimAdapter{ return _connected; } - std::string CDASimConnection::get_handshake_json(const std::string infrastructure_id, const std::string &local_ip, const uint time_sync_port, const uint v2x_port, - const WGS84Point &location) const + std::string CDASimConnection::get_handshake_json(const std::string &infrastructure_id, const std::string &local_ip, const uint time_sync_port, const uint v2x_port, + const Point &location) const { Json::Value message; @@ -44,9 +44,9 @@ namespace CDASimAdapter{ message["infrastructureId"] = infrastructure_id; message["rxMessagePort"] = v2x_port; message["timeSyncPort"] = time_sync_port; - message["location"]["latitude"] = location.Latitude; - message["location"]["longitude"] = location.Longitude; - message["location"]["elevation"] = location.Elevation; + message["location"]["x"] = location.X; + message["location"]["y"] = location.Y; + message["location"]["z"] = location.Z; Json::StyledWriter writer; message_str = writer.write(message); return message_str; @@ -54,7 +54,7 @@ namespace CDASimAdapter{ bool CDASimConnection::carma_simulation_handshake(const std::string &simulation_ip, const std::string infrastructure_id, const uint simulation_registration_port, const std::string &local_ip, const uint time_sync_port, const uint v2x_port, - const WGS84Point &location) + const Point &location) { // Create JSON message with the content std::string payload = ""; diff --git a/src/v2i-hub/CDASimAdapter/src/include/CDASimAdapter.hpp b/src/v2i-hub/CDASimAdapter/src/include/CDASimAdapter.hpp index 6de71bcd6..69cbbf135 100644 --- a/src/v2i-hub/CDASimAdapter/src/include/CDASimAdapter.hpp +++ b/src/v2i-hub/CDASimAdapter/src/include/CDASimAdapter.hpp @@ -110,7 +110,7 @@ namespace CDASimAdapter { private: - tmx::utils::WGS84Point location; + tmx::utils::Point location; std::shared_ptr time_producer; std::unique_ptr connection; std::mutex _lock; diff --git a/src/v2i-hub/CDASimAdapter/src/include/CDASimConnection.hpp b/src/v2i-hub/CDASimAdapter/src/include/CDASimConnection.hpp index 4ee21d643..8612c72f6 100644 --- a/src/v2i-hub/CDASimAdapter/src/include/CDASimConnection.hpp +++ b/src/v2i-hub/CDASimAdapter/src/include/CDASimConnection.hpp @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #include #include @@ -34,7 +34,7 @@ namespace CDASimAdapter { */ explicit CDASimConnection( const std::string &simulation_ip, const std::string infrastructure_id, const uint simulation_registration_port, const uint sim_v2x_port, const std::string &local_ip, const uint time_sync_port, const uint v2x_port, - const tmx::utils::WGS84Point &location); + const tmx::utils::Point &location); /** * @brief Method to forward v2x message to CARMA Simulation @@ -97,7 +97,7 @@ namespace CDASimAdapter { */ bool carma_simulation_handshake(const std::string &simulation_ip, const std::string infrastructure_id, const uint simulation_registration_port, const std::string &local_ip, const uint time_sync_port, const uint v2x_port, - const tmx::utils::WGS84Point &location); + const tmx::utils::Point &location); /** * @brief Method to setup UDP Servers and Clients after handshake to facilate message forwarding. @@ -131,8 +131,8 @@ namespace CDASimAdapter { * @param location simulated location of infrastructure hardware. * @return true if handshake successful and false if handshake unsuccessful. */ - std::string get_handshake_json(const std::string infrastructure_id, const std::string &local_ip, const uint time_sync_port, - const uint v2x_port, const tmx::utils::WGS84Point &location) const; + std::string get_handshake_json(const std::string &infrastructure_id, const std::string &local_ip, const uint time_sync_port, + const uint v2x_port, const tmx::utils::Point &location) const; std::string _simulation_ip; uint _simulation_registration_port; @@ -141,7 +141,7 @@ namespace CDASimAdapter { std::string _local_ip; uint _time_sync_port; uint _v2x_port; - tmx::utils::WGS84Point _location; + tmx::utils::Point _location; bool _connected = false; std::shared_ptr carma_simulation_listener; diff --git a/src/v2i-hub/CDASimAdapter/test/TestCARMASimulationConnection.cpp b/src/v2i-hub/CDASimAdapter/test/TestCARMASimulationConnection.cpp index 32882a18d..28b7376ab 100644 --- a/src/v2i-hub/CDASimAdapter/test/TestCARMASimulationConnection.cpp +++ b/src/v2i-hub/CDASimAdapter/test/TestCARMASimulationConnection.cpp @@ -23,9 +23,8 @@ namespace CDASimAdapter { protected: void SetUp() override { // Initialize CARMA Simulation connection with (0,0,0) location and mock kafka producer. - WGS84Point location; + Point location; connection = std::make_shared("127.0.0.1", "1212", 4567, 4678, "127.0.0.1", 1213, 1214, location); - } void TearDown() override { @@ -83,16 +82,18 @@ namespace CDASimAdapter { } TEST_F( TestCARMASimulationConnection, get_handshake_json) { - WGS84Point location; - location.Elevation = 1000; - location.Latitude = 38.955; - location.Longitude = -77.149; + Point location; + location.X = 1000; + location.Y = 38.955; + location.Z = -77.149; + ASSERT_EQ(connection->get_handshake_json("4566", "127.0.0.1", 4567, 4568, location), - "{\n \"infrastructureId\" : \"4566\",\n \"location\" : {\n \"elevation\" : 1000.0,\n \"latitude\" : 38.954999999999998,\n \"longitude\" : -77.149000000000001\n },\n \"rxMessageIpAddress\" : \"127.0.0.1\",\n \"rxMessagePort\" : 4568,\n \"timeSyncPort\" : 4567\n}\n"); + "{\n \"infrastructureId\" : \"4566\",\n \"location\" : {\n \"x\" : 1000.0,\n \"y\" : 38.954999999999998,\n \"z\" : -77.149000000000001\n },\n \"rxMessageIpAddress\" : \"127.0.0.1\",\n \"rxMessagePort\" : 4568,\n \"timeSyncPort\" : 4567\n}\n"); + } TEST_F( TestCARMASimulationConnection, carma_simulation_handshake) { - WGS84Point location; + Point location; // UDP creation error ASSERT_FALSE(connection->carma_simulation_handshake("", "45", NULL, "", 45, 45, location)); From e2d8c6e36a142cbfcb6544727a15566a780ea12d Mon Sep 17 00:00:00 2001 From: paulbourelly999 <77466294+paulbourelly999@users.noreply.github.com> Date: Wed, 24 May 2023 13:47:30 -0400 Subject: [PATCH 04/12] Fixed X and Z coordinate configuration loading (#537) # PR Details ## Description Fix configuration parameters to correctly map x,y,z coordinates to Point for Infrastructure registration. ## Related Issue ## Motivation and Context Fix configuration parameters to correctly map x,y,z coordinates to Point for Infrastructure registration. ## How Has This Been Tested? ## Types of changes - [ x] Defect fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that cause existing functionality to change) ## Checklist: - [ ] I have added any new packages to the sonar-scanner.properties file - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. - [x ] I have read the **CONTRIBUTING** document. [V2XHUB Contributing Guide](https://github.com/usdot-fhwa-OPS/V2X-Hub/blob/develop/Contributing.md) - [ ] I have added tests to cover my changes. - [ ] All new and existing tests passed. --- src/v2i-hub/CDASimAdapter/src/CDASimAdapter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/v2i-hub/CDASimAdapter/src/CDASimAdapter.cpp b/src/v2i-hub/CDASimAdapter/src/CDASimAdapter.cpp index 4820a413b..95754fa9f 100644 --- a/src/v2i-hub/CDASimAdapter/src/CDASimAdapter.cpp +++ b/src/v2i-hub/CDASimAdapter/src/CDASimAdapter.cpp @@ -13,9 +13,9 @@ namespace CDASimAdapter{ } void CDASimAdapter::UpdateConfigSettings() { - GetConfigValue("X", location.Z); + GetConfigValue("X", location.X); GetConfigValue("Y", location.Y); - GetConfigValue("Z", location.X); + GetConfigValue("Z", location.Z); PLOG(logINFO) << "Location of Simulated V2X-Hub updated to : {" << location.X << ", " << location.Y << ", " << location.Z << "}." << std::endl; } From 9169f459a613d686834b369e2e010795e91fe3b7 Mon Sep 17 00:00:00 2001 From: paulbourelly999 <77466294+paulbourelly999@users.noreply.github.com> Date: Fri, 2 Jun 2023 12:23:10 -0400 Subject: [PATCH 05/12] =?UTF-8?q?Fix:=20Added=20sleep=20between=20connecti?= =?UTF-8?q?on=20attempts=20to=20avoid=20excessive=20failu=E2=80=A6=20(#536?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …res and logs # PR Details ## Description Fix for CDASimAdapter Plugin which was excessively logging connection failures and CDASim crashes. Added a sleep period inbetween connection attempts ## Related Issue ## Motivation and Context Avoid excessive failed connection attempts and resulting excessive failed connection logs. ## How Has This Been Tested? In progress ## Types of changes - [ x] Defect fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that cause existing functionality to change) ## Checklist: - [ ] I have added any new packages to the sonar-scanner.properties file - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. - [x] I have read the **CONTRIBUTING** document. [V2XHUB Contributing Guide](https://github.com/usdot-fhwa-OPS/V2X-Hub/blob/develop/Contributing.md) - [ ] I have added tests to cover my changes. - [ ] All new and existing tests passed. --- src/v2i-hub/CDASimAdapter/src/CDASimAdapter.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/v2i-hub/CDASimAdapter/src/CDASimAdapter.cpp b/src/v2i-hub/CDASimAdapter/src/CDASimAdapter.cpp index 95754fa9f..05378d199 100644 --- a/src/v2i-hub/CDASimAdapter/src/CDASimAdapter.cpp +++ b/src/v2i-hub/CDASimAdapter/src/CDASimAdapter.cpp @@ -33,7 +33,11 @@ namespace CDASimAdapter{ // While CARMA Simulation connection is down, attempt to reconnect while ( !connection || !connection->is_connected() ) { - connect(); + bool success = connect(); + // Sleep for 2 seconds in between connection attempts + if ( !connection->is_connected() ) { + sleep(2); + } } if ( connection->is_connected() ) { From 281ad943fed3588320424ec4529f6ae50005c0e3 Mon Sep 17 00:00:00 2001 From: paulbourelly999 <77466294+paulbourelly999@users.noreply.github.com> Date: Tue, 6 Jun 2023 10:25:41 -0400 Subject: [PATCH 06/12] Added configuration parameters to CDASimAdapter (#539) # PR Details ## Description + Added MaxConnectionAttempts to limit connection attempts + Added configurable sleep time between attempts + Added comments and renamed some internal variable to improve readability ## Related Issue ## Motivation and Context More robust CDASim connection logic ## How Has This Been Tested? Integration tested with dev container setup ## Types of changes - [ ] Defect fix (non-breaking change that fixes an issue) - [x] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that cause existing functionality to change) ## Checklist: - [ ] I have added any new packages to the sonar-scanner.properties file - [x] My change requires a change to the documentation. - [x] I have updated the documentation accordingly. - [x] I have read the **CONTRIBUTING** document. [V2XHUB Contributing Guide](https://github.com/usdot-fhwa-OPS/V2X-Hub/blob/develop/Contributing.md) - [ ] I have added tests to cover my changes. - [x] All new and existing tests passed. --- src/v2i-hub/CDASimAdapter/manifest.json | 11 ++++ .../CDASimAdapter/src/CDASimAdapter.cpp | 66 ++++++++++++------- .../CDASimAdapter/src/CDASimConnection.cpp | 4 +- .../src/include/CDASimAdapter.hpp | 55 ++++++++++------ .../src/include/CDASimConnection.hpp | 4 +- 5 files changed, 92 insertions(+), 48 deletions(-) diff --git a/src/v2i-hub/CDASimAdapter/manifest.json b/src/v2i-hub/CDASimAdapter/manifest.json index 00859a144..aabe404be 100755 --- a/src/v2i-hub/CDASimAdapter/manifest.json +++ b/src/v2i-hub/CDASimAdapter/manifest.json @@ -27,7 +27,18 @@ "key":"Z", "default":"0.0", "description":"Cartesian Z coordinate in simulated map (in meters)." + }, + { + "key":"MaxConnectionAttempts", + "default":"10", + "description":"Number of connection attempts CDASimAdapter plugin will execute before failing. Valid values are any integers greater than or equal to 1. Any value less than 1 will result in unlimited connection attemtps." + }, + { + "key":"ConnectionSleepTime", + "default":"4", + "description":"Number of seconds to wait after a failed CDASim connection attempt, before retrying to establish connection. Valid values are equal or greater than 1. Any value less than 1 will be treated as 1." } + ] } diff --git a/src/v2i-hub/CDASimAdapter/src/CDASimAdapter.cpp b/src/v2i-hub/CDASimAdapter/src/CDASimAdapter.cpp index 05378d199..01cec61ef 100644 --- a/src/v2i-hub/CDASimAdapter/src/CDASimAdapter.cpp +++ b/src/v2i-hub/CDASimAdapter/src/CDASimAdapter.cpp @@ -13,11 +13,22 @@ namespace CDASimAdapter{ } void CDASimAdapter::UpdateConfigSettings() { - GetConfigValue("X", location.X); - GetConfigValue("Y", location.Y); - GetConfigValue("Z", location.Z); + std::scoped_lock lock(_lock); + bool success = false; + success = GetConfigValue("X", location.X); + success = success && GetConfigValue("Y", location.Y); + success = success && GetConfigValue("Z", location.Z); PLOG(logINFO) << "Location of Simulated V2X-Hub updated to : {" << location.X << ", " << location.Y << ", " << location.Z << "}." << std::endl; + success = success && GetConfigValue("MaxConnectionAttempts", max_connection_attempts); + success = success && GetConfigValue("ConnectionSleepTime", connection_sleep_time); + if (connection_sleep_time < 1 ) { + PLOG(logWARNING) << "ConnectionSleepTime of " << connection_sleep_time << " is invalid. Valid values are <= 1." << std::endl; + connection_sleep_time = 1; + } + if (!success) { + PLOG(logWARNING) << "Some configuration parameters were not successfully loaded! Please ensure configuration parameter keys are correct!" << std::endl; + } } void CDASimAdapter::OnConfigChanged(const char *key, const char *value) { @@ -32,18 +43,27 @@ namespace CDASimAdapter{ UpdateConfigSettings(); // While CARMA Simulation connection is down, attempt to reconnect - while ( !connection || !connection->is_connected() ) { + int connection_attempts = 0; + while ( (!connection || !connection->is_connected()) && (connection_attempts < max_connection_attempts || max_connection_attempts < 1 ) ) { + PLOG(logINFO) << "Attempting CDASim connection " << connection_attempts << "/" << max_connection_attempts << " ..." << std::endl; bool success = connect(); - // Sleep for 2 seconds in between connection attempts - if ( !connection->is_connected() ) { - sleep(2); + if (success) { + PLOG(logINFO) << "Connection to CDASim established!" << std::endl; + } + connection_attempts++; + // Sleep for configurable seconds in between connection attempts. No sleep is required on final failing attempt + if ( !connection->is_connected() && (connection_attempts < max_connection_attempts || max_connection_attempts < 1 ) ) { + PLOG(logDEBUG) << "Sleeping for " << connection_sleep_time << " seconds before next connection attempt ..." << std::endl; + std::this_thread::sleep_for(std::chrono::seconds(connection_sleep_time)); } } if ( connection->is_connected() ) { start_time_sync_thread_timer(); - start_amf_msg_thread(); - start_binary_msg_thread(); + start_immediate_forward_thread(); + start_message_receiver_thread(); + }else { + PLOG(logERROR) << "CDASim connection failed!" << std::endl; } } @@ -122,30 +142,30 @@ namespace CDASimAdapter{ - void CDASimAdapter::start_amf_msg_thread() { - if ( !amf_thread_timer ) { - amf_thread_timer = std::make_unique(); + void CDASimAdapter::start_immediate_forward_thread() { + if ( !immediate_forward_timer ) { + immediate_forward_timer = std::make_unique(); } - amf_msg_tick_id = amf_thread_timer->AddPeriodicTick([this]() { + immediate_forward_tick_id = immediate_forward_timer->AddPeriodicTick([this]() { this->attempt_message_from_v2xhub(); } // end of lambda expression , std::chrono::milliseconds(100) ); - amf_thread_timer->Start(); + immediate_forward_timer->Start(); } - void CDASimAdapter::start_binary_msg_thread() { - if ( !binary_thread_timer ) { - binary_thread_timer = std::make_unique(); + void CDASimAdapter::start_message_receiver_thread() { + if ( !message_receiver_timer ) { + message_receiver_timer = std::make_unique(); } - binary_msg_tick_id = binary_thread_timer->AddPeriodicTick([this]() { + message_receiver_tick_id = message_receiver_timer->AddPeriodicTick([this]() { this->attempt_message_from_simulation(); } // end of lambda expression , std::chrono::milliseconds(100) ); - binary_thread_timer->Start(); + message_receiver_timer->Start(); } @@ -185,15 +205,15 @@ namespace CDASimAdapter{ void CDASimAdapter::start_time_sync_thread_timer() { PLOG(logDEBUG) << "Creating Thread Timer for time sync" << std::endl; - if ( !thread_timer ) { - thread_timer = std::make_unique(); + if ( !time_sync_timer ) { + time_sync_timer = std::make_unique(); } - time_sync_tick_id = thread_timer->AddPeriodicTick([this]() { + time_sync_tick_id = time_sync_timer->AddPeriodicTick([this]() { PLOG(logDEBUG1) << "Listening for time sync messages from CDASim." << std::endl; this->attempt_time_sync(); } // end of lambda expression , std::chrono::milliseconds(100)); - thread_timer->Start(); + time_sync_timer->Start(); } void CDASimAdapter::attempt_time_sync() { diff --git a/src/v2i-hub/CDASimAdapter/src/CDASimConnection.cpp b/src/v2i-hub/CDASimAdapter/src/CDASimConnection.cpp index e5e3a4a66..51f55eaf2 100644 --- a/src/v2i-hub/CDASimAdapter/src/CDASimConnection.cpp +++ b/src/v2i-hub/CDASimAdapter/src/CDASimConnection.cpp @@ -4,7 +4,7 @@ using namespace tmx::utils; namespace CDASimAdapter{ - CDASimConnection::CDASimConnection(const std::string &simulation_ip, const std::string infrastructure_id, const uint simulation_registration_port, const uint sim_v2x_port, + CDASimConnection::CDASimConnection(const std::string &simulation_ip, const std::string &infrastructure_id, const uint simulation_registration_port, const uint sim_v2x_port, const std::string &local_ip, const uint time_sync_port, const uint v2x_port, const Point &location) : _simulation_ip(simulation_ip), _infrastructure_id(infrastructure_id), _simulation_registration_port(simulation_registration_port), @@ -52,7 +52,7 @@ namespace CDASimAdapter{ return message_str; } - bool CDASimConnection::carma_simulation_handshake(const std::string &simulation_ip, const std::string infrastructure_id, const uint simulation_registration_port, + bool CDASimConnection::carma_simulation_handshake(const std::string &simulation_ip, const std::string &infrastructure_id, const uint simulation_registration_port, const std::string &local_ip, const uint time_sync_port, const uint v2x_port, const Point &location) { diff --git a/src/v2i-hub/CDASimAdapter/src/include/CDASimAdapter.hpp b/src/v2i-hub/CDASimAdapter/src/include/CDASimAdapter.hpp index 69cbbf135..fd586fafc 100644 --- a/src/v2i-hub/CDASimAdapter/src/include/CDASimAdapter.hpp +++ b/src/v2i-hub/CDASimAdapter/src/include/CDASimAdapter.hpp @@ -1,7 +1,7 @@ //============================================================================ -// Name : EpcwPlugin.cpp -// Author : -// Version : +// Name : CDASimAdapter.cpp +// Author : Paul Bourelly +// Version : 7.5.1 // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ @@ -23,24 +23,24 @@ #include #include "ThreadWorker.h" - - - -namespace CDASimAdapter { +namespace CDASimAdapter +{ /** - * @brief V2X-Hub Plugin that acts as a adapter for integration with CARMA-Simulation. Plugin used + * @brief V2X-Hub Plugin that acts as a adapter for integration with CARMA-Simulation. Plugin used * environment variable to be installed and enabled by default. */ - class CDASimAdapter: public tmx::utils::PluginClient{ + class CDASimAdapter : public tmx::utils::PluginClient + { public: /** * @brief CARMA-Simulation Infrastructure Adapter constructor. * @param name name of plugin. */ explicit CDASimAdapter(const std::string &name); - - int Main() override ; + + int Main() override; + protected: /** * @brief Called everytime a configuration value is changed for the plugin. @@ -60,7 +60,7 @@ namespace CDASimAdapter { */ void OnStateChange(IvpPluginState state) override; // Virtual method overrides END. - + /** * @brief Get Kafka Connection string from environment variable KAFKA_BROKER_ADDRESS and time sync topic name from * CARMA_INFRASTRUCTURE_TIME_SYNC_TOPIC and initialize a Kafka producer to forward time synchronization messages to @@ -77,12 +77,12 @@ namespace CDASimAdapter { /** * @brief Method to start thread timer for processing msg from v2xhub */ - void start_amf_msg_thread(); + void start_immediate_forward_thread(); /** * @brief Method to start thread timer for processing msg from CDASimConnection */ - void start_binary_msg_thread(); + void start_message_receiver_thread(); /** * @brief Method to consume msg in amf fromat from V2Xhub and forward to CDASimConnection @@ -107,18 +107,31 @@ namespace CDASimAdapter { * @brief Method to consume time sychrononization from CDASimConnection and forward to tmx core and CARMA Streets */ void attempt_time_sync(); - - private: + private: + // Simulated location of RSU tmx::utils::Point location; + // Stores configurable MaxConnectionAttempts. Any value > 1 will result in infinite connection attempts. + int max_connection_attempts; + // Time in seconds between connection attempts. Most be greater than zero! + uint connection_sleep_time; + // Kafka producer for sending time_sync messages to carma-streets std::shared_ptr time_producer; + // CDASim connection std::unique_ptr connection; + // Mutex for configuration parameter thread safety std::mutex _lock; - std::unique_ptr thread_timer; + // Time sync thread to forward time sync messages to PluginClientClockAware V2X-Hub plugins. + std::unique_ptr time_sync_timer; + // Time sync thread id int time_sync_tick_id; - std::unique_ptr amf_thread_timer; - std::unique_ptr binary_thread_timer; - int amf_msg_tick_id; - int binary_msg_tick_id; + // Immediate forward thread to consume messages from the immediate forward plugin and send to CDASim + std::unique_ptr immediate_forward_timer; + // Immediate forward thread id + int immediate_forward_tick_id; + // Message receiver thread to consume messages from CDASim and forward them to the message receiver. + std::unique_ptr message_receiver_timer; + // Message receiver thread id + int message_receiver_tick_id; }; } \ No newline at end of file diff --git a/src/v2i-hub/CDASimAdapter/src/include/CDASimConnection.hpp b/src/v2i-hub/CDASimAdapter/src/include/CDASimConnection.hpp index 8612c72f6..86bd0ff95 100644 --- a/src/v2i-hub/CDASimAdapter/src/include/CDASimConnection.hpp +++ b/src/v2i-hub/CDASimAdapter/src/include/CDASimConnection.hpp @@ -32,7 +32,7 @@ namespace CDASimAdapter { * @param location Simulationed location of infrastructure. * @param producer Kafka Producer for forwarding time synchronization messages. */ - explicit CDASimConnection( const std::string &simulation_ip, const std::string infrastructure_id, const uint simulation_registration_port, + explicit CDASimConnection( const std::string &simulation_ip, const std::string &infrastructure_id, const uint simulation_registration_port, const uint sim_v2x_port, const std::string &local_ip, const uint time_sync_port, const uint v2x_port, const tmx::utils::Point &location); @@ -95,7 +95,7 @@ namespace CDASimAdapter { * @param location simulated location of infrastructure hardware. * @return true if handshake successful and false if handshake unsuccessful. */ - bool carma_simulation_handshake(const std::string &simulation_ip, const std::string infrastructure_id, const uint simulation_registration_port, + bool carma_simulation_handshake(const std::string &simulation_ip, const std::string &infrastructure_id, const uint simulation_registration_port, const std::string &local_ip, const uint time_sync_port, const uint v2x_port, const tmx::utils::Point &location); From d89ef32cc77d7c678847857483d84836b249dde6 Mon Sep 17 00:00:00 2001 From: Saikrishna Bairamoni <84093461+SaikrishnaBairamoni@users.noreply.github.com> Date: Tue, 6 Jun 2023 11:40:17 -0400 Subject: [PATCH 07/12] Update dockercompose files to point release images --- configuration/amd64/docker-compose.yml | 6 +++--- configuration/arm64/docker-compose.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/configuration/amd64/docker-compose.yml b/configuration/amd64/docker-compose.yml index 6b5188297..21b5a8368 100755 --- a/configuration/amd64/docker-compose.yml +++ b/configuration/amd64/docker-compose.yml @@ -20,7 +20,7 @@ services: - mysql-datavolume:/var/lib/mysql php: - image: usdotfhwaops/php:latest + image: usdotfhwaops/php:k900-xil container_name: php network_mode: host depends_on: @@ -30,7 +30,7 @@ services: tty: true v2xhub: - image: usdotfhwaops/v2xhubamd:latest + image: usdotfhwaops/v2xhubamd:k900-xil container_name: v2xhub network_mode: host restart: always @@ -44,7 +44,7 @@ services: - ./logs:/var/log/tmx - ./MAP:/var/www/plugins/MAP port_drayage_webservice: - image: usdotfhwaops/port-drayage-webservice:latest + image: usdotfhwaops/port-drayage-webservice:k900-xil container_name: port_drayage_webservice network_mode: host secrets: diff --git a/configuration/arm64/docker-compose.yml b/configuration/arm64/docker-compose.yml index a32c31fab..5537b1216 100644 --- a/configuration/arm64/docker-compose.yml +++ b/configuration/arm64/docker-compose.yml @@ -20,7 +20,7 @@ services: - mysql-datavolume:/var/lib/mysql php: - image: usdotfhwaops/php_arm:latest + image: usdotfhwaops/php_arm:k900-xil container_name: php network_mode: host depends_on: @@ -30,7 +30,7 @@ services: tty: true v2xhub: - image: usdotfhwaops/v2xhubarm:latest + image: usdotfhwaops/v2xhubarm:k900-xil container_name: v2xhub network_mode: host restart: always @@ -44,7 +44,7 @@ services: - ./logs:/var/log/tmx - ./MAP:/var/www/plugins/MAP port_drayage_webservice: - image: usdotfhwaops/port-drayage-webservice_arm:latest + image: usdotfhwaops/port-drayage-webservice_arm:k900-xil container_name: port_drayage_webservice network_mode: host secrets: From 25dc8bb3805f772e5fb8b25e8b6177a044ec204d Mon Sep 17 00:00:00 2001 From: Saikrishna Bairamoni <84093461+SaikrishnaBairamoni@users.noreply.github.com> Date: Fri, 16 Jun 2023 14:35:00 -0400 Subject: [PATCH 08/12] update docker files to point 7.5.1 --- configuration/amd64/docker-compose.yml | 6 +++--- configuration/arm64/docker-compose.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/configuration/amd64/docker-compose.yml b/configuration/amd64/docker-compose.yml index 21b5a8368..201463578 100755 --- a/configuration/amd64/docker-compose.yml +++ b/configuration/amd64/docker-compose.yml @@ -20,7 +20,7 @@ services: - mysql-datavolume:/var/lib/mysql php: - image: usdotfhwaops/php:k900-xil + image: usdotfhwaops/php:7.5.1 container_name: php network_mode: host depends_on: @@ -30,7 +30,7 @@ services: tty: true v2xhub: - image: usdotfhwaops/v2xhubamd:k900-xil + image: usdotfhwaops/v2xhubamd:7.5.1 container_name: v2xhub network_mode: host restart: always @@ -44,7 +44,7 @@ services: - ./logs:/var/log/tmx - ./MAP:/var/www/plugins/MAP port_drayage_webservice: - image: usdotfhwaops/port-drayage-webservice:k900-xil + image: usdotfhwaops/port-drayage-webservice:7.5.1 container_name: port_drayage_webservice network_mode: host secrets: diff --git a/configuration/arm64/docker-compose.yml b/configuration/arm64/docker-compose.yml index 5537b1216..4974d26ee 100644 --- a/configuration/arm64/docker-compose.yml +++ b/configuration/arm64/docker-compose.yml @@ -20,7 +20,7 @@ services: - mysql-datavolume:/var/lib/mysql php: - image: usdotfhwaops/php_arm:k900-xil + image: usdotfhwaops/php_arm:7.5.1 container_name: php network_mode: host depends_on: @@ -30,7 +30,7 @@ services: tty: true v2xhub: - image: usdotfhwaops/v2xhubarm:k900-xil + image: usdotfhwaops/v2xhubarm:7.5.1 container_name: v2xhub network_mode: host restart: always @@ -44,7 +44,7 @@ services: - ./logs:/var/log/tmx - ./MAP:/var/www/plugins/MAP port_drayage_webservice: - image: usdotfhwaops/port-drayage-webservice_arm:k900-xil + image: usdotfhwaops/port-drayage-webservice_arm:7.5.1 container_name: port_drayage_webservice network_mode: host secrets: From ae58c2eb8cc06469845072aa02533a27dc4d4b35 Mon Sep 17 00:00:00 2001 From: Cody Garver Date: Mon, 19 Jun 2023 11:57:03 -0400 Subject: [PATCH 09/12] Bump version 7.5.0 to 7.5.1 --- src/v2i-hub/CARMACloudPlugin/CMakeLists.txt | 2 +- src/v2i-hub/CARMAStreetsPlugin/CMakeLists.txt | 2 +- src/v2i-hub/CDASimAdapter/CMakeLists.txt | 2 +- src/v2i-hub/CommandPlugin/CMakeLists.txt | 2 +- src/v2i-hub/CswPlugin/CMakeLists.txt | 2 +- src/v2i-hub/DmsPlugin/CMakeLists.txt | 2 +- src/v2i-hub/ERVCloudForwardingPlugin/CMakeLists.txt | 2 +- src/v2i-hub/ImmediateForwardPlugin/CMakeLists.txt | 2 +- src/v2i-hub/LocationPlugin/CMakeLists.txt | 2 +- src/v2i-hub/MapPlugin/CMakeLists.txt | 2 +- src/v2i-hub/MessageLoggerPlugin/CMakeLists.txt | 2 +- src/v2i-hub/MessageReceiverPlugin/CMakeLists.txt | 2 +- src/v2i-hub/ODEForwardPlugin/CMakeLists.txt | 2 +- src/v2i-hub/PedestrianPlugin/CMakeLists.txt | 2 +- src/v2i-hub/PortDrayagePlugin/CMakeLists.txt | 2 +- src/v2i-hub/PreemptionPlugin/CMakeLists.txt | 2 +- src/v2i-hub/RtcmPlugin/CMakeLists.txt | 2 +- src/v2i-hub/SpatPlugin/CMakeLists.txt | 2 +- src/v2i-hub/TimPlugin/CMakeLists.txt | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/v2i-hub/CARMACloudPlugin/CMakeLists.txt b/src/v2i-hub/CARMACloudPlugin/CMakeLists.txt index ad036336b..6c913e69d 100644 --- a/src/v2i-hub/CARMACloudPlugin/CMakeLists.txt +++ b/src/v2i-hub/CARMACloudPlugin/CMakeLists.txt @@ -1,4 +1,4 @@ -PROJECT ( CARMACloudPlugin VERSION 7.5.0 LANGUAGES CXX ) +PROJECT ( CARMACloudPlugin VERSION 7.5.1 LANGUAGES CXX ) SET (TMX_PLUGIN_NAME "CARMACloud") add_compile_options(-fPIC) diff --git a/src/v2i-hub/CARMAStreetsPlugin/CMakeLists.txt b/src/v2i-hub/CARMAStreetsPlugin/CMakeLists.txt index f904ecac6..7e4e9b6c9 100644 --- a/src/v2i-hub/CARMAStreetsPlugin/CMakeLists.txt +++ b/src/v2i-hub/CARMAStreetsPlugin/CMakeLists.txt @@ -1,4 +1,4 @@ -PROJECT ( CARMAStreetsPlugin VERSION 7.5.0 LANGUAGES CXX ) +PROJECT ( CARMAStreetsPlugin VERSION 7.5.1 LANGUAGES CXX ) BuildTmxPlugin ( ) diff --git a/src/v2i-hub/CDASimAdapter/CMakeLists.txt b/src/v2i-hub/CDASimAdapter/CMakeLists.txt index e8e8cd794..97468a2cf 100755 --- a/src/v2i-hub/CDASimAdapter/CMakeLists.txt +++ b/src/v2i-hub/CDASimAdapter/CMakeLists.txt @@ -1,4 +1,4 @@ -PROJECT ( CDASimAdapter VERSION 7.5.0 LANGUAGES CXX ) +PROJECT ( CDASimAdapter VERSION 7.5.1 LANGUAGES CXX ) set(CMAKE_CXX_STANDARD 17) FIND_PACKAGE( carma-clock ) diff --git a/src/v2i-hub/CommandPlugin/CMakeLists.txt b/src/v2i-hub/CommandPlugin/CMakeLists.txt index 651e1af0a..a1543ab51 100644 --- a/src/v2i-hub/CommandPlugin/CMakeLists.txt +++ b/src/v2i-hub/CommandPlugin/CMakeLists.txt @@ -1,4 +1,4 @@ -PROJECT ( CommandPlugin VERSION 7.5.0 LANGUAGES CXX ) +PROJECT ( CommandPlugin VERSION 7.5.1 LANGUAGES CXX ) FIND_PACKAGE (OpenSSL REQUIRED) diff --git a/src/v2i-hub/CswPlugin/CMakeLists.txt b/src/v2i-hub/CswPlugin/CMakeLists.txt index 66d0d9545..5e154a2c7 100644 --- a/src/v2i-hub/CswPlugin/CMakeLists.txt +++ b/src/v2i-hub/CswPlugin/CMakeLists.txt @@ -1,4 +1,4 @@ -PROJECT ( CswPlugin VERSION 7.5.0 LANGUAGES CXX ) +PROJECT ( CswPlugin VERSION 7.5.1 LANGUAGES CXX ) SET (TMX_PLUGIN_NAME "CSW") diff --git a/src/v2i-hub/DmsPlugin/CMakeLists.txt b/src/v2i-hub/DmsPlugin/CMakeLists.txt index 4508c8084..08cf09b17 100644 --- a/src/v2i-hub/DmsPlugin/CMakeLists.txt +++ b/src/v2i-hub/DmsPlugin/CMakeLists.txt @@ -1,4 +1,4 @@ -PROJECT ( DmsPlugin VERSION 7.5.0 LANGUAGES CXX ) +PROJECT ( DmsPlugin VERSION 7.5.1 LANGUAGES CXX ) SET (TMX_PLUGIN_NAME "Dynamic Message Sign") diff --git a/src/v2i-hub/ERVCloudForwardingPlugin/CMakeLists.txt b/src/v2i-hub/ERVCloudForwardingPlugin/CMakeLists.txt index 56f71f571..cc456077a 100644 --- a/src/v2i-hub/ERVCloudForwardingPlugin/CMakeLists.txt +++ b/src/v2i-hub/ERVCloudForwardingPlugin/CMakeLists.txt @@ -1,4 +1,4 @@ -PROJECT(ERVCloudForwardingPlugin VERSION 7.5.0 LANGUAGES CXX) +PROJECT(ERVCloudForwardingPlugin VERSION 7.5.1 LANGUAGES CXX) SET(TMX_PLUGIN_NAME "ERVCloudForwarding") add_compile_options(-fPIC) diff --git a/src/v2i-hub/ImmediateForwardPlugin/CMakeLists.txt b/src/v2i-hub/ImmediateForwardPlugin/CMakeLists.txt index e3d2365a2..31e28d6ae 100644 --- a/src/v2i-hub/ImmediateForwardPlugin/CMakeLists.txt +++ b/src/v2i-hub/ImmediateForwardPlugin/CMakeLists.txt @@ -1,4 +1,4 @@ -PROJECT ( ImmediateForwardPlugin VERSION 7.5.0 LANGUAGES CXX ) +PROJECT ( ImmediateForwardPlugin VERSION 7.5.1 LANGUAGES CXX ) SET (TMX_PLUGIN_NAME "Immediate Forward") diff --git a/src/v2i-hub/LocationPlugin/CMakeLists.txt b/src/v2i-hub/LocationPlugin/CMakeLists.txt index eb929373b..5926227c4 100644 --- a/src/v2i-hub/LocationPlugin/CMakeLists.txt +++ b/src/v2i-hub/LocationPlugin/CMakeLists.txt @@ -1,4 +1,4 @@ -project( LocationPlugin VERSION 7.5.0 LANGUAGES CXX ) +project( LocationPlugin VERSION 7.5.1 LANGUAGES CXX ) SET (TMX_PLUGIN_NAME Location) diff --git a/src/v2i-hub/MapPlugin/CMakeLists.txt b/src/v2i-hub/MapPlugin/CMakeLists.txt index 7cf372de0..553f1e58a 100644 --- a/src/v2i-hub/MapPlugin/CMakeLists.txt +++ b/src/v2i-hub/MapPlugin/CMakeLists.txt @@ -1,4 +1,4 @@ -PROJECT ( MapPlugin VERSION 7.5.0 LANGUAGES CXX ) +PROJECT ( MapPlugin VERSION 7.5.1 LANGUAGES CXX ) SET (TMX_PLUGIN_NAME "MAP") diff --git a/src/v2i-hub/MessageLoggerPlugin/CMakeLists.txt b/src/v2i-hub/MessageLoggerPlugin/CMakeLists.txt index b63b6d6df..514b31984 100644 --- a/src/v2i-hub/MessageLoggerPlugin/CMakeLists.txt +++ b/src/v2i-hub/MessageLoggerPlugin/CMakeLists.txt @@ -1,4 +1,4 @@ -PROJECT ( MessageLoggerPlugin VERSION 7.5.0 LANGUAGES CXX ) +PROJECT ( MessageLoggerPlugin VERSION 7.5.1 LANGUAGES CXX ) SET (TMX_PLUGIN_NAME "MessageLoggerPlugin") diff --git a/src/v2i-hub/MessageReceiverPlugin/CMakeLists.txt b/src/v2i-hub/MessageReceiverPlugin/CMakeLists.txt index f77e4c1a3..908bc1e90 100644 --- a/src/v2i-hub/MessageReceiverPlugin/CMakeLists.txt +++ b/src/v2i-hub/MessageReceiverPlugin/CMakeLists.txt @@ -1,4 +1,4 @@ -PROJECT ( MessageReceiverPlugin VERSION 7.5.0 LANGUAGES CXX ) +PROJECT ( MessageReceiverPlugin VERSION 7.5.1 LANGUAGES CXX ) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/src/v2i-hub/ODEForwardPlugin/CMakeLists.txt b/src/v2i-hub/ODEForwardPlugin/CMakeLists.txt index 815527534..8c594fdbe 100644 --- a/src/v2i-hub/ODEForwardPlugin/CMakeLists.txt +++ b/src/v2i-hub/ODEForwardPlugin/CMakeLists.txt @@ -1,4 +1,4 @@ -PROJECT ( ODEForwardPlugin VERSION 7.5.0 LANGUAGES CXX ) +PROJECT ( ODEForwardPlugin VERSION 7.5.1 LANGUAGES CXX ) SET (TMX_PLUGIN_NAME "ODEForwardPlugin") diff --git a/src/v2i-hub/PedestrianPlugin/CMakeLists.txt b/src/v2i-hub/PedestrianPlugin/CMakeLists.txt index 8b0ba693f..ecb8c8cec 100755 --- a/src/v2i-hub/PedestrianPlugin/CMakeLists.txt +++ b/src/v2i-hub/PedestrianPlugin/CMakeLists.txt @@ -1,4 +1,4 @@ -PROJECT ( PedestrianPlugin VERSION 7.5.0 LANGUAGES CXX ) +PROJECT ( PedestrianPlugin VERSION 7.5.1 LANGUAGES CXX ) SET (TMX_PLUGIN_NAME "Pedestrian") add_compile_options(-fPIC) diff --git a/src/v2i-hub/PortDrayagePlugin/CMakeLists.txt b/src/v2i-hub/PortDrayagePlugin/CMakeLists.txt index eb069bfd7..199be4090 100644 --- a/src/v2i-hub/PortDrayagePlugin/CMakeLists.txt +++ b/src/v2i-hub/PortDrayagePlugin/CMakeLists.txt @@ -1,4 +1,4 @@ -PROJECT ( PortDrayagePlugin VERSION 7.5.0 LANGUAGES CXX ) +PROJECT ( PortDrayagePlugin VERSION 7.5.1 LANGUAGES CXX ) SET (TMX_PLUGIN_NAME "PortDrayage") set(CMAKE_AUTOMOC ON) diff --git a/src/v2i-hub/PreemptionPlugin/CMakeLists.txt b/src/v2i-hub/PreemptionPlugin/CMakeLists.txt index eed709d13..1613c3b46 100644 --- a/src/v2i-hub/PreemptionPlugin/CMakeLists.txt +++ b/src/v2i-hub/PreemptionPlugin/CMakeLists.txt @@ -1,4 +1,4 @@ -PROJECT ( PreemptionPlugin VERSION 7.5.0 LANGUAGES CXX ) +PROJECT ( PreemptionPlugin VERSION 7.5.1 LANGUAGES CXX ) SET (TMX_PLUGIN_NAME "Preemption") diff --git a/src/v2i-hub/RtcmPlugin/CMakeLists.txt b/src/v2i-hub/RtcmPlugin/CMakeLists.txt index f10a35a31..694b04ef2 100644 --- a/src/v2i-hub/RtcmPlugin/CMakeLists.txt +++ b/src/v2i-hub/RtcmPlugin/CMakeLists.txt @@ -1,4 +1,4 @@ -PROJECT ( RtcmPlugin VERSION 7.5.0 LANGUAGES CXX ) +PROJECT ( RtcmPlugin VERSION 7.5.1 LANGUAGES CXX ) SET (TMX_PLUGIN_NAME "RTCM") diff --git a/src/v2i-hub/SpatPlugin/CMakeLists.txt b/src/v2i-hub/SpatPlugin/CMakeLists.txt index ec48c6f14..fb28fcada 100644 --- a/src/v2i-hub/SpatPlugin/CMakeLists.txt +++ b/src/v2i-hub/SpatPlugin/CMakeLists.txt @@ -1,4 +1,4 @@ -PROJECT ( SpatPlugin VERSION 7.5.0 LANGUAGES CXX ) +PROJECT ( SpatPlugin VERSION 7.5.1 LANGUAGES CXX ) SET (TMX_PLUGIN_NAME "SPAT") diff --git a/src/v2i-hub/TimPlugin/CMakeLists.txt b/src/v2i-hub/TimPlugin/CMakeLists.txt index 79a3ac8ca..3f8c9779e 100644 --- a/src/v2i-hub/TimPlugin/CMakeLists.txt +++ b/src/v2i-hub/TimPlugin/CMakeLists.txt @@ -1,4 +1,4 @@ -PROJECT ( TimPlugin VERSION 7.5.0 LANGUAGES CXX ) +PROJECT ( TimPlugin VERSION 7.5.1 LANGUAGES CXX ) SET (TMX_PLUGIN_NAME "TIM") add_compile_options(-fPIC) From f37c8bab51becf653927b97f961eb856c21b15c6 Mon Sep 17 00:00:00 2001 From: Saikrishna Bairamoni <84093461+SaikrishnaBairamoni@users.noreply.github.com> Date: Fri, 23 Jun 2023 09:44:05 -0400 Subject: [PATCH 10/12] Update Release_notes.md --- docs/Release_notes.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/docs/Release_notes.md b/docs/Release_notes.md index 3ab4842c9..770b29f93 100644 --- a/docs/Release_notes.md +++ b/docs/Release_notes.md @@ -1,6 +1,43 @@ V2X-Hub Release Notes --------------------------------- +Version 7.5.1, released June 21st, 2023 +-------------------------------------------------------- + +**Summary:** +V2X Hub release 7.5.1 includes added functionality to integrate V2X Hub with CDASim environment. This integration includes V2X Hub registering as a Roadside Unit (RSU) in the CDASim environment, consuming and producing J2735 messages to the CDASim environment, and adding functionality to synchronize plugins to CDASim simulation time. + +**V2X Hub CDASim Functionalities ** + +Enhancements in this release: + +- Added new carma-time-lib to V2X Hub to allow services to use an external source for time value and update rate. +- Added new Plugin Client ClockAware, which extends Plugin Client and implements functionality to consume time sync messages and updates a carma-clock object from carma-time-lib. Any plugins that want to synchronize their time to simulation must extend this plugin to gain access to this functionality. +- Added CDASim Adapter plugin which is responsible for establishing connection between V2X Hub and CDASim environment. This includes a handshake that provides information about the V2X Hub simulated location and ID and message forwarding for J2735 messages and time synchronization messages. This plugin requires several environment variables to be set which are documented on the GitHub repo README.md. + +Fixes in this release: + +- PR 488: Added a simulated clock functionality with the new time library and tested. +- PR 489: Setup Kafka consumers for the time topic when running in simulation mode. +- Issue 492: Created a carma-simulation adapter shell for service that will act as adapter for CARMA Simulation integration. +- PR 509: Added a V2X Hub plugin inside the simulation platform to receive all messages from V2X Hub. This plugin contains parameters and variables that are provided in real-world scenarios. +- Issue 514: Added handshake functionality to carma-simulation ambassador instance which register’s the V2X Hub instance inside the simulator to allow multiple V2X Hub instances to connect with a single CARMA Simulation platform. +- Issue 535: Updated infrastructure registration to use a cartesian point as location over a geodetic point to allow for easier configuration of simulated location of an RSU. +- Issue 537: Fixed configuration parameters to correctly map X, Y, Z coordinates to Point for Infrastructure registration in CDASim Adapter. +- Issue 525: Fixed CDASim Adapter plugin that throws an exception while attempting CDASim handshake with CARMA-Simulation. + +Known issues in this release: + +- Issue #540: CDASim Time Synchronization is non-time-regulating. If simulation runs too fast (faster than real-time) for V2X Hub to keep up, V2X Hub can fall behind in time. +- Issue #507: SPaT plugin throws segfault when in SIM MODE +- Issue #10 in carma-time-lib (not V2X Hub repo): wait_for_initialization does not support notifying multiple threads Work around exists for services/plugins using carma-time-lib. + +**Other ** + +Enhancements in this release: + +- Issue 511: Added new functionality get the log time for a message received in V2xHub to forward to Carma cloud, and from receiving in Carma Cloud to forward V2xhub. + Version 7.5.0, released May 5th, 2023 -------------------------------------------------------- From 78135cc08251d62404615e0e58b863ffeac271e9 Mon Sep 17 00:00:00 2001 From: Saikrishna Bairamoni <84093461+SaikrishnaBairamoni@users.noreply.github.com> Date: Fri, 23 Jun 2023 16:56:18 -0400 Subject: [PATCH 11/12] Update Release_notes.md with new changes --- docs/Release_notes.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/Release_notes.md b/docs/Release_notes.md index 770b29f93..d7b326b3b 100644 --- a/docs/Release_notes.md +++ b/docs/Release_notes.md @@ -5,7 +5,7 @@ Version 7.5.1, released June 21st, 2023 -------------------------------------------------------- **Summary:** -V2X Hub release 7.5.1 includes added functionality to integrate V2X Hub with CDASim environment. This integration includes V2X Hub registering as a Roadside Unit (RSU) in the CDASim environment, consuming and producing J2735 messages to the CDASim environment, and adding functionality to synchronize plugins to CDASim simulation time. + V2X Hub release 7.5.1 includes added functionality to integrate V2X Hub with CDASim environment. This integration includes V2X Hub registering as a Roadside Unit (RSU) in the CDASim environment, consuming and producing J2735 messages to the CDASim environment, and adding functionality to synchronize plugins to CDASim simulation time. **V2X Hub CDASim Functionalities ** @@ -30,7 +30,8 @@ Known issues in this release: - Issue #540: CDASim Time Synchronization is non-time-regulating. If simulation runs too fast (faster than real-time) for V2X Hub to keep up, V2X Hub can fall behind in time. - Issue #507: SPaT plugin throws segfault when in SIM MODE -- Issue #10 in carma-time-lib (not V2X Hub repo): wait_for_initialization does not support notifying multiple threads Work around exists for services/plugins using carma-time-lib. +- Issue #10 in carma-time-lib (not V2X Hub repo): wait_for_initialization does not support notifying multiple threads Work around exists for services/plugins using carma-time-lib. +- Issue #543: CARMA Streets Plugin Kafka Consumers can send redundant subscription attempts on initialization and can cause subscriptions to silently fail. **Other ** From e81bdc02dcd7ff7770a8bcc57ade8c6b21806bf6 Mon Sep 17 00:00:00 2001 From: Saikrishna Bairamoni <84093461+SaikrishnaBairamoni@users.noreply.github.com> Date: Wed, 19 Jul 2023 00:32:43 -0400 Subject: [PATCH 12/12] update dockercompose files to point latest images and syc with 7.5.1 release changes --- configuration/amd64/docker-compose.yml | 6 +++--- configuration/arm64/docker-compose.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/configuration/amd64/docker-compose.yml b/configuration/amd64/docker-compose.yml index 201463578..6b5188297 100755 --- a/configuration/amd64/docker-compose.yml +++ b/configuration/amd64/docker-compose.yml @@ -20,7 +20,7 @@ services: - mysql-datavolume:/var/lib/mysql php: - image: usdotfhwaops/php:7.5.1 + image: usdotfhwaops/php:latest container_name: php network_mode: host depends_on: @@ -30,7 +30,7 @@ services: tty: true v2xhub: - image: usdotfhwaops/v2xhubamd:7.5.1 + image: usdotfhwaops/v2xhubamd:latest container_name: v2xhub network_mode: host restart: always @@ -44,7 +44,7 @@ services: - ./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:latest container_name: port_drayage_webservice network_mode: host secrets: diff --git a/configuration/arm64/docker-compose.yml b/configuration/arm64/docker-compose.yml index 4974d26ee..a32c31fab 100644 --- a/configuration/arm64/docker-compose.yml +++ b/configuration/arm64/docker-compose.yml @@ -20,7 +20,7 @@ services: - mysql-datavolume:/var/lib/mysql php: - image: usdotfhwaops/php_arm:7.5.1 + image: usdotfhwaops/php_arm:latest container_name: php network_mode: host depends_on: @@ -30,7 +30,7 @@ services: tty: true v2xhub: - image: usdotfhwaops/v2xhubarm:7.5.1 + image: usdotfhwaops/v2xhubarm:latest container_name: v2xhub network_mode: host restart: always @@ -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:latest container_name: port_drayage_webservice network_mode: host secrets: