Skip to content
Snippets Groups Projects

fix(Sensor_OSI): Restore lost code for static AEB configuration

Merged Reinhard Biegel requested to merge rbiegel/opSimulation:90-restore-lost-code into develop
3 files
+ 66
11
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -2,7 +2,7 @@
* Copyright (c) 2020 HLRS, University of Stuttgart
* 2018-2020 in-tech GmbH
* 2022-2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
* 2023 Hexad GmbH
* 2022-2023 Hexad GmbH
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
@@ -37,6 +37,11 @@ static std::vector<osi3::DetectedMovingObject> RetrieveMovingObjectsBySensorId(c
auto detectedMovingObjects = sensorData.moving_object();
for (const auto& object : detectedMovingObjects)
{
if (sensorIds.empty())
{
result.push_back(object);
continue;
}
for (auto sensorId : object.header().sensor_id())
{
if (std::count(sensorIds.cbegin(), sensorIds.cend(), sensorId.value()) > 0)
@@ -61,6 +66,11 @@ static std::vector<osi3::DetectedStationaryObject> RetrieveStationaryObjectsBySe
auto detectedStationaryObjects = sensorData.stationary_object();
for (const auto& object : detectedStationaryObjects)
{
if (sensorIds.empty())
{
result.push_back(object);
continue;
}
for (auto sensorId : object.header().sensor_id())
{
if (std::count(sensorIds.cbegin(), sensorIds.cend(), sensorId.value()) > 0)
Loading