ad_rss
RssSituationChecking.hpp
Go to the documentation of this file.
1 // ----------------- BEGIN LICENSE BLOCK ---------------------------------
2 //
3 // Copyright (C) 2018-2022 Intel Corporation
4 //
5 // SPDX-License-Identifier: LGPL-2.1-only
6 //
7 // ----------------- END LICENSE BLOCK -----------------------------------
12 #pragma once
13 
19 
23 namespace ad {
27 namespace rss {
31 namespace core {
32 
39 {
40 public:
44  typedef std::shared_ptr<RssSituationChecking> Ptr;
45 
49  typedef std::shared_ptr<RssSituationChecking const> ConstPtr;
50 
54  RssSituationChecking() = default;
55 
59  ~RssSituationChecking() = default;
60 
69  bool checkSituation(RssSituationSnapshot const &situationSnapshot, state::RssStateSnapshot &rssStateSnapshot);
70 
78  world::ObjectType objectType,
80  calculateTrajectorySetsCallback)
81  {
82  mUnstructuredConstellationChecker.registerCalculateTrajectorySetsCallback(objectType,
83  calculateTrajectorySetsCallback);
84  }
85 
86 private:
95  bool checkConstellationInputRangeChecked(RelativeConstellation const &constellation,
96  state::RssStateSnapshot &rssStateSnapshot);
97 
105  bool checkTimeIncreasingConsistently(world::TimeIndex const &nextTimeIndex);
106 
109  unstructured::RssUnstructuredConstellationChecker mUnstructuredConstellationChecker;
110  world::TimeIndex mCurrentTimeIndex{0u};
111 };
112 } // namespace core
113 } // namespace rss
114 } // namespace ad
class RssSituationChecking
Definition: RssSituationChecking.hpp:39
void registerCalculateTrajectorySetsCallback(world::ObjectType objectType, unstructured::RssUnstructuredConstellationChecker::CalculateTrajectorySetsCallbackFunctionType calculateTrajectorySetsCallback)
Register a callback for unstructured trajectory set calculation.
Definition: RssSituationChecking.hpp:77
std::shared_ptr< RssSituationChecking const > ConstPtr
Smart pointer on constant RssSituationChecking.
Definition: RssSituationChecking.hpp:49
RssSituationChecking()=default
constructor
bool checkSituation(RssSituationSnapshot const &situationSnapshot, state::RssStateSnapshot &rssStateSnapshot)
Checks if the current situation is safe.
std::shared_ptr< RssSituationChecking > Ptr
Smart pointer on RssSituationChecking.
Definition: RssSituationChecking.hpp:44
~RssSituationChecking()=default
destructor
Class to check whether an intersection is safe and to determine the proper response for the constella...
Definition: RssIntersectionConstellationChecker.hpp:47
Class to check whether a non-intersection structured constellation is safe and to determine the prope...
Definition: RssNonIntersectionConstellationChecker.hpp:43
Class to check whether an unstructured constellation is safe and to determine the proper response for...
Definition: RssUnstructuredConstellationChecker.hpp:46
std::function< bool(::ad::rss::core::RelativeConstellation const &constellation, ::ad::rss::world::ObjectId const &objectId, ::ad::rss::core::RelativeObjectState const &vehicleState, ::ad::geometry::Polygon &brakePolygon, ::ad::geometry::Polygon &continueForwardPolygon)> CalculateTrajectorySetsCallbackFunctionType
Function callback type for unstructured trajectory set calculation.
Definition: RssUnstructuredConstellationChecker.hpp:116
void registerCalculateTrajectorySetsCallback(world::ObjectType objectType, CalculateTrajectorySetsCallbackFunctionType calculateTrajectorySetsCallback)
Register a callback for unstructured trajectory set calculation.
Definition: RssUnstructuredConstellationChecker.hpp:125
ObjectType
DataType ObjectType.
Definition: ObjectType.hpp:44
uint64_t TimeIndex
DataType TimeIndex.
Definition: TimeIndex.hpp:39
namespace ad
Definition: LateralRelativePosition.hpp:28
DataType RelativeConstellation.
Definition: RelativeConstellation.hpp:56
DataType RssSituationSnapshot.
Definition: RssSituationSnapshot.hpp:46
DataType RssStateSnapshot.
Definition: RssStateSnapshot.hpp:47