From ef2d1b02eff7bb28d85aee9ee37a602e8fdfbc94 Mon Sep 17 00:00:00 2001 From: Nicola Loi Date: Wed, 20 Nov 2024 12:03:03 +0000 Subject: [PATCH 1/2] faster_rendering --- waymax/visualization/utils.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/waymax/visualization/utils.py b/waymax/visualization/utils.py index e4dcc56..db3fdf9 100644 --- a/waymax/visualization/utils.py +++ b/waymax/visualization/utils.py @@ -171,23 +171,23 @@ def plot_numpy_bounding_boxes( # Draw bboxes. ax.plot( - [tl[0, :], tr[0, :], br[0, :], bl[0, :], tl[0, :]], - [tl[1, :], tr[1, :], br[1, :], bl[1, :], tl[1, :]], + [tl[0, :], tr[0, :], br[0, :], bl[0, :], tl[0, :], cl[0, :], cr[0, :], cf[0, :], cl[0, :]], + [tl[1, :], tr[1, :], br[1, :], bl[1, :], tl[1, :], cl[1, :], cr[1, :], cf[1, :], cl[1, :]], color=color, zorder=4, alpha=alpha, label=label, ) - # Draw heading arrow. - ax.plot( - [cl[0, :], cr[0, :], cf[0, :], cl[0, :]], - [cl[1, :], cr[1, :], cf[1, :], cl[1, :]], - color=color, - zorder=4, - alpha=alpha, - label=label, - ) + # # Draw heading arrow. + # ax.plot( + # [cl[0, :], cr[0, :], cf[0, :], cl[0, :]], + # [cl[1, :], cr[1, :], cf[1, :], cl[1, :]], + # color=color, + # zorder=4, + # alpha=alpha, + # label=label, + # ) def plot_numpy_rays( ax: plt.Axes, From 42695b9e43cff117ba9dbc1bc8f550c96375d6a1 Mon Sep 17 00:00:00 2001 From: Nicola Loi Date: Wed, 20 Nov 2024 13:16:02 +0000 Subject: [PATCH 2/2] comment --- waymax/visualization/utils.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/waymax/visualization/utils.py b/waymax/visualization/utils.py index db3fdf9..8c2dac7 100644 --- a/waymax/visualization/utils.py +++ b/waymax/visualization/utils.py @@ -169,7 +169,7 @@ def plot_numpy_bounding_boxes( cr = pt + width / 2 * ut cf = pt + length / 2 * u - # Draw bboxes. + # Draw bboxes and heading arrow. ax.plot( [tl[0, :], tr[0, :], br[0, :], bl[0, :], tl[0, :], cl[0, :], cr[0, :], cf[0, :], cl[0, :]], [tl[1, :], tr[1, :], br[1, :], bl[1, :], tl[1, :], cl[1, :], cr[1, :], cf[1, :], cl[1, :]], @@ -179,16 +179,6 @@ def plot_numpy_bounding_boxes( label=label, ) - # # Draw heading arrow. - # ax.plot( - # [cl[0, :], cr[0, :], cf[0, :], cl[0, :]], - # [cl[1, :], cr[1, :], cf[1, :], cl[1, :]], - # color=color, - # zorder=4, - # alpha=alpha, - # label=label, - # ) - def plot_numpy_rays( ax: plt.Axes, position: np.ndarray,