Skip to content

Commit

Permalink
fix(freespace_planner, mission_planner): null checking (tier4#1261)
Browse files Browse the repository at this point in the history
* fix: remove unnecessary null check

Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp>

* chore: add is_handler_ready

Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp>

* fix: remove unnecessary handling

Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp>
  • Loading branch information
shmpwk authored and boyali committed Oct 19, 2022
1 parent b91559e commit b88f5cc
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,6 @@ void FreespacePlannerNode::getAstarParam()

void FreespacePlannerNode::onRoute(const HADMapRoute::ConstSharedPtr msg)
{
if (scenario_ = nullptr) return;

route_ = msg;

goal_pose_.header = msg->header;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ bool MissionPlannerLanelet2::isRoutingGraphReady() const { return is_graph_ready
void MissionPlannerLanelet2::visualizeRoute(
const autoware_auto_planning_msgs::msg::HADMapRoute & route) const
{
if (!route_handler_.isHandlerReady()) return;
lanelet::ConstLanelets route_lanelets;
lanelet::ConstLanelets end_lanelets;
lanelet::ConstLanelets normal_lanelets;
Expand Down
1 change: 1 addition & 0 deletions planning/route_handler/src/route_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ void RouteHandler::setRouteLanelets(const lanelet::ConstLanelets & path_lanelets
for (const auto & id : route_lanelets_id) {
route_lanelets_.push_back(lanelet_map_ptr_->laneletLayer.get(id));
}
is_handler_ready_ = true;
}

void RouteHandler::setLaneletsFromRouteMsg()
Expand Down

0 comments on commit b88f5cc

Please sign in to comment.