from nuscenes.map_expansion.map_api import NuScenesMap
import nuscenes.map_expansion.arcline_path_utils as path_utils
import numpy as np
import matplotlib.pyplot as plt
nusc_map_bos = NuScenesMap(dataroot= my_data_root, map_name='boston-seaport')
lane_token = '0a4ae01a-16e1-4366-afe9-1f9d2f1c5480'
lane_path = nusc_map_bos.arcline_path_3.get(lane_token, [])
resolution_meters = 0.5
discretized = np.array(path_utils.discretize_lane(lane_path, resolution_meters))
nusc_map_bos.render_layers(['lane'], 1.0, (8,8), lane_token)
ax = plt.gca()
ax.plot(discretized[:,0], discretized[:,1], 's', color='orange')
ax.set_xlim([840, 900])
ax.set_ylim([1385, 1400])
ax.axis('equal')
plt.show()