From c16b14f3cfdd54dc55f123b1f9667d02940d9b84 Mon Sep 17 00:00:00 2001 From: matssteinweg Date: Wed, 4 Dec 2019 23:29:53 +0100 Subject: [PATCH] Plot car on top of lidar scan --- spatial_bicycle_models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spatial_bicycle_models.py b/spatial_bicycle_models.py index 74181f8..48eb160 100644 --- a/spatial_bicycle_models.py +++ b/spatial_bicycle_models.py @@ -294,7 +294,7 @@ class SpatialBicycleModel(ABC): yaw = np.rad2deg(self.temporal_state.psi) # Draw rectangle car = plt_patches.Rectangle(cog, width=self.l, height=self.w, - angle=yaw, facecolor=CAR, edgecolor=CAR_OUTLINE) + angle=yaw, facecolor=CAR, edgecolor=CAR_OUTLINE, zorder=20) # Shift center rectangle to match center of the car car.set_x(car.get_x() - (self.l/2 * np.cos(self.temporal_state.psi) - @@ -306,7 +306,7 @@ class SpatialBicycleModel(ABC): safety_margin = plt_patches.Ellipse(cog, width=2*self.safety_margin[0], height=2*self.safety_margin[1], angle=yaw, - fill=False, edgecolor=CAR) + fill=False, edgecolor=CAR, zorder=20) # Add rectangle to current axis ax = plt.gca()