-
Notifications
You must be signed in to change notification settings - Fork 67
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
MOSAIC-CARMA-Streets: CDASimAdapter listens on port for incoming Simulated Object Dectections and publish the serialized object to Kafka #552
Conversation
- SIM_INTERACTION_PORT=7576 | ||
- V2X_PORT=8686 | ||
- INFRASTRUCTURE_ID=1 | ||
- KAFKA_BROKER_ADDRESS=127.0.0.1:9092 |
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.
This is no required. Also we do not want our default docker-compose file to assume simulation.
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.
addressed. Which docker-compose file is used for simulation other than the devcontainer?
|
||
void CARMAStreetsPlugin::HandleSimulatedSensorDetectedMessage(simulation::SensorDetectedObject &msg, routeable_message &routeableMsg) | ||
{ | ||
PLOG(logINFO) << "Produce sensor detected message in JSON format: " << msg.to_string() <<std::endl; |
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.
Lets make this debug.
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.
addressed
"payload": { | ||
"sensor": { | ||
"id": "SomeID", | ||
"type": "SematicLidar", |
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 talked about removing sensor type and location from this message. The message should now only include sensor id and projection string.
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 only have proj_string for sensor? or this proj_string is for both sensor and detected object?
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 talked about removing sensor type and location from this message. The message should now only include sensor id and projection string.
addressed
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 guess technically we do not need it for sensor registration. We definitely need it for sensor detected object.
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.
How do we know the location (x,y,z) of the sensor if no proj_string is applied to sensor?
}, | ||
"payload": { | ||
"sensor": { | ||
"id": "SomeID", |
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.
also maybe we should rename this field everywhere to sensorId instead of id which may be ambiguous. We can also avoid the nested sensor JSON altogether.
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.
{ "sensorId": "sensor1",
"proj_string": "asdlasdkasd",
...
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.
addressed
A test case is still failing so we are not getting any sonar scanner report. |
} | ||
}//End lambda | ||
, std::chrono::milliseconds(100)); | ||
external_bject_detection_thread_timer->Start(); |
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.
looks like there may be a type in this variable name. Not a big deal,just in case you didnt notice
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.
updated
@@ -22,9 +22,9 @@ namespace CDASimAdapter { | |||
class TestCARMASimulationConnection : public ::testing::Test { | |||
protected: | |||
void SetUp() override { | |||
// Initialize CARMA Simulation connection with (0,0,0) location. | |||
// Initialize CARMA Simulation connection with (0,0,0) location and mock kafka producer. |
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.
There is no mock kafka producer
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.
removed
PR Details
Description
Implement the design from https://usdot-carma.atlassian.net/browse/CDAR-148
Part 2.B: Implement the logic in CDASimAdapter to listen to UDP socket and receive DetectedObject. Then serialize this C++ object to TMX bus so that CARMAStreetPlugin can receive it form the TMX bus.
As a V2X-Hub user, I need the CDASimAdapter to listen for Simulated Object Detection Messages on an open port and broadcast received messages on the TMX message bus.
Related Issue
#590
Related Jira Key
https://usdot-carma.atlassian.net/browse/CDAR-191
https://usdot-carma.atlassian.net/browse/CDAR-184
Motivation and Context
CDA research
How Has This Been Tested?
Unit test
Local integration test
Types of changes
Checklist:
V2XHUB Contributing Guide