usdot-fhwa-OPS / V2X-Hub

V2X Hub is a message handler that acts as a translator and data aggregator/disseminator for infrastructure components of a connected vehicle deployment.
118 stars 67 forks source link

CDAR-756: Update UDPSockets to listen at higher frequency #579

Closed paulbourelly999 closed 5 months ago

paulbourelly999 commented 5 months ago

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

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

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

Related Issue

CDAR-756

589

Motivation and Context

Fix detection data delay for SDSM data

How Has This Been Tested?

CDASim Deployment

Types of changes

Checklist: