@@ -379,7 +379,7 @@ ObjectData AvoidanceModule::createObjectData(
379
379
bool AvoidanceModule::canYieldManeuver (const AvoidancePlanningData & data) const
380
380
{
381
381
// transit yield maneuver only when the avoidance maneuver is not initiated.
382
- if (data. avoiding_now ) {
382
+ if (helper_. isShifted () ) {
383
383
return false ;
384
384
}
385
385
@@ -413,9 +413,6 @@ bool AvoidanceModule::canYieldManeuver(const AvoidancePlanningData & data) const
413
413
414
414
void AvoidanceModule::fillShiftLine (AvoidancePlanningData & data, DebugData & debug) const
415
415
{
416
- constexpr double AVOIDING_SHIFT_THR = 0.1 ;
417
- data.avoiding_now = std::abs (helper_.getEgoShift ()) > AVOIDING_SHIFT_THR;
418
-
419
416
auto path_shifter = path_shifter_;
420
417
421
418
/* *
@@ -578,7 +575,7 @@ void AvoidanceModule::fillDebugData(const AvoidancePlanningData & data, DebugDat
578
575
return ;
579
576
}
580
577
581
- if (data. avoiding_now ) {
578
+ if (helper_. isShifted () ) {
582
579
return ;
583
580
}
584
581
@@ -3189,7 +3186,7 @@ void AvoidanceModule::insertWaitPoint(
3189
3186
return ;
3190
3187
}
3191
3188
3192
- if (data. avoiding_now ) {
3189
+ if (helper_. isShifted () ) {
3193
3190
return ;
3194
3191
}
3195
3192
@@ -3280,7 +3277,7 @@ void AvoidanceModule::insertYieldVelocity(ShiftedPath & shifted_path) const
3280
3277
return ;
3281
3278
}
3282
3279
3283
- if (data. avoiding_now ) {
3280
+ if (helper_. isShifted () ) {
3284
3281
return ;
3285
3282
}
3286
3283
@@ -3299,7 +3296,7 @@ void AvoidanceModule::insertPrepareVelocity(ShiftedPath & shifted_path) const
3299
3296
}
3300
3297
3301
3298
// insert slow down speed only when the avoidance maneuver is not initiated.
3302
- if (data. avoiding_now ) {
3299
+ if (helper_. isShifted () ) {
3303
3300
return ;
3304
3301
}
3305
3302
0 commit comments