Skip to content

Commit

Permalink
fix(behavior velocity planner): skipping emplace back stop reason if …
Browse files Browse the repository at this point in the history
…it is empty (#898)

* skipping emplace back stop reason if it is empty

Signed-off-by: TakumiKozaka-T4 <[email protected]>

* add braces

Signed-off-by: TakumiKozaka-T4 <[email protected]>

* ci(pre-commit): autofix

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Takagi, Isamu <[email protected]>
  • Loading branch information
3 people authored and 0x126 committed May 18, 2022
1 parent e1e81b3 commit 55d807e
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@ class SceneModuleManagerInterface
tier4_planning_msgs::msg::StopReason stop_reason;
scene_module->setPlannerData(planner_data_);
scene_module->modifyPathVelocity(path, &stop_reason);
stop_reason_array.stop_reasons.emplace_back(stop_reason);

if (stop_reason.reason != "") {
stop_reason_array.stop_reasons.emplace_back(stop_reason);
}

if (const auto command = scene_module->getInfrastructureCommand()) {
infrastructure_command_array.commands.push_back(*command);
Expand Down

0 comments on commit 55d807e

Please sign in to comment.