Leading (and lagging) the Target

The strategy sub-team on my team is really adamant about being able to accurately hit the goal while the robot is moving at non-trivial speeds, either toward (and away from) the target or side-to-side, or both. The first case is fairly easy, due to the flatness of the trajectory of our balls, but the last two require you to know your velocity relative to the target in order to lead (or actually lag) it.

I was planning on using the gyro + accelerometers to get this information, and while the gyro is working great, it is difficult to get anything meaningful from the accelerometers. Is KW’s code coming to rescue me? Are others making strong headway (is see mixed response here on CD)? Or am I going in the wrong direction?

What are people doing to hit the target while moving without using accelerometers? Or is the dual-axis accelerometer the way to go?

Thanks in advance,

the simplist way to get speed is to do time trials with your robot at different PWM outputs to the motors. Time the robot as it runs across two lines about 10 feet apart, and calculate the velocity for each PWM setting

this will give you a rough idea how fast the robot is moving. Of course the real speed will change based on battery charge level, tire wear, drive-train break-in…

but its better than nothing.

One thing that you can try is to use feedforward control from the camera to help you aim.

In other words, if you see the target moving 5 pixels left every cycle, you can use that information as an indicator of your velocity relative to the goal.

This is a very difficult problem.

The solution to this problem was a state secret during WW2. Essentially you are trying to solve the gunsite problem. WW2 era anti-aircraft gunsite had mechanical computers inside that would point the bullets not where the planes are, but where they would be in when the bullets arrived.

I don’t want to discourage you, but it is a tough nut to crack.

Joe J.

Any references? I could find nothing on this either on Google or Wikipedia.