ad_rss
include
ad
rss
structured
RssIntersectionConstellationChecker.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 -----------------------------------
8
13
#pragma once
14
15
#include <cstdint>
16
#include <map>
17
#include "
ad/rss/core/RelativeConstellation.hpp
"
18
#include "
ad/rss/state/RssState.hpp
"
19
#include "
ad/rss/world/TimeIndex.hpp
"
20
24
namespace
ad
{
28
namespace
rss {
32
namespace
structured {
33
46
class
RssIntersectionConstellationChecker
47
{
48
public
:
57
enum class
IntersectionState
: std::uint32_t
58
{
59
NonPrioAbleToBreak
= 0u,
60
SafeLongitudinalDistance
= 1u,
61
NoTimeOverlap
= 2u
62
};
63
67
RssIntersectionConstellationChecker
() =
default
;
68
72
~RssIntersectionConstellationChecker
() =
default
;
73
84
bool
calculateRssStateIntersection
(
world::TimeIndex
const
&time_index,
85
core::RelativeConstellation
const
&constellation,
86
state::RssState
&rssState);
87
88
private
:
89
bool
checkLateralIntersect(
core::RelativeConstellation
const
&constellation,
bool
&is_safe);
90
91
bool
checkIntersectionSafe(
core::RelativeConstellation
const
&constellation,
92
state::RssStateInformation
&rss_state_information,
93
bool
&is_safe,
94
IntersectionState
&intersectionState);
95
96
typedef
std::map<core::RelativeConstellationId, IntersectionState> RssIntersectionStateMap;
97
101
RssIntersectionStateMap mLastSafeStateMap;
102
106
RssIntersectionStateMap mNewSafeStateMap;
107
112
world::TimeIndex
mCurrentTimeIndex{0u};
113
};
114
115
}
// namespace structured
116
}
// namespace rss
117
}
// namespace ad
RelativeConstellation.hpp
RssState.hpp
TimeIndex.hpp
ad::rss::structured::RssIntersectionConstellationChecker
Class to check whether an intersection is safe and to determine the proper response for the constella...
Definition:
RssIntersectionConstellationChecker.hpp:47
ad::rss::structured::RssIntersectionConstellationChecker::RssIntersectionConstellationChecker
RssIntersectionConstellationChecker()=default
Constructor.
ad::rss::structured::RssIntersectionConstellationChecker::calculateRssStateIntersection
bool calculateRssStateIntersection(world::TimeIndex const &time_index, core::RelativeConstellation const &constellation, state::RssState &rssState)
Calculate safety checks and determine required rssState for intersection constellations.
ad::rss::structured::RssIntersectionConstellationChecker::IntersectionState
IntersectionState
Enum LongitudinalResponse.
Definition:
RssIntersectionConstellationChecker.hpp:58
ad::rss::structured::RssIntersectionConstellationChecker::IntersectionState::NoTimeOverlap
@ NoTimeOverlap
ad::rss::structured::RssIntersectionConstellationChecker::IntersectionState::NonPrioAbleToBreak
@ NonPrioAbleToBreak
ad::rss::structured::RssIntersectionConstellationChecker::IntersectionState::SafeLongitudinalDistance
@ SafeLongitudinalDistance
ad::rss::structured::RssIntersectionConstellationChecker::~RssIntersectionConstellationChecker
~RssIntersectionConstellationChecker()=default
Destructor.
ad::rss::world::TimeIndex
uint64_t TimeIndex
DataType TimeIndex.
Definition:
TimeIndex.hpp:39
ad
namespace ad
Definition:
LateralRelativePosition.hpp:28
ad::rss::core::RelativeConstellation
DataType RelativeConstellation.
Definition:
RelativeConstellation.hpp:56
ad::rss::state::RssStateInformation
DataType RssStateInformation.
Definition:
RssStateInformation.hpp:45
ad::rss::state::RssState
DataType RssState.
Definition:
RssState.hpp:49
Generated by
1.9.1