Skip to content

Commit

Permalink
feat(behavior_path_planner): fix z of extracted drivable area
Browse files Browse the repository at this point in the history
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
  • Loading branch information
takayuki5168 committed Feb 9, 2023
1 parent bbfbadd commit 3d64319
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -720,11 +720,14 @@ void generateDrivableArea(
const auto obj_poly = expandPolygon(object.envelope_poly, diff_poly_buffer);

// get edge points of the object
const size_t nearest_path_idx = motion_utils::findNearestIndex(
path.points, obj_pose.position); // to get z for object polygon
std::vector<Point> edge_points;
for (size_t i = 0; i < obj_poly.outer().size() - 1;
++i) { // NOTE: There is a duplicated points
edge_points.push_back(tier4_autoware_utils::createPoint(
obj_poly.outer().at(i).x(), obj_poly.outer().at(i).y(), 0.0));
obj_poly.outer().at(i).x(), obj_poly.outer().at(i).y(),
path.points.at(nearest_path_idx).point.pose.position.z));
}

// get a boundary that we have to change
Expand Down

0 comments on commit 3d64319

Please sign in to comment.