-
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
Streets MOSAIC integration: CDASimAdapter register with Simulation ambassador and send sensors information #554
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
d0a5fbc
init
dan-du-car c96db25
Merge branch 'develop' into register_cdasim_adapter
dan-du-car c4474a8
update
dan-du-car 950a211
add sensor json
dan-du-car 297e147
CI build fix
dan-du-car 4a76dd0
CI build fix
dan-du-car a7ffaa6
update file path
dan-du-car 680b94e
update file path
dan-du-car f9b2190
update PR
dan-du-car f5840ff
update
dan-du-car 7a1fc37
add unit test
dan-du-car 44685f3
address comments
dan-du-car 9ae8603
address comments
dan-du-car c1c334f
reafactor func
dan-du-car 85280e4
code smell
dan-du-car 9abb47b
address comments
dan-du-car 55221e3
address comments
dan-du-car e1825e7
fix unit test failure
dan-du-car 646168a
address comments
dan-du-car b2ba7b9
address comments
dan-du-car d3c8d53
address comments
dan-du-car 0db0b59
add comments to python script
dan-du-car fa44458
add comments to python script
dan-du-car f438b05
update unit test
dan-du-car 11a36d6
update unit test
dan-du-car 0c615eb
update unit test
dan-du-car File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import socket | ||
''' | ||
Purpose: This script is to launch a UDP server and used to test the CDASimAdapter simulation registration. | ||
Usage: Run this script first, it shall open a socket listenning to port 6767. | ||
Launch the v2xhub and enable the CDASimAdapter plugin. Upon the plugin startup, | ||
it sends registration message to port 6767. This UDP server shall receive the registration message, | ||
and print this message on the terminal. | ||
Run command: python3 udp_socket_server.py | ||
''' | ||
UDP_IP = "127.0.0.1" | ||
UDP_SOCKET_PORT_SIM_REGISTRATION = 6767 | ||
|
||
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | ||
sock.bind((UDP_IP, UDP_SOCKET_PORT_SIM_REGISTRATION)) | ||
print("Server Listenning on port: %s" % UDP_SOCKET_PORT_SIM_REGISTRATION) | ||
|
||
while True: | ||
data, addr = sock.recvfrom(1024) | ||
print("recevied message: %s" % data) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[ | ||
{ | ||
"sensorId": "SomeID", | ||
"type": "SematicLidar", | ||
"location": { | ||
"x": 0.0, | ||
"y": 0.0, | ||
"z": 0.0 | ||
}, | ||
"orientation": { | ||
"yaw": 0.0, | ||
"pitch": 0.0, | ||
"roll": 0.0 | ||
} | ||
}, | ||
{ | ||
"sensorId": "SomeID2", | ||
"type": "SematicLidar", | ||
"location": { | ||
"x": 1.0, | ||
"y": 2.0, | ||
"z": 0.0 | ||
}, | ||
"orientation": { | ||
"yaw": 23.0, | ||
"pitch": 0.0, | ||
"roll": 0.0 | ||
} | ||
} | ||
] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What was your reasoning for including this as an environment variable instead of a plugin configuration similar to location. Just curious, I think we need to define a clear line between what we use as environment variables and what ew configure in the plugin. Simulation configurations are good to have in as environment variables because they do not require configuration and can be read easily at startup. They are also unlikely to change dynamically. I think that makes sense for the sensor configuration file as well.
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.
Did you answer your own question? Yeah, I agree that the file path for sensors shall not change constantly.
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.
Yeah just wanted to bring it up, that we give thought to what is an environment variable and what is a configuration parameter.