Open YonghyunRyu opened 5 years ago
I have forked this project and modified some files.
I have added the two lines below after the line 100 in DroneVision.py
cmd = "rm " + self.imagePath + "/image_*.png"
os.system(cmd)
Out of curiosity, are you running windows? It has not been an issue on Mac or linux but I don't have a windows machine to test on.
I execute it on Ubuntu GNOME 16.04. I and my friend had the same issue. He also uses the same operating system with mine.
ok, I'll check it out on linux tonight.
Sorry I was slow to get back on this. I don't have linux by default (I develop on Mac). But I was using the vision on linux this weekend and it was running fine.
I have found there are two problems when I get photos from the drone. The two function
get_latest_valid_picture
inDroneVision.py
andget_groundcam_picture
inMinidrone.py
.When I run the example program many times, they show or give me the picture the drone took in the last execution. The main reason is the way that the source program brings photos to the programmer. The source program a picture from the drone the source program downloads the images into files from the drone and read them from the file. This is because of higher latency between the drone and computer than the source program executes, The program commands the drone to send what it is taking, and the program immediately try to read data, but it takes a little time to receive the image. So, the program reads an old file and shows me those old pictures that the drone took in the last execution.
In order to solve this problem, I have modified the two source codes
Minidrone.py
andDroneVision.py
to delete all the images the drone took and saved in their constructors.I had a hard time finding the reason and solution of this problem. Have you had the same problem with me ? or, is this a problem only happens to me? If this happens to everyone, I hope you will fix this problem or allow and help me to fix this.