Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CDAR-756: Update UDPSockets to listen at higher frequency (#579)
<!-- Thanks for the contribution, this is awesome. --> # PR Details ## Description When running a simulation with CARMA Streets, the position data in the SDSMs appear to lag the ground truth significantly. In the included image, the square inside the blue circle indicates the VRU’s reported position in the SDSM. The blue square is its actual position. They yellow circle shows CARMA’s reported SDSM position with the green rectangle showing its actual position. ![image](https://github.com/usdot-fhwa-OPS/V2X-Hub/assets/77466294/72627660-d8ab-4a4e-8c37-db73c3bd919c) Based on a visualization of carla-sensor-lib’s logs for the pedestrian (actor 221), it appears that the position data does get updated at some point. The image below is a timestamp vs. x position graph. After further investigation, there is a difference in time stamps between the SDSMs and external objects. ![image](https://github.com/usdot-fhwa-OPS/V2X-Hub/assets/77466294/3ddcf1ae-8429-4d3b-82c4-66f2fc646200) It was found that is was largely due to the CDASimAdapter only consuming detection data at 10 hz (wall time). When running at real-time speed, the simulation can generate detection data at significantly higher frequency. This PR updates the consuming frequency to 200 Hz. This fix should be sufficient until the number of simultaneous detection exceeds 10 objects of 100Hz frequency. Improved delay shown below: ![screenshot](https://github.com/usdot-fhwa-OPS/V2X-Hub/assets/77466294/1d03c6c0-bbf2-4318-86ad-583e2b1ae6a6) <!--- Describe your changes in detail --> ## Related Issue <!--- This project only accepts pull requests related to open issues --> <!--- If suggesting a new feature or change, please discuss it in an issue first --> <!--- If fixing a bug, there should be an issue describing it with steps to reproduce --> <!--- Please link to the issue here: --> ## Motivation and Context Fix detection data delay for SDSM data <!--- Why is this change required? What problem does it solve? --> ## How Has This Been Tested? CDASim Deployment <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [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: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [ ] 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.
- Loading branch information