Noisy Sensors & Kalman Filters, step 4
Catch it
Use the filter's prediction to be where the ball will be, then close the gripper at exactly the right moment.
Builds on Position, velocity & acceleration and Sensors, rates & delay, from the free Foundations.
Write and run this step in the simulator with ProAim where it will be
The arm needs about two seconds to get from home to the table. By then a ball moving at 4 cm/s has travelled 8 cm, so you can't grasp where the ball is, only where it will be when the fingers get there. Your filter gives you exactly that:
The error of that prediction grows with the horizon: an error of 3 mm/s in becomes 9 mm three seconds later.
A catch in five moves
- Track for a couple of seconds, until the velocity settles.
- Pick an intercept time , about 3 s ahead, and move 10 cm above the predicted point (
move_totakes about 1 s). - Re-estimate while hovering. Half a second of fresh readings helps a lot: the horizon is shorter now, and readings from before and after the move pin down the velocity.
- Descend to ball height with the fingers open. The fingers close across the ball's path (the hand always faces the base), so the ball slides in between them. They leave about 2 cm of room on each side, so your sideways aim must be that good.
- Close as the ball's centre reaches the grasp point. Keep tracking while you wait, and compute the arrival time from the hand's position :
Close about 0.2 s before . Late is fatal: the ball has already slid out between the fingertips. A little early is fine, because the conveyor pushes the ball into the closing fingers.
Then carry it to the cup as usual. If the ball reaches the end of the conveyor (20 cm from the base), it stops. Picking it up then doesn't count!
Your task
Catch the red ball while it's moving and put it in the cup. The path and speed change every run, so run it several times.