ad_rss
RssSituationExtraction.hpp
Go to the documentation of this file.
1 // ----------------- BEGIN LICENSE BLOCK ---------------------------------
2 //
3 // Copyright (C) 2018-2021 Intel Corporation
4 //
5 // SPDX-License-Identifier: LGPL-2.1-only
6 //
7 // ----------------- END LICENSE BLOCK -----------------------------------
12 #pragma once
13 
16 
20 namespace ad {
24 namespace rss {
28 namespace world {
32 class RssSituationIdProvider;
33 } // namespace world
34 
38 namespace core {
39 
46 {
47 public:
52 
57 
66  bool extractSituations(world::WorldModel const &worldModel, situation::SituationSnapshot &situationSnapshot);
67 
68 private:
69  void calcluateRelativeLongitudinalPosition(physics::MetricRange const &egoMetricRange,
70  physics::MetricRange const &otherMetricRange,
71  situation::LongitudinalRelativePosition &longitudinalPosition,
72  physics::Distance &longitudinalDistance);
73  void calcluateRelativeLongitudinalPositionIntersection(physics::MetricRange const &egoMetricRange,
74  physics::MetricRange const &otherMetricRange,
75  situation::LongitudinalRelativePosition &longitudinalPosition,
76  physics::Distance &longitudinalDistance);
77  void calcluateRelativeLateralPosition(physics::MetricRange const &egoMetricRange,
78  physics::MetricRange const &otherMetricRange,
79  situation::LateralRelativePosition &lateralPosition,
80  physics::Distance &lateralDistance);
81  bool convertObjectsNonIntersection(world::Scene const &currentScene, situation::Situation &situation);
82  void convertToIntersectionCentric(physics::MetricRange const &objectDimension,
83  physics::MetricRange const &intersectionPosition,
84  physics::MetricRange &dimensionsIntersection);
85  bool convertObjectsIntersection(world::Scene const &currentScene, situation::Situation &situation);
86 
96  bool extractSituationInputRangeChecked(world::TimeIndex const &timeIndex,
97  world::Scene const &currentScene,
98  situation::Situation &situation);
99  enum class MergeMode
100  {
101  EgoVehicle,
102  OtherVehicle
103  };
104  bool mergeVehicleStates(MergeMode const &mergeMode,
105  situation::VehicleState const &otherVehicleState,
106  situation::VehicleState &mergedVehicleState);
107  bool mergeSituations(situation::Situation const &otherSituation, situation::Situation &mergedSituation);
108 
109  std::unique_ptr<ad::rss::world::RssSituationIdProvider> mSituationIdProvider;
110 };
111 
112 } // namespace core
113 } // namespace rss
114 } // namespace ad
ad
namespace ad
Definition: LateralRelativePosition.hpp:26
ad::rss::situation::Situation
DataType Situation.
Definition: Situation.hpp:53
ad::rss::world::TimeIndex
uint64_t TimeIndex
DataType TimeIndex.
Definition: TimeIndex.hpp:39
SituationSnapshot.hpp
ad::rss::situation::VehicleState
DataType VehicleState.
Definition: VehicleState.hpp:51
ad::rss::situation::SituationSnapshot
DataType SituationSnapshot.
Definition: SituationSnapshot.hpp:45
ad::rss::situation::LongitudinalRelativePosition
LongitudinalRelativePosition
DataType LongitudinalRelativePosition.
Definition: LongitudinalRelativePosition.hpp:42
ad::rss::world::Scene
DataType Scene.
Definition: Scene.hpp:48
ad::rss::core::RssSituationExtraction::RssSituationExtraction
RssSituationExtraction()
constructor
ad::rss::core::RssSituationExtraction::~RssSituationExtraction
~RssSituationExtraction()
destructor
ad::rss::core::RssSituationExtraction
class RssSituationExtraction
Definition: RssSituationExtraction.hpp:45
ad::rss::situation::LateralRelativePosition
LateralRelativePosition
DataType LateralRelativePosition.
Definition: LateralRelativePosition.hpp:42
ad::rss::world::WorldModel
DataType WorldModel.
Definition: WorldModel.hpp:46
WorldModel.hpp
ad::rss::core::RssSituationExtraction::extractSituations
bool extractSituations(world::WorldModel const &worldModel, situation::SituationSnapshot &situationSnapshot)
Extract all RSS situations to be checked from the world model.