Skip to content

Commit 8f7e2b5

Browse files
fixes to vis
1 parent 3641ebb commit 8f7e2b5

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

GEMstack/onboard/perception/cone_detection_parking.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,19 @@ def viz_object_states(self,
228228
self.pub_polygon_marker.publish(ros_polygon_marker)
229229

230230
# Create parking spot marker
231+
if all_parking_candidates:
232+
marker_array = MarkerArray()
233+
for i, pose in enumerate(all_parking_candidates):
234+
m = create_parking_spot_marker(pose, marker_id=i, ref_frame="vehicle", color=(0.0, 1.0, 0.0, 0.3))
235+
marker_array.markers.append(m)
236+
self.pub_parking_spot_marker.publish(marker_array)
237+
238+
# Draw closest spot (solid green)
231239
if closest_parking_spot:
232-
ros_parking_spot_marker = create_parking_spot_marker(closest_parking_spot, ref_frame="vehicle")
233-
self.pub_parking_spot_marker.publish(ros_parking_spot_marker)
240+
marker_array = MarkerArray()
241+
closest_marker = create_parking_spot_marker(closest_parking_spot, marker_id=999, ref_frame="vehicle", color=(0.0, 1.0, 0.0, 1.0))
242+
marker_array.markers.append(closest_marker)
243+
self.pub_parking_spot_marker.publish(marker_array)
234244

235245
# Draw 2D bboxes
236246
if self.vis_2d_annotate:

0 commit comments

Comments
 (0)