Skip to content

Commit 96d9e7a

Browse files
feat(visualzer): add new maker type (#96)
* add new maker * add docs * fix spell --------- Signed-off-by: yuki-takagi-66 <yuki.takagi@tier4.jp>
1 parent 4167e91 commit 96d9e7a

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

autoware_lanelet2_extension/docs/lanelet2_format_extension.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,11 @@ _An example:_
285285

286286
For more details about the `no_drivable_lane` concept and design, please refer to the [**_no-drivable-lane-design_**](https://github.com/autowarefoundation/autoware.universe/blob/main/planning/behavior_velocity_planner/autoware_behavior_velocity_no_drivable_lane_module/README.md) document.
287287

288+
### Map Filter Area
289+
290+
If there is a polygon area that has `map_area_filter` tag, the pointcloud and objects in this area are removed.
291+
For more details, please refer <https://github.com/tier4/map_area_filter>
292+
288293
### Localization Landmarks
289294

290295
Landmarks, such as AR-Tags, can be defined into the lanelet map to aid localization module.

autoware_lanelet2_extension/include/autoware_lanelet2_extension/visualization/visualization.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,14 @@ visualization_msgs::msg::MarkerArray noObstacleSegmentationAreaForRunOutAsMarker
228228
visualization_msgs::msg::MarkerArray hatchedRoadMarkingsAreaAsMarkerArray(
229229
const lanelet::ConstPolygons3d & hatched_road_markings_area,
230230
const std_msgs::msg::ColorRGBA & area_color, const std_msgs::msg::ColorRGBA & line_color);
231+
232+
/**
233+
* [map creates marker array to visualize intersection area]
234+
* @param map_filter_area [map filter area polygon]
235+
* @param c [color of the marker]
236+
*/
237+
visualization_msgs::msg::MarkerArray mapFilterAreaAsMarkerArray(
238+
const lanelet::ConstPolygons3d & map_filter_area, const std_msgs::msg::ColorRGBA & c);
231239
} // namespace format_v2
232240

233241
/**

autoware_lanelet2_extension/lib/visualization.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,6 +1147,25 @@ visualization_msgs::msg::MarkerArray hatchedRoadMarkingsAreaAsMarkerArray(
11471147

11481148
return marker_array;
11491149
}
1150+
1151+
visualization_msgs::msg::MarkerArray mapFilterAreaAsMarkerArray(
1152+
const lanelet::ConstPolygons3d & map_filter_areas, const std_msgs::msg::ColorRGBA & c)
1153+
{
1154+
visualization_msgs::msg::MarkerArray marker_array;
1155+
if (map_filter_areas.empty()) {
1156+
return marker_array;
1157+
}
1158+
1159+
visualization_msgs::msg::Marker marker = createPolygonMarker("map_filter_area", c);
1160+
for (const auto & polygon : map_filter_areas) {
1161+
pushPolygonMarker(&marker, polygon, c);
1162+
}
1163+
1164+
if (!marker.points.empty()) {
1165+
marker_array.markers.push_back(marker);
1166+
}
1167+
return marker_array;
1168+
}
11501169
} // namespace format_v2
11511170
} // namespace visualization
11521171

0 commit comments

Comments
 (0)