MatejSloboda / Dijkstra_map_for_Godot

MIT License
78 stars 13 forks source link

found a bug in either get_cost_map or initialize as grid! #40

Closed astrale-sharp closed 4 years ago

astrale-sharp commented 4 years ago

EDIT: why do I think there's a bug I connected the map using initialize_as_map connecting orthogonal neighbours between each other I calculate with max_cost = INF, I expect the cost to increase from 0 to the distance of the sources I observe it suddenly stops and is not part of the cost map (meaning cost = INF I assume) hence the bug

look at the state at commit 55d1ac1f861bc23465e5547386b6e8692bcfa79c (he one before the last one that has a long commit message) of #39 , if you run the demo you'll have a graphical weird things which is not due to the demo code but either get_cost_map() or initialize_as_grid(), details in the commit 55d1ac1f861bc23465e5547386b6e8692bcfa79c message of #39

astrale-sharp commented 4 years ago

hmm, the bug could also come from the recalculate method !

MatejSloboda commented 4 years ago

I've done some testing and found that initialize_as_grid is broken. I couldn't figure out why, because I wrote it opaquely like an idiot.