usdot-fhwa-stol / carma-utils

Utility libraries for hardware drivers in the CARMA Platform
2 stars 5 forks source link

Fix/occlusion fix #198

Closed MishkaMN closed 10 months ago

MishkaMN commented 10 months ago

PR Details

Description

Y value fix: Previously we discovered that the Y value of CARLA objects are wrong. We incorrectly assumed that the hitpoints report absolute values. hitpoints from sensor is probably correct as they are in their own frame (small values, smaller the distance). However, the object's locations and sensor's locations all report in negative Y value. Therefore, it is the best to do all the calculations as is and only change the Y value before reporting the detected objects to the caller of the sensor.

Also for complete occlusion-fix, this is accompanied by this PR: https://github.com/usdot-fhwa-stol/carma-carla-integration/pull/54/files

More Data: Data about actors in the scene where CAR is actually lower Y value in correct map, but the data returned from CARLA is inverted:

[DetectedObject(objectId=207, type='CAR', position=array([ 237.710327, -169.307953, 2.32106090e-01]), DetectedObject(objectId=220, type='TRUCK', position=array([ 239.819992, -173.389999, 1.90679163e-01])

Sensor data returned from the sensor has also inverted Y:

pre_association: [ 2.125664 -3.06154299 0.33665588] pre_association: [ 2.26882815 -3.03080082 -1.09483194] pre_association: [ 4.30117178 -2.98634768 -0.83236283] pre_association: [ 1.90921867 -3.21779299 -0.35920775] pre_association: [ 1.89583981 -3.1952734 -0.82916898]

I am not sure how the internal CARLA logic works, but the Y in lidar hitpoint is also inverted as shown above which should report positive Y values.

Related GitHub Issue

Y value fix: Fix for PR: https://github.com/usdot-fhwa-stol/carma-utils/pull/191 Also fixes occlusion: https://github.com/usdot-fhwa-stol/carma-utils/issues/194

Related Jira Key

Closes: https://github.com/usdot-fhwa-stol/carma-utils/issues/190

Closes CDAR-534

Motivation and Context

How Has This Been Tested?

CDASIM integration tested, platform reports y values in positive

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
No data about Coverage
No data about Duplication

See analysis details on SonarCloud