-
Notifications
You must be signed in to change notification settings - Fork 68
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
Optional SENSOR_CONFIG_JSON_FILE #616
Optional SENSOR_CONFIG_JSON_FILE #616
Conversation
…whether environment variable is required or not
{ | ||
PLOG(logWARNING) << "Sensors JSON is empty!" << std::endl; | ||
} | ||
message["sensors"] = sensors_json_v; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to set this sensors in message? I noticed that if the path to sensor json file is empty, this sensors is not set in message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep it is an optional part of the registration message. When included it configures simulated sensor for V2X-Hub/CARMA-Streets. Since V2X-Hub/CARMA-Streets basic functionality does not require sensors it is also not required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get the optional part. I am trying to make a note that whether we need to set message["sensors"] = sensors_json_v;
when it is empty because I see it is not set when the path is empty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not need the that part when the sensor configuration file is empty or missing
configuration/README.md
Outdated
* **V2X_PORT** – Environment variable for storing port for receiving v2x messages from CDASim | ||
* **SIM_V2X_PORT** – Environment variable for storing port for sending v2x messages to CDASim | ||
* **LOCAL_IP** – Environment variable for storing local IP of V2X Hub. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently we are passing the "LOCAL_IP" as "V2XHUB_IP" from .env file. Not sure if we need to update all the files to use "V2XHUB_IP" everywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will update to V2X-Hub IP
Quality Gate failedFailed conditions |
PR Details
Description
This PR makes the SENSOR_JSON_FILE_PATH an optional environment variable in simulation since spawning sensors is not required for the base line functionality of V2X-Hub. Prior to this PR, the CDASimAdapter would accept empty SENSOR_JSON_FILE_PATH files but not missing ones.
Related Issue
VH-1320
Motivation and Context
Improve usability by making CDASimAdapterPlugin work without SENSOR_JSON_FILE_PATH optional environment variable
How Has This Been Tested?
Tested in CDASim Cloud deployment
Types of changes
Checklist:
V2XHUB Contributing Guide