(no title)
FooNull | 10 years ago
My script builds a map of the level as the robot drives around, using information from the lidar scans with each step. It can then use this map to seek out unknown areas, plan movements, detect enemy movement on all 4 sides, lots of things
The framework is relatively robust. Feel free to erase my `exports.update` function and write your own. As long as you use the custom tank.forward(), tank.shoot(), tank.turn_right() (etc) functions instead of calling their api, it will build a reliable map that you can reference for better decision making.
If you want to see an ASCII version of the robot's internal view of the map, change the `var verbose = false;` to true at the top of the script. But this tends to make my browser lag after the ~60th step. So much output! But it also gives you a step-by-step breakdown of the logic for why it's making each decision. Which is interesting to watch, and useful for debugging.
The whole thing is pretty messy. And I'd like to clean it up, but after 3 days and not getting anything else accomplished in my life (like work) I need stop for a while. It was a fun proof of concept for mapping.
No comments yet.