Skip to content

Commit

Permalink
fix(lane_change): remove overridden run() function
Browse files Browse the repository at this point in the history
Signed-off-by: Fumiya Watanabe <rej55.g@gmail.com>
  • Loading branch information
rej55 committed Jun 11, 2024
1 parent 30cd2bd commit a443644
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,25 +91,6 @@ class LaneChangeInterface : public SceneModuleInterface

MarkerArray getModuleVirtualWall() override;

// TODO(someone): remove this, and use base class function
[[deprecated]] BehaviorModuleOutput run() override
{
updateData();

if (!isWaitingApproval()) {
return plan();
}

// module is waiting approval. Check it.
if (isActivated()) {
RCLCPP_DEBUG(getLogger(), "Was waiting approval, and now approved. Do plan().");
return plan();
} else {
RCLCPP_DEBUG(getLogger(), "keep waiting approval... Do planCandidate().");
return planWaitingApproval();
}
}

protected:
std::shared_ptr<LaneChangeParameters> parameters_;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ BehaviorModuleOutput LaneChangeInterface::plan()
const auto path =
assignToCandidate(module_type_->getLaneChangePath(), module_type_->getEgoPosition());
updateRTCStatus(
path.start_distance_to_path_change, path.finish_distance_to_path_change, true,
State::RUNNING);
path.start_distance_to_path_change, path.finish_distance_to_path_change,
post_process_safety_status_.is_safe, State::RUNNING);
}

return output;
Expand All @@ -146,7 +146,7 @@ BehaviorModuleOutput LaneChangeInterface::planWaitingApproval()

if (!module_type_->isValidPath()) {
updateRTCStatus(
std::numeric_limits<double>::lowest(), std::numeric_limits<double>::lowest(), true,
std::numeric_limits<double>::lowest(), std::numeric_limits<double>::lowest(), false,
State::FAILED);
path_candidate_ = std::make_shared<PathWithLaneId>();
return out;
Expand Down

0 comments on commit a443644

Please sign in to comment.