I am tasked with building a robot that needs to localise and navigate itself on a rectangular surface (like a large desk). The rectangle's shorter sides will be marked with a red tape (or with two different colours if need be), while the longer edges are marked with a black tape. My robot is fitted with a forward facing camera, orientated downward slightly, as well as 6 sonar sensors around it's perimeter to detect any of the edges of the rectangle. There is also an IMU and encoders on each wheel (this is a two wheeled robot, with the third point of contact being a trolley wheel). The size of the rectangle is known and thus a map of it is available.
My questions are thus these:
Using the camera( I have both a wide angle cam or a standard camera at my disposal) how would I be able to find useful information from the edges of the rectangle. Obviously not all the rectangle edges will be in frame of the camera simultaneously, but what ros packages/methods could I use to gather information from them using the different colours of tape.
If/once I have information about the edges, are there any navigation tools that would allow me to do a sweep over the whole mirror (such as a lawnmower over a garden) to navigate the whole surface area.
What is the simplest way to get the sonar's to prevent the robot driving off the edge, given that they are downward facing?
The biggest challenge here seems to be that there is no real absolute reference, as the nature of the project requires the robot to localize itself only from data on the rectangle.