Branch data Line data Source code
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 -----------------------------------
8 : :
9 : : #include <ad/rss/map/test_support/RssWorldModelCreationTest.hpp>
10 : :
11 : : struct RssWorldModelCreationTestWithRouteEgoSouth2EastOtherEast2South
12 : : : public ad::rss::map::test_support::RssWorldModelCreationTestWithRoute
13 : : {
14 : : /*
15 : : * | |
16 : : * | |
17 : : * | |
18 : : * | |___________
19 : : * |
20 : : * | O1 O0
21 : : * | O2
22 : : * | E2 E3 E4
23 : : * | ____________
24 : : * | O3 E1 |
25 : : * | |
26 : : * | |
27 : : * | O4 E0 |
28 : : */
29 : : };
30 : :
31 : 4 : TEST_F(RssWorldModelCreationTestWithRouteEgoSouth2EastOtherEast2South, e0_o0)
32 : : {
33 [ + - + - ]: 4 : performConstellationTest(
34 [ + - ]: 1 : locationSouthIncoming(),
35 [ + - ]: 2 : locationEastIncoming(),
36 : : std::initializer_list<ExpectedResultTuple>{
37 : : // here we get 2 object predictions, all leading to the opposite direction case
38 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 3u, 0u, ::ad::physics::Speed(15.2778)),
39 [ + - ]: 2 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 3u, 0u, ::ad::physics::Speed(15.2778))});
40 : 1 : }
41 : :
42 : 4 : TEST_F(RssWorldModelCreationTestWithRouteEgoSouth2EastOtherEast2South, e0_o1)
43 : : {
44 [ + - + - ]: 4 : performConstellationTest(
45 [ + - ]: 1 : locationSouthIncoming(),
46 [ + - ]: 2 : locationEastEntering(),
47 : : std::initializer_list<ExpectedResultTuple>{
48 : : // here we get 2 object predictions, all leading to the opposite direction case
49 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 2u, 0u, ::ad::physics::Speed(15.2778)),
50 [ + - ]: 2 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 2u, 0u, ::ad::physics::Speed(15.2778))});
51 : 1 : }
52 : :
53 : 4 : TEST_F(RssWorldModelCreationTestWithRouteEgoSouth2EastOtherEast2South, e0_o2)
54 : : {
55 [ + - + - ]: 6 : performConstellationTest(
56 [ + - ]: 1 : locationSouthIncoming(),
57 [ + - ]: 2 : locationEast2South(),
58 : : std::initializer_list<ExpectedResultTuple>{
59 : : // because the two right turn predictions have been gone, we get
60 : : // only left turning prediction and since already touching the lane coming from straight
61 : : // another opposite case is added on top
62 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 2u, 0u, ::ad::physics::Speed(15.2778)),
63 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 2u, 0u, ::ad::physics::Speed(15.2778)),
64 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 2u, 0u, ::ad::physics::Speed(15.2778)),
65 [ + - ]: 2 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 2u, 0u, ::ad::physics::Speed(15.2778))});
66 : 1 : }
67 : :
68 : 4 : TEST_F(RssWorldModelCreationTestWithRouteEgoSouth2EastOtherEast2South, e0_o3)
69 : : {
70 [ + - + - ]: 3 : performConstellationTest(
71 [ + - ]: 1 : locationSouthIncoming(),
72 [ + - ]: 2 : locationSouthExiting(),
73 : : std::initializer_list<ExpectedResultTuple>{
74 : : // more or less outside only single opposite case
75 [ + - ]: 2 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(12.2936))});
76 : 1 : }
77 : :
78 : 4 : TEST_F(RssWorldModelCreationTestWithRouteEgoSouth2EastOtherEast2South, e0_o4)
79 : : {
80 [ + - + - ]: 3 : performConstellationTest(
81 [ + - ]: 1 : locationSouthIncoming(),
82 [ + - ]: 2 : locationSouthOutgoing(),
83 : : std::initializer_list<ExpectedResultTuple>{
84 : : // outside only single opposite case
85 [ + - ]: 2 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(12.2936))});
86 : 1 : }
87 : :
88 : 4 : TEST_F(RssWorldModelCreationTestWithRouteEgoSouth2EastOtherEast2South, e1_o0)
89 : : {
90 [ + - + - ]: 4 : performConstellationTest(
91 [ + - ]: 1 : locationSouthEntering(),
92 [ + - ]: 2 : locationEastIncoming(),
93 : : std::initializer_list<ExpectedResultTuple>{
94 : : // because of the shorter connecting route, we get only 2 object predictions
95 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 2u, 0u, ::ad::physics::Speed(15.2778)),
96 [ + - ]: 2 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 2u, 0u, ::ad::physics::Speed(15.2778))});
97 : 1 : }
98 : :
99 : 4 : TEST_F(RssWorldModelCreationTestWithRouteEgoSouth2EastOtherEast2South, e1_o1)
100 : : {
101 [ + - + - ]: 5 : performConstellationTest(
102 [ + - ]: 1 : locationSouthEntering(),
103 [ + - ]: 2 : locationEastEntering(),
104 : : std::initializer_list<ExpectedResultTuple>{
105 : : // because of progressed object, now getting 3 object predictions
106 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(15.2778)),
107 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(15.2778)),
108 [ + - ]: 2 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(15.2778))});
109 : 1 : }
110 : :
111 : 4 : TEST_F(RssWorldModelCreationTestWithRouteEgoSouth2EastOtherEast2South, e1_o2)
112 : : {
113 [ + - + - ]: 6 : performConstellationTest(
114 [ + - ]: 1 : locationSouthEntering(),
115 [ + - ]: 2 : locationEast2South(),
116 : : std::initializer_list<ExpectedResultTuple>{
117 : : // because of the shorter connecting route, we get only 2 object predictions
118 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(15.2778)),
119 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(15.2778)),
120 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(15.2778)),
121 [ + - ]: 2 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(15.2778))});
122 : 1 : }
123 : :
124 : 4 : TEST_F(RssWorldModelCreationTestWithRouteEgoSouth2EastOtherEast2South, e1_o3)
125 : : {
126 [ + - + - ]: 11 : performConstellationTest(
127 [ + - ]: 1 : locationSouthEntering(),
128 [ + - ]: 2 : locationSouthExiting(),
129 : : std::initializer_list<ExpectedResultTuple>{
130 : : // because of the shorter connecting route, we get only 2 object prediction
131 : : // route length is zero, but consists of 1 or 2 segments here
132 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(12.2936)),
133 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(15.2778)),
134 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(15.2778)),
135 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(15.2778)),
136 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(15.2778)),
137 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 2u, 0u, ::ad::physics::Speed(15.2778)),
138 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 2u, 0u, ::ad::physics::Speed(15.2778)),
139 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 2u, 0u, ::ad::physics::Speed(15.2778)),
140 [ + - ]: 2 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 2u, 0u, ::ad::physics::Speed(15.2778))});
141 : 1 : }
142 : :
143 : 4 : TEST_F(RssWorldModelCreationTestWithRouteEgoSouth2EastOtherEast2South, e1_o4)
144 : : {
145 [ + - + - ]: 3 : performConstellationTest(
146 [ + - ]: 1 : locationSouthEntering(),
147 [ + - ]: 2 : locationSouthOutgoing(),
148 : : std::initializer_list<ExpectedResultTuple>{
149 : : // the other passed our route
150 [ + - ]: 2 : std::make_tuple(::ad::rss::world::ConstellationType::NotRelevant, 3u, 0u, ::ad::physics::Speed(100.))});
151 : 1 : }
152 : :
153 : 4 : TEST_F(RssWorldModelCreationTestWithRouteEgoSouth2EastOtherEast2South, e2_o0)
154 : : {
155 [ + - + - ]: 4 : performConstellationTest(
156 [ + - ]: 1 : locationSouth2East(),
157 [ + - ]: 2 : locationEastIncoming(),
158 : : std::initializer_list<ExpectedResultTuple>{
159 : : // because of the shorter connecting route, we get only 2 object predictions
160 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 2u, 0u, ::ad::physics::Speed(15.2778)),
161 [ + - ]: 2 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 2u, 0u, ::ad::physics::Speed(15.2778))});
162 : 1 : }
163 : :
164 : 4 : TEST_F(RssWorldModelCreationTestWithRouteEgoSouth2EastOtherEast2South, e2_o1)
165 : : {
166 [ + - + - ]: 5 : performConstellationTest(
167 [ + - ]: 1 : locationSouth2East(),
168 [ + - ]: 2 : locationEastEntering(),
169 : : std::initializer_list<ExpectedResultTuple>{
170 : : // because of progressed object, now getting 3 object predictions
171 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(15.2778)),
172 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(15.2778)),
173 [ + - ]: 2 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(15.2778))});
174 : 1 : }
175 : :
176 : 4 : TEST_F(RssWorldModelCreationTestWithRouteEgoSouth2EastOtherEast2South, e2_o2)
177 : : {
178 [ + - + - ]: 6 : performConstellationTest(
179 [ + - ]: 1 : locationSouth2East(),
180 [ + - ]: 2 : locationEast2South(),
181 : : std::initializer_list<ExpectedResultTuple>{
182 : : // because of the shorter connecting route (directly opposite to us), we get only 2 object predictions
183 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(15.2778)),
184 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(15.2778)),
185 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(15.2778)),
186 [ + - ]: 2 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(15.2778))});
187 : 1 : }
188 : :
189 : 4 : TEST_F(RssWorldModelCreationTestWithRouteEgoSouth2EastOtherEast2South, e2_o3)
190 : : {
191 [ + - + - ]: 3 : performConstellationTest(
192 [ + - ]: 1 : locationSouth2East(),
193 [ + - ]: 2 : locationSouthExiting(),
194 : : std::initializer_list<ExpectedResultTuple>{
195 : : // here the other is behind us
196 [ + - ]: 2 : std::make_tuple(::ad::rss::world::ConstellationType::NotRelevant, 3u, 0u, ::ad::physics::Speed(100.))});
197 : 1 : }
198 : :
199 : 4 : TEST_F(RssWorldModelCreationTestWithRouteEgoSouth2EastOtherEast2South, e2_o4)
200 : : {
201 [ + - + - ]: 3 : performConstellationTest(
202 [ + - ]: 1 : locationSouth2East(),
203 [ + - ]: 2 : locationSouthOutgoing(),
204 : : std::initializer_list<ExpectedResultTuple>{
205 : : // here the other is behind us
206 [ + - ]: 2 : std::make_tuple(::ad::rss::world::ConstellationType::NotRelevant, 3u, 0u, ::ad::physics::Speed(100.))});
207 : 1 : }
208 : :
209 : 4 : TEST_F(RssWorldModelCreationTestWithRouteEgoSouth2EastOtherEast2South, e3_o0)
210 : : {
211 [ + - + - ]: 3 : performConstellationTest(
212 [ + - ]: 1 : locationEastExiting(),
213 [ + - ]: 2 : locationEastIncoming(),
214 : : std::initializer_list<ExpectedResultTuple>{
215 : : // only one constellation left
216 [ + - ]: 2 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(12.2936))});
217 : 1 : }
218 : :
219 : 4 : TEST_F(RssWorldModelCreationTestWithRouteEgoSouth2EastOtherEast2South, e3_o1)
220 : : {
221 [ + - + - ]: 11 : performConstellationTest(
222 [ + - ]: 1 : locationEastExiting(),
223 [ + - ]: 2 : locationEastEntering(),
224 : : std::initializer_list<ExpectedResultTuple>{
225 : : // since the other is besides us, we still find the route from within the intersection
226 : : // we get 5 connecting route candidates: 4 with each 2 object predictions inside intersection and 1 outside
227 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(12.2936)),
228 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(15.2778)),
229 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(15.2778)),
230 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(15.2778)),
231 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(15.2778)),
232 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 2u, 0u, ::ad::physics::Speed(15.2778)),
233 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 2u, 0u, ::ad::physics::Speed(15.2778)),
234 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 2u, 0u, ::ad::physics::Speed(15.2778)),
235 [ + - ]: 2 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 2u, 0u, ::ad::physics::Speed(15.2778))});
236 : 1 : }
237 : :
238 : 4 : TEST_F(RssWorldModelCreationTestWithRouteEgoSouth2EastOtherEast2South, e3_o2)
239 : : {
240 [ + - + - ]: 3 : performConstellationTest(
241 [ + - ]: 1 : locationEastExiting(),
242 [ + - ]: 2 : locationEast2South(),
243 : : std::initializer_list<ExpectedResultTuple>{
244 : : // here the other is behind us
245 [ + - ]: 2 : std::make_tuple(::ad::rss::world::ConstellationType::NotRelevant, 3u, 0u, ::ad::physics::Speed(100.))});
246 : 1 : }
247 : :
248 : 4 : TEST_F(RssWorldModelCreationTestWithRouteEgoSouth2EastOtherEast2South, e3_o3)
249 : : {
250 [ + - + - ]: 3 : performConstellationTest(
251 [ + - ]: 1 : locationEastExiting(),
252 [ + - ]: 2 : locationSouthExiting(),
253 : : std::initializer_list<ExpectedResultTuple>{
254 : : // here the other is behind us
255 [ + - ]: 2 : std::make_tuple(::ad::rss::world::ConstellationType::NotRelevant, 3u, 0u, ::ad::physics::Speed(100.))});
256 : 1 : }
257 : :
258 : 4 : TEST_F(RssWorldModelCreationTestWithRouteEgoSouth2EastOtherEast2South, e3_o4)
259 : : {
260 [ + - + - ]: 3 : performConstellationTest(
261 [ + - ]: 1 : locationEastExiting(),
262 [ + - ]: 2 : locationSouthOutgoing(),
263 : : std::initializer_list<ExpectedResultTuple>{
264 : : // here the other is behind us
265 [ + - ]: 2 : std::make_tuple(::ad::rss::world::ConstellationType::NotRelevant, 3u, 0u, ::ad::physics::Speed(100.))});
266 : 1 : }
267 : :
268 : 4 : TEST_F(RssWorldModelCreationTestWithRouteEgoSouth2EastOtherEast2South, e4_o0)
269 : : {
270 [ + - + - ]: 3 : performConstellationTest(
271 [ + - ]: 1 : locationEastOutgoing(),
272 [ + - ]: 2 : locationEastIncoming(),
273 : : std::initializer_list<ExpectedResultTuple>{
274 : : // only one constellation left
275 [ + - ]: 2 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(12.2936))});
276 : 1 : }
277 : :
278 : 4 : TEST_F(RssWorldModelCreationTestWithRouteEgoSouth2EastOtherEast2South, e4_o1)
279 : : {
280 [ + - + - ]: 3 : performConstellationTest(
281 [ + - ]: 1 : locationEastOutgoing(),
282 [ + - ]: 2 : locationEastEntering(),
283 : : std::initializer_list<ExpectedResultTuple>{
284 : : // here the other is behind us
285 [ + - ]: 2 : std::make_tuple(::ad::rss::world::ConstellationType::NotRelevant, 1u, 0u, ::ad::physics::Speed(100.))});
286 : 1 : }
287 : :
288 : 4 : TEST_F(RssWorldModelCreationTestWithRouteEgoSouth2EastOtherEast2South, e4_o2)
289 : : {
290 [ + - + - ]: 3 : performConstellationTest(
291 [ + - ]: 1 : locationEastOutgoing(),
292 [ + - ]: 2 : locationEast2South(),
293 : : std::initializer_list<ExpectedResultTuple>{
294 : : // here the other is behind us
295 [ + - ]: 2 : std::make_tuple(::ad::rss::world::ConstellationType::NotRelevant, 1u, 0u, ::ad::physics::Speed(100.))});
296 : 1 : }
297 : :
298 : 4 : TEST_F(RssWorldModelCreationTestWithRouteEgoSouth2EastOtherEast2South, e4_o3)
299 : : {
300 [ + - + - ]: 3 : performConstellationTest(
301 [ + - ]: 1 : locationEastOutgoing(),
302 [ + - ]: 2 : locationSouthExiting(),
303 : : std::initializer_list<ExpectedResultTuple>{
304 : : // here the other is behind us
305 [ + - ]: 2 : std::make_tuple(::ad::rss::world::ConstellationType::NotRelevant, 1u, 0u, ::ad::physics::Speed(100.))});
306 : 1 : }
307 : :
308 : 4 : TEST_F(RssWorldModelCreationTestWithRouteEgoSouth2EastOtherEast2South, e4_o4)
309 : : {
310 [ + - + - ]: 3 : performConstellationTest(
311 [ + - ]: 1 : locationEastOutgoing(),
312 [ + - ]: 2 : locationSouthOutgoing(),
313 : : std::initializer_list<ExpectedResultTuple>{
314 : : // here the other is behind us
315 [ + - ]: 2 : std::make_tuple(::ad::rss::world::ConstellationType::NotRelevant, 1u, 0u, ::ad::physics::Speed(100.))});
316 : 1 : }
317 : :
318 : : struct RssWorldModelCreationTestWithoutRouteEgoSouth2EastOtherEast2South
319 : : : public ad::rss::map::test_support::RssWorldModelCreationTestWithoutRoute
320 : : {
321 : : /*
322 : : * | |
323 : : * | |
324 : : * | |
325 : : * | |___________
326 : : * |
327 : : * | O1 O0
328 : : * | O2
329 : : * | E2 E3 E4
330 : : * | ____________
331 : : * | O3 E1 |
332 : : * | |
333 : : * | |
334 : : * | O4 E0 |
335 : : */
336 : : };
337 : :
338 : 4 : TEST_F(RssWorldModelCreationTestWithoutRouteEgoSouth2EastOtherEast2South, e0_o0)
339 : : {
340 [ + - + - ]: 6 : performConstellationTest(
341 [ + - ]: 1 : locationSouthIncoming(),
342 [ + - ]: 2 : locationEastIncoming(),
343 : : // here we get 2 object predictions and 3 ego predictions:
344 : : std::initializer_list<ExpectedResultTuple>{
345 : : // ego-turn-right: all 2 object predictions lead to the opposite direction case
346 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 3u, 0u, ::ad::physics::Speed(100.)),
347 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 3u, 0u, ::ad::physics::Speed(100.)),
348 : : // ego-straight: object prediction 1
349 : : // object coming form right has prio
350 : 0 : std::make_tuple(
351 [ + - ]: 1 : ::ad::rss::world::ConstellationType::IntersectionObjectHasPriority, 3u, 2u, ::ad::physics::Speed(100.)),
352 : : // ego-straight: object prediction 2
353 : : // object coming form right has prio
354 : 0 : std::make_tuple(
355 [ + - ]: 2 : ::ad::rss::world::ConstellationType::IntersectionObjectHasPriority, 3u, 2u, ::ad::physics::Speed(100.))});
356 : 1 : }
357 : :
358 : 4 : TEST_F(RssWorldModelCreationTestWithoutRouteEgoSouth2EastOtherEast2South, e2_o0)
359 : : {
360 [ + - + - ]: 6 : performConstellationTest(
361 [ + - ]: 1 : locationSouth2East(),
362 [ + - ]: 2 : locationEastIncoming(),
363 : : // here we get 2 object predictions and 2 ego predictions:
364 : : std::initializer_list<ExpectedResultTuple>{
365 : : // ego-turn-right: all 2 object predictions lead to the opposite direction case
366 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 2u, 0u, ::ad::physics::Speed(100.)),
367 [ + - ]: 1 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 2u, 0u, ::ad::physics::Speed(100.)),
368 : : // ego-straight: object prediction 1
369 : : // first intersection 'not present'; works because no other intersection in prediction and objects intersection is
370 : : // taken (@todo: to be fixed)
371 : : // object coming form right has prio
372 : 0 : std::make_tuple(
373 [ + - ]: 1 : ::ad::rss::world::ConstellationType::IntersectionObjectHasPriority, 2u, 2u, ::ad::physics::Speed(100.)),
374 : : // ego-straight: object prediction 2
375 : 0 : std::make_tuple(
376 [ + - ]: 2 : ::ad::rss::world::ConstellationType::IntersectionObjectHasPriority, 2u, 2u, ::ad::physics::Speed(100.))});
377 : 1 : }
378 : :
379 : 4 : TEST_F(RssWorldModelCreationTestWithoutRouteEgoSouth2EastOtherEast2South, e0_o4)
380 : : {
381 [ + - + - ]: 3 : performConstellationTest(
382 [ + - ]: 1 : locationSouthIncoming(),
383 [ + - ]: 2 : locationSouthOutgoing(),
384 : : std::initializer_list<ExpectedResultTuple>{
385 : : // outside only single opposite case
386 [ + - ]: 2 : std::make_tuple(::ad::rss::world::ConstellationType::OppositeDirection, 1u, 0u, ::ad::physics::Speed(100.))});
387 : 1 : }
388 : :
389 : : //@TODO fill in between steps of RssWorldModelCreationTestWithoutRouteEgoSouth2EastOtherEast2South
|