Hi,
I was wondering how other teams who used a shooter this year calculated its
speed with vision tracking.
In our team, we built a table for speed-distance, plug it into excel and used polynomial regression to give us a function that transfers a given distance from the high goal to the desired shooter speed needed to score. with this method we managed to hit the goal from almost any given point on the field.

The disadvantages of this method,i think, are that

it can maybe be not precise if you have not done your measurement right, 2) it is a little time consuming and need to be redone after every slight change in the shooter mechanism.

My question is, how did your team calculate your flywheel/angle/shooter speed from a given distance?

i know some teams did it with physical calculation but i have always thought that air drag / ball spin (magnus effect) are really hard to predict and calculate. maybe someone did it that way and can explain how? or maybe someone did it with a different approach and can share their experience?

if you have any external resources / reading material on the subject please share them:)

You don’t need to turn the table into a polynomial. You can use a lookup table, or a carefully-chosen piecewise-linear function.

i know some teams did it with physical calculation but i have always thought that air drag / ball spin (magnus effect) are really hard to predict and calculate.

Gathering empirical data for your specific shooter and using that data as you did is likely the most accurate approach.

maybe someone …explain how?

Here’s a paper for students interested in the physics, math, and computer simulation aspects of this problem: Free-body force diagram, derivation of differential equations of motion, and C pseudo-code for trapezoidal numerical integration.

Not as a general proposition, no. It depends on your empirical data.

For data that is shaped such that it is not well-modeled by a polynomial of reasonable degree, a piecewise-linear function might be more accurate.

Also, depending on the processor being used, a piecewise-linear function may execute faster than a high-order polynomial.

and physical calculations will be generally more precise than a table?

I don’t know what you mean by “physical calculations” so I’ll wait till you have clarified before answering that.

The thing you should be focusing on is consistency. If you shoot several times from the same location using boulders of different weight, age, and state of disrepair, do you always score the goal, regardless of the battery’s state of charge? If you don’t have a consistent shooter, it’s fruitless to worry to much about polynomial vs piecewise-linear vs lookup table.

by physical calculation i mean calculating the position and height of the ball at a given point with physical equation that include air drag and magnus effect

That will be very precise but not as accurate as empirical data.

Besides, there is no closed-form solution to the differential equations of motion when you introduce air drag and magnus. You would have to do a numerical simulation as discussed in the paper I linked. You probably don’t want to be doing that in the roboRIO.

We use a catapult-like pneumatic arm instead of a shooter wheel, but we have found that as other people have stated on this thread, the values we set to make shots look really arbitrary. They’re most likely a combination of multiple physical effects and very hard to predict.
We used linear interpolation between values in a lookup table we got from test data. It’s been very successful so far, and I suggest you do something similar instead of trying to simulate the physics of the shot. Retaking values for the table took us about 15 minutes on the practice field before our competition last weekend, so it shouldn’t be too hard after you’ve done it a few times.