New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Picture problems of start, end and grass #2
Comments
As u asked, I modified the code and this is how it looks , Also since we are representing the green area with a grass image I thought it would be a good idea to give them a fixed weight rather than a random value since the user wont be able to see it. Right now , the start and end points contain a flag image , u can change it to whatever u want, just the image would be scaled to the size of that cell, before displaying. Let me know if there is anything else u want to add @Shame-fight . |
Thanks for your reply, I want to do the following things.
@Sana-078 |
The first requirement I have done, by binding keyboard events。 |
Sorry i had a hard time replying, was caught up in another project. Anyway I tried to implement the dynamic display of paths.. (it's a really cool idea btw) and it's not really working the way it's supposed to.. about the rest, I will check it out and will let u know @Shame-fight . |
Dynamic display of paths, finally worked, u can check that out. About the algorithm, I'm not really sure how bfs would work on a weighted graph. And by the third, did u mean threading?? @Shame-fight |
Thanks for your time, the dynamic effect is cool. |
Can you add the A*s algorithm, I tried to add this algorithm, but the final path does not consider the high pass cost of the grass, the algorithm treats the grass as a general path, I don't know how to solve this problem. |
Yeah I have added it. Check the code. @Shame-fight |
Care to elaborate the last part. |
In the real world, the path planning of the unmanned vehicle should be like this: the unmanned vehicle only walks one grid, and then decides the grid position to go next according to the current algorithm and the position of the surrounding obstacles. Repeat this cycle until you reach the end. |
Yes, there are multiple autonomous vehicles on the same map. Different cars can choose different starting and ending points and algorithms, and finally start path planning at the same time. |
It's possible but the issue is that the GUI is going to glitch a lot even though it's just one thread that's currently running. @Shame-fight |
Thanks for your work, I want to replace the corresponding squares of start, end and grass on the map with pictures instead of filling like red, purple or green. The goal is that the effect will look more realistic. But I'm new to pygame, trying to modify the code but can't achieve what I want. can you help me? Is it possible to provide an example such as modifying the picture of start.
Looking forward to hearing from you.
@Sana-078
The text was updated successfully, but these errors were encountered: