I want to make a person following robot similar to this one.
I want the person to carry an ultrasonic emitter that sends out an ultrasonic pulse a couple time a second. Two (or more) ultrasonic receivers on the robot will listen for the pulse and use that information to direct the robot.
In the example I linked above, he uses the intensity of the sound to figure out which receiver is pointed towards the emitter. From this he gets direction (left, right, or straight). He also uses the intensity of the sound to estimate distance. My concern is if the beam from the emitter isn’t pointed straight at the robot, the sensors could get different intensities as a result which could cause the robot to turn the wrong way.
I’m thinking of having the robot know when a sound is emitted, and use time-of-flight to the two detectors to calculate distance and direction. It would be possible to calculate the position of the emitter with respect to the robot. If you know the time the sound is emitted with millisecond accuracy, you should be able to calculate position within about 1/3 of a meter.
So how do I let the robot know with millisecond accuracy when the pulse is emitted?
My first thought was have the emitter mounted on the robot when I turn them on. When the emitter is in contact with the robot it will be easy to signal to the robot when the emitter triggers. You then take the emitter off the robot and clip it on your belt. If the emitter continues triggering at a constant rate the robot will know when the emitter sends out the pulse. I expect the robot will only ever be used for 30 minutes at a time, so as long as I can keep time accurately to one millisecond over 30 minutes it should be fine. Is it reasonable to expect any timing drift to be less than one millisecond over 30 minutes with an arduino or raspberry pi?
My second idea was to have a GPS module in the emitter and another in the robot for keeping time. The emitter can send out a signal at a specific time, and the robot knows what time it is and when the signal was sent, so knows the travel time. Is it reasonable to expect millisecond accuracy with this system?
Thanks for any suggestions.