Skip to content

Commit

Permalink
feat(behavior_velocity_planner): calculate stop line pose precisely
Browse files Browse the repository at this point in the history
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
  • Loading branch information
takayuki5168 committed May 30, 2022
1 parent f5f998b commit 63d0de3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ bool StopLineModule::modifyPathVelocity(

const LineString2d stop_line = planning_utils::extendLine(
stop_line_[0], stop_line_[1], planner_data_->stop_line_extend_length);
const geometry_msgs::msg::Point stop_line_position = getCenterOfStopLine(stop_line_);
const auto & current_position = planner_data_->current_pose.pose.position;
const PointWithSearchRangeIndex src_point_with_search_range_index =
planning_utils::findFirstNearSearchRangeIndex(path->points, current_position);
Expand All @@ -234,6 +233,8 @@ bool StopLineModule::modifyPathVelocity(
RCLCPP_WARN(logger_, "is no collision");
return true;
}
const double center_line_z = (stop_line_[0].z() + stop_line_[1].z()) / 2.0;
const auto stop_line_position = planning_utils::toRosPoint(collision->point, center_line_z);

// Find offset segment
const auto offset_segment = findOffsetSegment(*path, *collision);
Expand Down

0 comments on commit 63d0de3

Please sign in to comment.