@@ -331,8 +331,7 @@ title NormalLaneChange::filterObjects Method Execution Flow
331
331
start
332
332
333
333
group "Filter Objects by Class" {
334
- :Iterate through each object in objects list;
335
- while (has not finished iterating through object list) is (TRUE)
334
+ while (has not finished iterating through predicted object list) is (TRUE)
336
335
if (current object type != param.object_types_to_check?) then (TRUE)
337
336
#LightPink:Remove current object;
338
337
else (FALSE)
@@ -341,17 +340,15 @@ endif
341
340
end while
342
341
end group
343
342
344
- if (object list is empty?) then (TRUE)
343
+ if (predicted object list is empty?) then (TRUE)
345
344
:Return empty result;
346
345
stop
347
346
else (FALSE)
348
347
endif
349
348
350
349
group "Filter Oncoming Objects" #PowderBlue {
351
- :Iterate through each object in target lane objects list;
352
- while (has not finished iterating through object list?) is (TRUE)
353
- :check object's yaw with reference to ego's yaw.;
354
- if (yaw difference < 90 degree?) then (TRUE)
350
+ while (has not finished iterating through predicted object list?) is (TRUE)
351
+ if (object's yaw with reference to ego's yaw difference < 90 degree?) then (TRUE)
355
352
:Keep current object;
356
353
else (FALSE)
357
354
if (object is stopping?) then (TRUE)
@@ -363,53 +360,35 @@ endif
363
360
endwhile
364
361
end group
365
362
366
- if (object list is empty?) then (TRUE)
367
- :Return empty result;
368
- stop
369
- else (FALSE)
370
- endif
371
-
372
- group "Filter Objects Ahead Terminal" #Beige {
373
- :Calculate lateral distance from ego to current lanes center;
374
-
375
- :Iterate through each object in objects list;
376
- while (has not finished iterating through object list) is (TRUE)
377
- :Get current object's polygon;
378
- :Initialize distance to terminal from object to max;
379
- while (has not finished iterating through object polygon's vertices) is (TRUE)
380
- :Calculate object's lateral distance to end of lane;
381
- :Update minimum distance to terminal from object;
382
- end while
383
- if (Is object's distance to terminal exceeds minimum lane change length?) then (TRUE)
384
- #LightPink:Remove current object;
385
- else (FALSE)
386
- endif
387
- end while
388
- end group
389
-
390
- if (object list is empty?) then (TRUE)
363
+ if (predicted object list is empty?) then (TRUE)
391
364
:Return empty result;
392
365
stop
393
366
else (FALSE)
394
367
endif
395
368
396
369
group "Filter Objects By Lanelets" #LightGreen {
397
370
398
- :Iterate through each object in objects list;
399
- while (has not finished iterating through object list) is (TRUE)
400
- :lateral distance diff = difference between object's lateral distance and ego's lateral distance to the current lanes' centerline.;
401
- if (Object in target lane polygon, and lateral distance diff is more than half of ego's width?) then (TRUE)
402
- :Add to target_lane_objects;
403
- else (FALSE)
404
- if (Object overlaps with backward target lanes?) then (TRUE)
371
+ while (has not finished iterating through predicted object list) is (TRUE)
372
+ :Calculate lateral distance diff;
373
+ if (Object in target lane polygon?) then (TRUE)
374
+ if (lateral distance diff > half of ego's width?) then (TRUE)
375
+ if (Object's physical position is before terminal point?) then (TRUE)
405
376
:Add to target_lane_objects;
406
377
else (FALSE)
407
- if (Object in current lane polygon?) then (TRUE)
408
- :Add to current_lane_objects;
409
- else (FALSE)
410
- :Add to other_lane_objects;
411
- endif
412
378
endif
379
+ else (FALSE)
380
+ endif
381
+ else (FALSE)
382
+ endif
383
+
384
+ if (Object overlaps with backward target lanes?) then (TRUE)
385
+ :Add to target_lane_objects;
386
+ else (FALSE)
387
+ if (Object in current lane polygon?) then (TRUE)
388
+ :Add to current_lane_objects;
389
+ else (FALSE)
390
+ :Add to other_lane_objects;
391
+ endif
413
392
endif
414
393
end while
415
394
@@ -426,13 +405,10 @@ endif
426
405
427
406
group "Filter Target Lanes' objects" #LightCyan {
428
407
429
- :Iterate through each object in target lane objects list;
430
- while (has not finished iterating through object list) is (TRUE)
431
- :check object's velocity;
408
+ while (has not finished iterating through target lanes' object list) is (TRUE)
432
409
if(velocity is within threshold?) then (TRUE)
433
410
:Keep current object;
434
411
else (FALSE)
435
- :check whether object is ahead of ego;
436
412
if(object is ahead of ego?) then (TRUE)
437
413
:keep current object;
438
414
else (FALSE)
@@ -444,11 +420,8 @@ end group
444
420
445
421
group "Filter Current Lanes' objects" #LightYellow {
446
422
447
- :Iterate through each object in current lane objects list;
448
- while (has not finished iterating through object list) is (TRUE)
449
- :check object's velocity;
423
+ while (has not finished iterating through current lanes' object list) is (TRUE)
450
424
if(velocity is within threshold?) then (TRUE)
451
- :check whether object is ahead of ego;
452
425
if(object is ahead of ego?) then (TRUE)
453
426
:keep current object;
454
427
else (FALSE)
@@ -462,11 +435,8 @@ end group
462
435
463
436
group "Filter Other Lanes' objects" #Lavender {
464
437
465
- :Iterate through each object in other lane objects list;
466
- while (has not finished iterating through object list) is (TRUE)
467
- :check object's velocity;
438
+ while (has not finished iterating through other lanes' object list) is (TRUE)
468
439
if(velocity is within threshold?) then (TRUE)
469
- :check whether object is ahead of ego;
470
440
if(object is ahead of ego?) then (TRUE)
471
441
:keep current object;
472
442
else (FALSE)
@@ -478,7 +448,7 @@ while (has not finished iterating through object list) is (TRUE)
478
448
endwhile
479
449
end group
480
450
481
- :Trasform the objects into extended predicted object and return them as lane_change_target_objects;
451
+ :Transform the objects into extended predicted object and return them as lane_change_target_objects;
482
452
stop
483
453
484
454
@enduml
0 commit comments