Geometric center of vehicle in CollisionPostCrash potentially wrong
The CollisionPostCrash module currently uses half of the wheelbase to calculate the geometrical center of the vehicle.
agentPosition.x = agentPosition.x + std::cos(agentAngle) * agent->GetVehicleModelParameters().wheelbase / 2.0; // geometrical center of vehicle in global CS agentPosition.y = agentPosition.y + std::sin(agentAngle) * agent->GetVehicleModelParameters().wheelbase / 2.0; // geometrical center of vehicle in global CS
This only works if the remaining length from the frontaxle to the front of the car is equal to the remaining length from the rearaxle to the rear of the car.
The x-Coordinate of the boundingbox center describes the offset of the boundingbox center to the reference point (rear axle) and should be used for this calculation.
sim/src/core/slave/modules/Manipulator/srcCollisionPostCrash/collisionDetection_Impact_implementation.cpp, GetAgentCorners(), Line 40