When you run the code below, the following error appears.
ValueError: attempt to get argmax of an empty sequence
The code processes information from images sent to it from the simulator.
It works fine at first, but when the array is Rover.nav_angles
empty, I get an error, although there is an if condition
if Rover.nav_angles is not None:
Max_angle_points=np.argmax(Rover.nav_angles)
MAX_DIST=np.max(Rover.nav_dists[Max_angle_points])
source
share