usdot-fhwa-stol / carma-streets

CARMA Streets is a component of CARMA ecosystem, which enables such a coordination among different transportation users. This component provides an interface for CDA participants to interact with the road infrastructure. Doxygen Source Code Documentation: https://usdot-fhwa-stol.github.io/documentation/carma-streets/
10 stars 10 forks source link

Fix SDSM serialization #389

Closed paulbourelly999 closed 10 months ago

paulbourelly999 commented 10 months ago

PR Details

Description

NOTE: Depend on CI fix from https://github.com/usdot-fhwa-stol/carma-streets/pull/390 Update: PR #390 closed CARMA Streets is producing Sensor Data Sharing Messages without yaw rate confidence. This is despite being provided accurate angular acceleration data from simulation.

[2024-01-22 12:52:42.675] [debug] [sensor_data_sharing_service.cpp:102] Detected Object List Size 1 after consumed: {"type":"TRUCK","confidence":1.0,"sensorId":"IntersectionLidar","projString":"+proj=tmerc +lat_0=0 +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +geoidgrids=egm96_15.gtx +vunits=m +no_defs","objectId":222,"position":{"x":-23.70157158620998,"y":-4.561758806718842,"z":-9.991932254782586},"positionCovariance":[[0.04000000000000001,0.0,0.0],[0.0,0.04000000000000001,0.0],[0.0,0.0,0.04000000000000001]],"velocity":{"x":0.0,"y":0.0,"z":0.0},"velocityCovariance":[[0.04000000000000001,0.0,0.0],[0.0,0.04000000000000001,0.0],[0.0,0.0,0.04000000000000001]],"angularVelocity":{"x":0.0,"y":0.0,"z":0.0},"angularVelocityCovariance":[[0.010000000000000002,0.0,0.0],[0.0,0.010000000000000002,0.0],[0.0,0.0,0.010000000000000002]],"size":{"length":2.601919174194336,"height":1.3072861433029175,"width":1.2337223291397095},"timestamp":41343}
...
[2024-01-22 12:52:42.675] [debug] [sensor_data_sharing_service.cpp:124] Sending SDSM : {"msg_cnt":0,"source_id":"rsu_1234","equipment_type":1,"sdsm_time_stamp":{"second":9400,"minute":0,"hour":0,"day":1,"month":1,"year":1970,"offset":0},"ref_pos":{"long":23697,"lat":16102,"elevation":100},"ref_pos_xy_conf":{"semi_major":0,"semi_minor":0,"orientation":0},"objects":[{"detected_object_data":{"detected_object_common_data":{"obj_type":1,"object_id":222,"obj_type_cfd":100,"measurement_time":0,"time_confidence":0,"pos":{"offset_x":-237,"offset_y":-45,"offset_z":-99},"pos_confidence":{"pos":10,"elevation":10},"speed":0,"speed_confidence":5,"speed_z":0,"speed_confidence_z":5,"heading":0,"heading_conf":1},"detected_object_optional_data":{"detected_vehicle_data":{"size":{"width":123,"length":260},"height":26}}}}]}

Added curly braces to if statements Added unit test to cover yaw rate confidence serialization Fixed SDSM deserialization to not require acceleration data to write yaw rate confidence

Related GitHub Issue

Related Jira Key

CDAR-738

Motivation and Context

Fix SDSM serialization for VRU UC1 testing

How Has This Been Tested?

Unit Testing

Types of changes

Checklist:

sonarcloud[bot] commented 10 months ago

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud