ad_rss_map_integration
RssSceneCreator.hpp
Go to the documentation of this file.
1 // ----------------- BEGIN LICENSE BLOCK ---------------------------------
2 //
3 // Copyright (C) 2019-2021 Intel Corporation
4 //
5 // SPDX-License-Identifier: LGPL-2.1-only
6 //
7 // ----------------- END LICENSE BLOCK -----------------------------------
12 #pragma once
13 
14 #include <ad/map/intersection/Intersection.hpp>
15 #include <ad/map/route/FullRoute.hpp>
16 #include <ad/rss/world/WorldModel.hpp>
19 
23 namespace ad {
27 namespace rss {
31 namespace map {
32 
34 class RssSceneCreation;
35 
40 {
41 public:
53  RssSceneCreator(RssSceneCreation::RestrictSpeedLimitMode const &restrictSpeedLimitMode,
54  ::ad::map::landmark::LandmarkIdSet const &greenTrafficLights,
55  RssSceneCreation &sceneCreation);
56 
63  explicit RssSceneCreator(RssSceneCreation &sceneCreation);
64 
68  ~RssSceneCreator() = default;
69 
79  bool appendNotRelevantScene(::ad::map::route::FullRoute const &route,
81  RssObjectConversion::ConstPtr otherObject);
82 
94  bool appendNonIntersectionScene(::ad::map::route::ConnectingRoute const &connectingRoute,
95  ::ad::rss::situation::SituationType const &situationType,
97  RssObjectConversion::ConstPtr otherObject);
98 
109  bool appendMergingScene(::ad::map::route::ConnectingRoute const &connectingRoute,
110  ::ad::rss::situation::SituationType const &situationType,
112  RssObjectConversion::ConstPtr otherObject);
113 
126  bool appendIntersectionScene(::ad::map::intersection::IntersectionPtr intersection,
127  ::ad::map::route::FullRoute const &egoRoute,
128  ::ad::map::route::FullRoute const &objectRoute,
129  ::ad::map::route::FullRoute const &intersectionOtherRoute,
131  RssObjectConversion::ConstPtr otherObject);
132 
141  bool appendRoadBoundaryScenes(::ad::map::route::FullRoute const &egoRoute, RssObjectConversion::ConstPtr egoObject);
142 
146  static ::ad::rss::world::ObjectId getRightBorderObjectId()
147  {
148  return std::numeric_limits<::ad::rss::world::ObjectId>::max();
149  }
150 
154  static ::ad::rss::world::ObjectId getLeftBorderObjectId()
155  {
156  return std::numeric_limits<::ad::rss::world::ObjectId>::max() - 1;
157  }
158 
159  bool appendUnstructuredScene(RssObjectConversion::ConstPtr iEgoObject, RssObjectConversion::ConstPtr iOtherObject);
160 
161 private:
172  ::ad::rss::world::RoadArea createRoadArea(::ad::map::route::FullRoute const &route,
173  ::ad::map::route::RouteLaneOffset const minLaneOffset,
174  ::ad::map::route::RouteLaneOffset const maxLaneOffset,
175  ::ad::map::lane::LaneIdSet const &intersectionLanes,
176  std::vector<RssObjectConversion::Ptr> objects);
177 
184  ::ad::rss::world::RoadArea createNonIntersectionRoadArea(::ad::map::route::FullRoute const &route,
185  std::vector<RssObjectConversion::Ptr> objects);
186 
193  ::ad::rss::world::RoadArea createMergingRoadArea(::ad::map::route::FullRoute const &route,
194  RssObjectConversion::Ptr object);
195 
203  ::ad::rss::world::RoadArea createIntersectionRoadArea(::ad::map::route::FullRoute const &route,
204  ::ad::map::intersection::IntersectionConstPtr intersection,
205  RssObjectConversion::Ptr object);
206 
216  bool appendScene(::ad::rss::situation::SituationType const &situationType,
218  ::ad::rss::world::RoadArea const &egoRoad,
219  RssObjectConversion::ConstPtr otherObject,
220  ::ad::rss::world::RoadArea const &intersectingRoad);
221 
222  double mSpeedLimitFactor;
223  ::ad::map::landmark::LandmarkIdSet mGreenTrafficLights;
224  RssSceneCreation &mSceneCreation;
225 };
226 
227 } // namespace map
228 } // namespace rss
229 } // namespace ad
ad::rss::map::RssSceneCreator::getLeftBorderObjectId
::ad::rss::world::ObjectId getLeftBorderObjectId()
Definition: RssSceneCreator.hpp:154
ad
namespace ad
Definition: Logging.hpp:19
ad::rss::map::RssSceneCreator::~RssSceneCreator
~RssSceneCreator()=default
standard destructor
RssObjectConversion.hpp
ad::rss::map::RssSceneCreator::RssSceneCreator
RssSceneCreator(RssSceneCreation::RestrictSpeedLimitMode const &restrictSpeedLimitMode, ::ad::map::landmark::LandmarkIdSet const &greenTrafficLights, RssSceneCreation &sceneCreation)
constructor
ad::rss::map::RssObjectConversion::Ptr
std::shared_ptr< RssObjectConversion > Ptr
Smart pointer on RssObjectConversion.
Definition: RssObjectConversion.hpp:41
ad::rss::map::RssSceneCreator::appendNonIntersectionScene
bool appendNonIntersectionScene(::ad::map::route::ConnectingRoute const &connectingRoute, ::ad::rss::situation::SituationType const &situationType, RssObjectConversion::ConstPtr egoObject, RssObjectConversion::ConstPtr otherObject)
append a non intersection scene
RssSceneCreation.hpp
ad::rss::map::RssObjectConversion::ConstPtr
std::shared_ptr< RssObjectConversion const > ConstPtr
Smart pointer on constant RssObjectConversion.
Definition: RssObjectConversion.hpp:46
ad::rss::map::RssSceneCreator::getRightBorderObjectId
::ad::rss::world::ObjectId getRightBorderObjectId()
Definition: RssSceneCreator.hpp:146
ad::rss::map::RssSceneCreator::appendNotRelevantScene
bool appendNotRelevantScene(::ad::map::route::FullRoute const &route, RssObjectConversion::ConstPtr egoObject, RssObjectConversion::ConstPtr otherObject)
append a not relevant scene
ad::rss::map::RssSceneCreator::appendMergingScene
bool appendMergingScene(::ad::map::route::ConnectingRoute const &connectingRoute, ::ad::rss::situation::SituationType const &situationType, RssObjectConversion::ConstPtr egoObject, RssObjectConversion::ConstPtr otherObject)
append a merging scene
ad::rss::map::RssSceneCreator::appendRoadBoundaryScenes
bool appendRoadBoundaryScenes(::ad::map::route::FullRoute const &egoRoute, RssObjectConversion::ConstPtr egoObject)
append a road boundary scene
ad::rss::map::RssSceneCreator
class providing support to create and append RSS Scenes
Definition: RssSceneCreator.hpp:39
ad::rss::map::RssSceneCreation
class providing supporting functions to create a world model and its scenes.
Definition: RssSceneCreation.hpp:53
ad::rss::map::RssSceneCreator::appendIntersectionScene
bool appendIntersectionScene(::ad::map::intersection::IntersectionPtr intersection, ::ad::map::route::FullRoute const &egoRoute, ::ad::map::route::FullRoute const &objectRoute, ::ad::map::route::FullRoute const &intersectionOtherRoute, RssObjectConversion::ConstPtr egoObject, RssObjectConversion::ConstPtr otherObject)
append an intersection scene
ad::rss::map::RssSceneCreation::RestrictSpeedLimitMode
RestrictSpeedLimitMode
enumeration defining the modes of speed limit consideration within RSS accelerated movement.
Definition: RssSceneCreation.hpp:72