The following draw_arguments crash the visualization on my machine:
draw_params = {
"scenario": {
"lanelet_network": {
"lanelet": {
"show_label": args.labels
}
},
"dynamic_obstacle": {
'trajectory': {
'unique_colors': True,
}
}
},
"time_begin": args.begin * args.speed,
}
The drawing routine
draw_object(scenario, handles=handles, draw_params=draw_params)
draw_object(planning_problem_set)
fig.canvas.draw()
plt.autoscale()
input("Press enter to start animation and start writing frames")
# redraw
for i in range(args.begin + 1, args.begin + number_frames):
draw_params["time_begin"] = i * args.speed
redraw_obstacles(scenario, handles=handles, figure_handle=fig, draw_params=draw_params)
Results in (when applying the first update of the frame):
File "/home/niels/.local/share/virtualenvs/...-odHG8oUv/lib/python3.8/site-packages/matplotlib/figure.py", line 1735, in draw
mimage._draw_list_compositing_images(
File "/home/niels/.local/share/virtualenvs/...-odHG8oUv/lib/python3.8/site-packages/matplotlib/image.py", line 137, in _draw_list_compositing_images
a.draw(renderer)
File "/home/niels/.local/share/virtualenvs/...-odHG8oUv/lib/python3.8/site-packages/matplotlib/artist.py", line 38, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "/home/niels/.local/share/virtualenvs/...-odHG8oUv/lib/python3.8/site-packages/matplotlib/axes/_base.py", line 2630, in draw
mimage._draw_list_compositing_images(renderer, self, artists)
File "/home/niels/.local/share/virtualenvs/...-odHG8oUv/lib/python3.8/site-packages/matplotlib/image.py", line 137, in _draw_list_compositing_images
a.draw(renderer)
File "/home/niels/.local/share/virtualenvs/...-odHG8oUv/lib/python3.8/site-packages/matplotlib/artist.py", line 38, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "/home/niels/.local/share/virtualenvs/...-odHG8oUv/lib/python3.8/site-packages/matplotlib/collections.py", line 1788, in draw
self._set_transforms()
File "/home/niels/.local/share/virtualenvs/...-odHG8oUv/lib/python3.8/site-packages/matplotlib/collections.py", line 1782, in _set_transforms
m = ax.transData.get_affine().get_matrix().copy()
AttributeError: 'NoneType' object has no attribute 'transData'
An Exception during drawing the Ellipse of the vehicle trajectory I assume.
I could track the failure down to “unique_colors”, if its set to False
there are no problems.
This is not a pressing issue since I can live without colorful trajectories but maybe a nice to know.