Skip to content

Commit

Permalink
fix(start_planner): check safety only when waiting approval (autoware…
Browse files Browse the repository at this point in the history
…foundation#5792)

1. The `updateData()` function now sets `status_.is_safe_dynamic_objects` to true when `requiresDynamicObjectsCollisionDetection()` returns false.

2. The `isExecutionReady()` function now checks for dynamic object collisions only if `requiresDynamicObjectsCollisionDetection()` returns true and `isWaitingApproval()` also returns true. This change ensures that dynamic object collision detection is performed only when necessary and approval is pending.

Signed-off-by: kyoichi-sugahara <[email protected]>
  • Loading branch information
kyoichi-sugahara authored and danielsanchezaran committed Dec 15, 2023
1 parent 72b64b5 commit 8fc22e8
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ void StartPlannerModule::updateData()

if (requiresDynamicObjectsCollisionDetection()) {
status_.is_safe_dynamic_objects = !hasCollisionWithDynamicObjects();
} else {
status_.is_safe_dynamic_objects = true;
}
}

Expand Down Expand Up @@ -279,7 +281,7 @@ bool StartPlannerModule::isExecutionReady() const
is_safe = false;
}

if (requiresDynamicObjectsCollisionDetection()) {
if (requiresDynamicObjectsCollisionDetection() && isWaitingApproval()) {
is_safe = !hasCollisionWithDynamicObjects();
}

Expand Down

0 comments on commit 8fc22e8

Please sign in to comment.