Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(map_loader): display curbstone as marker array #4958

Merged
merged 4 commits into from
Oct 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,14 @@
lanelet::utils::query::getAllPolygonsByType(viz_lanelet_map, "hatched_road_markings");
std::vector<lanelet::NoParkingAreaConstPtr> no_parking_reg_elems =
lanelet::utils::query::noParkingAreas(all_lanelets);
lanelet::ConstLineStrings3d curbstones = lanelet::utils::query::curbstones(viz_lanelet_map);

Check warning on line 130 in map/map_loader/src/lanelet2_map_loader/lanelet2_map_visualization_node.cpp

View check run for this annotation

Codecov / codecov/patch

map/map_loader/src/lanelet2_map_loader/lanelet2_map_visualization_node.cpp#L130

Added line #L130 was not covered by tests

std_msgs::msg::ColorRGBA cl_road, cl_shoulder, cl_cross, cl_partitions, cl_pedestrian_markings,
cl_ll_borders, cl_shoulder_borders, cl_stoplines, cl_trafficlights, cl_detection_areas,
cl_speed_bumps, cl_crosswalks, cl_parking_lots, cl_parking_spaces, cl_lanelet_id,
cl_obstacle_polygons, cl_no_stopping_areas, cl_no_obstacle_segmentation_area,
cl_no_obstacle_segmentation_area_for_run_out, cl_hatched_road_markings_area,
cl_hatched_road_markings_line, cl_no_parking_areas;
cl_hatched_road_markings_line, cl_no_parking_areas, cl_curbstones;
setColor(&cl_road, 0.27, 0.27, 0.27, 0.999);
setColor(&cl_shoulder, 0.15, 0.15, 0.15, 0.999);
setColor(&cl_cross, 0.27, 0.3, 0.27, 0.5);
Expand All @@ -156,6 +157,7 @@
setColor(&cl_hatched_road_markings_area, 0.3, 0.3, 0.3, 0.5);
setColor(&cl_hatched_road_markings_line, 0.5, 0.5, 0.5, 0.999);
setColor(&cl_no_parking_areas, 0.42, 0.42, 0.42, 0.5);
setColor(&cl_curbstones, 0.1, 0.1, 0.2, 0.999);

visualization_msgs::msg::MarkerArray map_marker_array;

Expand Down Expand Up @@ -242,6 +244,10 @@
&map_marker_array,
lanelet::visualization::noParkingAreasAsMarkerArray(no_parking_reg_elems, cl_no_parking_areas));

insertMarkerArray(

Check warning on line 247 in map/map_loader/src/lanelet2_map_loader/lanelet2_map_visualization_node.cpp

View check run for this annotation

Codecov / codecov/patch

map/map_loader/src/lanelet2_map_loader/lanelet2_map_visualization_node.cpp#L247

Added line #L247 was not covered by tests
&map_marker_array,
lanelet::visualization::lineStringsAsMarkerArray(curbstones, "curbstone", cl_curbstones, 0.2));

Check warning on line 249 in map/map_loader/src/lanelet2_map_loader/lanelet2_map_visualization_node.cpp

View check run for this annotation

Codecov / codecov/patch

map/map_loader/src/lanelet2_map_loader/lanelet2_map_visualization_node.cpp#L249

Added line #L249 was not covered by tests

Check warning on line 250 in map/map_loader/src/lanelet2_map_loader/lanelet2_map_visualization_node.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Large Method

Lanelet2MapVisualizationNode::onMapBin increases from 154 to 159 lines of code, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.
pub_marker_->publish(map_marker_array);
}

Expand Down
Loading