DEVLOG 3 - GRAPHS
After a lot of thinking, I decided to base the new line algorithm on graphs.
High level process:
- Robots negotiate shape of the physical network (who can see who).
- Robots search for a Hamiltonian path through the network. If there is none, they use the path that connects the most robots.
- Robots at the end of the path move inwards, internal robots move to the midpoint between their two neighbours. Robots outside the path move inwards until they are connected, and the path is reevaluated to include them.
I like this method, because it avoids gossiping position information which is susceptible to noise. This also means that once the path is decided, the robots only need to rely on what they can see with their IR receivers.
The Problem
While I was implementing this solution, I realised how much data I was transmitting. Each packet contained a full JSON representation of the network, alongside IDs, timestamps, etc. Although this could be compressed in the final version, it’s still too much data if I want to reliable real time communication. This means instead of purely IR, I also need to make use of the ESP32’s builtin radio. Despite it seeming more complex at first, it actually makes everything a lot simpler.
With the integration of radio, the robots can now hear as well as see. Instead of passing information between robots, they can simply broadcast it globally, making negotiation much faster.
I’ll go into more detail about the specific implementation in the next devlog, but that’s the update for now. No visual changes right now because the code doesn’t run, but hopefully by tomorrow they should be able to form lines
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.