Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(scnenario_selector): prevent changing scneario when same uuid route is received #4569

Merged
merged 1 commit into from
Aug 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,13 @@ void ScenarioSelectorNode::onMap(
void ScenarioSelectorNode::onRoute(
const autoware_planning_msgs::msg::LaneletRoute::ConstSharedPtr msg)
{
// When the route id is the same (e.g. reporting with modified goal) keep the current scenario.
// Otherwise, reset the scenario.
if (!route_handler_ || route_handler_->getRouteUuid() != msg->uuid) {
current_scenario_ = tier4_planning_msgs::msg::Scenario::EMPTY;
}

route_ = msg;
current_scenario_ = tier4_planning_msgs::msg::Scenario::EMPTY;
}

void ScenarioSelectorNode::onOdom(const nav_msgs::msg::Odometry::ConstSharedPtr msg)
Expand Down