Skip to content

Commit

Permalink
fix(scnenario_selector): prevent changing scneario when same uuid rou…
Browse files Browse the repository at this point in the history
…te is received (autowarefoundation#4569)

Signed-off-by: kosuke55 <[email protected]>
  • Loading branch information
kosuke55 committed Aug 22, 2023
1 parent bc418de commit 51480eb
Showing 1 changed file with 6 additions and 1 deletion.
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

0 comments on commit 51480eb

Please sign in to comment.