Skip to content

Commit fa5d7db

Browse files
authored
fix(goal_planner): fix detection_polygons visualiztion (#5596)
1 parent a76d360 commit fa5d7db

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

planning/behavior_path_planner/src/scene_module/goal_planner/goal_planner_module.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1752,16 +1752,16 @@ void GoalPlannerModule::setDebugData()
17521752
"map", rclcpp::Clock{RCL_ROS_TIME}.now(), "detection_polygons", 0, Marker::LINE_LIST,
17531753
tier4_autoware_utils::createMarkerScale(0.01, 0.0, 0.0),
17541754
tier4_autoware_utils::createMarkerColor(0.0, 0.0, 1.0, 0.999));
1755-
1755+
const double ego_z = planner_data_->self_odometry->pose.pose.position.z;
17561756
for (const auto & ego_polygon : debug_data_.ego_polygons_expanded) {
17571757
for (size_t ep_idx = 0; ep_idx < ego_polygon.outer().size(); ++ep_idx) {
17581758
const auto & current_point = ego_polygon.outer().at(ep_idx);
17591759
const auto & next_point = ego_polygon.outer().at((ep_idx + 1) % ego_polygon.outer().size());
17601760

17611761
marker.points.push_back(
1762-
tier4_autoware_utils::createPoint(current_point.x(), current_point.y(), 0.0));
1762+
tier4_autoware_utils::createPoint(current_point.x(), current_point.y(), ego_z));
17631763
marker.points.push_back(
1764-
tier4_autoware_utils::createPoint(next_point.x(), next_point.y(), 0.0));
1764+
tier4_autoware_utils::createPoint(next_point.x(), next_point.y(), ego_z));
17651765
}
17661766
}
17671767
debug_marker_.markers.push_back(marker);

0 commit comments

Comments
 (0)