File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 66import numpy as np
77from lxd_io import Dataset
88import polars as pl
9+ from warnings import warn
910
1011vct = betterosi .MovingObjectVehicleClassificationType
1112vehicles = {
@@ -125,4 +126,9 @@ def to_omega_prime_recording(self, recording) -> Recording:
125126 )
126127
127128 xodr_path = recording .opendrive_map_file
128- return Recording (df = tracks , map = MapOdr .from_file (xodr_path ), validate = False )
129+ if xodr_path is not None :
130+ map = MapOdr .from_file (xodr_path )
131+ else :
132+ map = None
133+ warn (f"No map associated with recording { recording } " )
134+ return Recording (df = tracks , map = map , validate = False )
Original file line number Diff line number Diff line change @@ -752,7 +752,9 @@ def plot_altair(
752752 * [
753753 o
754754 for o in [
755- None if not plot_map else self .map .plot_altair (recording = self , plot_polys = plot_map_polys ),
755+ None
756+ if not plot_map or self .map is None
757+ else self .map .plot_altair (recording = self , plot_polys = plot_map_polys ),
756758 alt .Chart (mv_dict )
757759 .mark_geoshape ()
758760 .encode (
You can’t perform that action at this time.
0 commit comments