Carla-RL
Carla-RL copied to clipboard
Cannot present continuous image through cv2.imshow() while receiving camera data from Carla
I'm learning the program from https://pythonprogramming.net/control-camera-sensor-self-driving-autonomous-cars-carla-python/ and run the code in this website on ubuntu 18.04,python 3.6 and carla 0.9.9, but I cannot get continuous images through the following code:
def process_img(image): i = np.array(image.raw_data) i2 = i.reshape((IM_HEIGHT, IM_WIDTH, 4)) i3 = i2[:, :, :3] cv2.imshow("", i3) cv2.waitKey(1) return i3/255.0
The image is freezing in the first frame which is strange, I really don't know what's going wrong with it and sincerely hoping for any help. Thank you very much!
I downloaded the code and installed carla 0.9.9, and I run play.py, nothing happened, I don't know why.