esmini / esmini

a basic OpenSCENARIO player
Mozilla Public License 2.0
752 stars 216 forks source link

OSI bbcenter_to_rear not as specified in OpenScenario #421

Closed ClemensLinnhoff closed 1 year ago

ClemensLinnhoff commented 1 year ago

The OSI bbcenter_to_rear is not as specified in Open Scenario. E.g. for the ego vehicle "car_white" the rear axle position is specified as x="0.0", (y="0.0"), z="0.4". The corresponding bounding box center is defined as x="1.4" y="0.0" z="0.75". So I would expect bbcenter_to_rear = -1.4, 0.0, -0.35. But it outputs: -1.45801, -0.00328916, -0.366293. So there seem to be large numerical errors.

Further investigation shows, that the bounding box center is correctly read from the OpenScenario file in ScenarioReader.cpp. But it ends up wrong in objectState->state.info.boundingbox.center in the OSIReporter.cpp.

I encountered this problem trying to fix issue #415.

ClemensLinnhoff commented 1 year ago

I found the solution: The bounding box information is adjusted to the bounding box of the osgb model. This can be deactivated by setting the scaleModel property in the OpenScenario file to "ModelToBB"