Skip to content
Snippets Groups Projects
Commit b7df4a3b authored by Xiao Pan's avatar Xiao Pan
Browse files

Merge branch 'improved_overlapping_message_free_longitudinal_distance' into...

Merge branch 'improved_overlapping_message_free_longitudinal_distance' into 'existing_open_scenario_1_engine'

Improved message error for overlappin in calculatelongitudinalfreespace

See merge request eclipse/simopenpass/openscenario1_engine!40
parents 34e6b7f8 2b8ce9f0
No related branches found
No related tags found
No related merge requests found
......@@ -80,7 +80,7 @@ units::length::meter_t EntityUtils::CalculateLongitudinalFreeSpaceDistance(
(master_max_x > entity_min_x && master_max_x < entity_max_x))
{
std::cout << "Warning: in CalculateLongitudinalFreeSpaceDistance Entity \"" << master_entity.GetName()
<< "\" and \"" << reference_entity.GetName() << "\" are overlapping" << std::endl;
<< "\" and \"" << reference_entity.GetName() << "\" are overlapping in the x-axis" << std::endl;
return units::length::meter_t{0.0};
}
......@@ -110,7 +110,7 @@ units::length::meter_t EntityUtils::CalculateRelativeLongitudinalDistance(
const auto ref_entity_origin_local_position = environment->GetGeometryHelper()->TransformPositionFromWorldToLocal(
reference_entity_origin_global_position, master_entity_origin_global_position, master_entity.GetOrientation());
return units::math::abs(ref_entity_origin_local_position.x);
}
} // namespace OPENSCENARIO
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment