Geared motor position feedback

I'm making a theo jansen walking robot that has 4 seperate legs each controlled by an individual geared electric motor (4 motors 1 for each leg).
Similar to this one...

These walkers work via the mechanism shown in the following video...

I want my walker to move like this model does...

(1 leg at a time quickly stepping while the other three slowly push the walker forward) however in the above model this is controlled by a gearbox.

My model needs to control each of the legs via escs and some sort of control feedback that can tell what position each leg is in so i can program it to have the same leg movement as the above walker; The feedback mechanism is what I need to figure out.

My current setup uses a large wooden wheel as the main drive wheel and i want to be able to know how far the main drive wheel in the design has rotated.

My initial reaction is to stick a rubber wheel on a rotary encoder and have it rub against the drive wheel so that when the wheel turns the encoder turns too and lets me know how far it has spun, it would possibly require a seperate magnet and sensor connected to the wheel as well, so as to realign the arduinos view of zero at every rotation (to counter for inconsistencies in the system); and there's also the danger of the encoder wheel sliping etc so i am looking at other ways.

Other options are to put either magnets or some sort of reflective material on the wheel that can be detected by a sensor although debouncing would be an issue with this approach and I don't know enough about such systems to know if it would work.

So yes that's what I'm trying solve and those are the aporoaches I have so far; if anyone can improve on those ideas or offer better solutions I'd very much like to hear from you.

Thanks in advance for any suggestions
All the best
Oddy

If you need to know the position at all times, you probably need a rotary encoder and a "home" or "limit" sensor.

If you just need to know when you've hit the limit, limit-sensors are all you need.

For a home or limit sensor, the most common solution is a [u]slotted optical switch[/u]. It's basically an optoisolator (LED and a phototransistor) with a slot so you can break the (IR) light beam with something mechanical. Or, you can use a [u]microswitch[/u].

You've already chosen you motor, but it's also common to use a stepper motor and a home sensor (A stepper motor goes as far as it's told, but you (the or the software) has to know the starting position) .

Or if you don't need 360 degree rotation, a servo motor always goes where it's told and it always "knows" where it is (so you don't need any additional position sensors).

I don't know anything about walking robots, but I assume it's also common to use cam mechanism to convert rotary motion to linear motion(s) so the motor can rotate continuously without limits.