@@ -79,12 +79,11 @@ MarkerArray showAllValidLaneChangePath(
79
79
if (lc_path.path .points .empty ()) {
80
80
continue ;
81
81
}
82
- std::ostringstream ss;
83
- ss << ns.c_str () << " [" << idx << " ]" ;
82
+ std::string ns_with_idx = ns + " [" + std::to_string (idx) + " ]" ;
84
83
const auto & color = colors.at (idx);
85
84
const auto & points = lc_path.path .points ;
86
85
auto marker = createDefaultMarker (
87
- " map" , current_time, ss. str () , ++id, Marker::LINE_STRIP, createMarkerScale (0.1 , 0.1 , 0.0 ),
86
+ " map" , current_time, ns_with_idx , ++id, Marker::LINE_STRIP, createMarkerScale (0.1 , 0.1 , 0.0 ),
88
87
color);
89
88
marker.points .reserve (points.size ());
90
89
@@ -93,7 +92,7 @@ MarkerArray showAllValidLaneChangePath(
93
92
}
94
93
95
94
auto text_marker = createDefaultMarker (
96
- " map" , current_time, ss. str () , ++id, visualization_msgs::msg::Marker::TEXT_VIEW_FACING,
95
+ " map" , current_time, ns_with_idx , ++id, visualization_msgs::msg::Marker::TEXT_VIEW_FACING,
97
96
createMarkerScale (0.1 , 0.1 , 0.8 ), colors::yellow ());
98
97
const auto prep_idx = points.size () / 4 ;
99
98
text_marker.pose = points.at (prep_idx).point .pose ;
0 commit comments