Ball Trajectory Planning

I hear from some of my basketball friends that you want to aim for the square on the backboard, and that will guarantee you a basket.

You don’t want to aim for the square on the backboard in general in basketball if you are shooting from a distance from in front of the rim. You aim for the backboard (and banking the shot in) when you are in close to and below the basket, particularly from the side. For shots from more than a few feet basketball players are taught to aim for the hoop itself and not the backboard.

ooooh got it, thank you!

http://hyperphysics.phy-astr.gsu.edu/hbase/traj.html#tra7

This should do work for you! Gives you everything you need to know. As long as you know the speed at which the ball is launched and the angle it will tell you how far it will launch. With some manipulations with the equation you can determine much other stuff also.

The size and weight of the basketballs is listed in the rules in 2.2.11

here:
The Basketball is a Size 4 Compact foam basketball (Gopher Deluscious™ Foam Basketball, Item # 71-502) with an outer circumference of 25 in. and approximate weight of 11.2 oz.

Ah, thanks, I totally missed that!

All of our foam balls weigh ~10 ounces. That’s gonna be a problem :frowning:

I am growing more and more convinced that any kind of consistent shooter will be rendered useless by the thoroughly inconsistent balls. :mad:

Oh, here are some calculators for finding ball exit velocities and angles I put in a different thread.

Forum post

This is all great and well, but unless they give us the equation somewhere to be used in our code, this is essentially rendered useless without creating a reference table for the robot. I’m working on getting the equation with some professors right now though.

Using the viscosity of the air, I’m able to estimate the resistive force on the sphere (since it is a sphere, it makes this calculation much simpler instead of using the drag calculations… which is okay, but i just prefer this one)… at 10m/s you will encounter significant drag.

Here’s an Octave/Matlab script that does the estimation (working with iterative solution… no calculus involvement yet… which seemed rather difficult to do)

https://bitbucket.org/ultimatebuster/loellen-robotics-simulation-repository/src/9c7876bde04c/2012/bbairdrag.m

Diameter is 25"/Pi
Weight is 302 grams +/- about 2% (based on an unreasonable sample size of 3)
Density can be calculated, and is not necessarily uniform.

Also consider that the surface WILL change as the ball gets used in a tournament.

The Magnus effect is NOT trivial nor can it be ignored, if your launcher imparts spin greater than about 2 or 3 spins per second. That spin also has a significant effect upon how the ball will bounce after it hits the backboard.

Right. Use the match for a first order estimate, and go empirical from there.

BUT, understanding all those variables will come in handy when you try to solve any problems with variability of your trajectory.

Ball diameter ~ 8"
Hoop diameter ~18"
That is some serious leeway for close shots, but a little tighter percentage-wise for shots from the top of the key and beyond.

What I would do, and will attempt to for my kids, is implement the solution to this set of equations:

y = height difference from launcher to hoop
x = horizontal distance from launcher to hoop center
a = angle above horizontal for launcher
t = time in air
g = accel of gravity

y = vsin(a) - 0.5gt^2
x = v*cos(a)*t

If you know y, and g, you can substitute and solve to eliminate t. Then the two variables are x and a. The analytic solution is, well, ugly, and you’ll need a computer to assist, but if you enter values it is a bit easier.

I made this for my team (you need GeoGebra to run it), which basically simulates projectile motion of the ball (ignoring all other factors). You can drag around V to shift the muzzle velocity and firing angle, as well as Height and Backboard to modify distances. Everything is considered relative to the point of release. There are obvious problems with it, but it does provide a nice model for the basic concepts here.

Simple Ballistic Calc

http://inceptus.org/calc.html

Wow, that GeoGebra thing is pretty sweet!

I believe the ambiguity around the significance of the drag on the basketball vs. the baseball has to do with the density, size and speeds that they are being thrown at.

As an illustrative example imagine a two bowling balls dropped off a tall building. the first weighs 16 pounds, but the second has been hollowed out to weigh only 6 ounces. The exterior surfaces are the same. Neglecting wind resistance, both should hit the ground at the same time since gravity accelerates at -32ft/s^2, however in practice the heaver ball will land first. The aerodynamics of both balls are the same, but the added mass of the heavier ball will over come more drag.

With that said, I tend to agree with others here, that it’s good to use math and physics, but my approach would be to keep the math as simple as possible, and build a mock up to see how well your physical results match your theoretical ones.

I missed this thread earlier when I was looking for places to post my spreadsheet, so I made a new thread instead. I hope it doesn’t fracture the conversation too much. :yikes:

I wanted to share a spreadsheet I made with CD. It helps with calculations for the ideal projectile in a variety of circumstances. Most importantly, it helps with the case of a fixed-velocity varying-angle shooter, as well as other cases. Please see my blog post about it: link. The file is about 12KB too large to post directly here.

It doesn’t take the drag into account, but will give an order of magnitude for different situations. It also tells you how much variation in your velocity or angle there would be between each of the hoops, so there is an indication of how much tolerance there is on the velocity or angle.

The formula for predicting the angle of a shot given a range and an initial velocity is non-trivial when you add in the height of the shooter and the height of the basket, so I have a macro doing iterative loop to calculate those values.

I agree that teams won’t be approaching baseball speeds but a baseball is also significantly more dense than the basketball in the KOP.

I don’t have any math to back myself up but 6 years of playing dodgeball with 6-8 year old kids at a summer camp tells me that even at low speeds drag effects the trajectory of a foam ball. I am sure that people involved in 2006 would back up this anecdotal evidence.

But, it’s NOT a sphere. The little bumps? They change the boundary layer behavior and aerodynamic effects.

This both increases the effective diameter of the ball and changes every other aerodynamic factor. The bumps will act to actually REDUCE overall drag by reducing pressure drag significantly; but it increases skin friction drag which increases the affect of most aerodynamic forces, including magnus effects. (same way that the little holes in a golf ball work… increase range, make it harder to remain accurate).

Just saying… if you want to be ultra accurate, you’re forgetting some stuff.
And to anybody that thinks it won’t end up coming down to testing and evaluation… well… good luck with that. Most of these simple equations are made with some extreme aerodynamic simplifications that will introduce an error of 10-25% in your calculations anyways.

Drag WILL be important. Magnus effect MIGHT be (depends on your launching mechanism). Being able to adjust your scaling factors (you should definitely have these) on the fly, mid-match, will probably be a nice thing to have.

I’d give you the math… but you either wouldn’t understand it, or already know it.

I think the general agreement by most is that the math is VERY complex if you include all the contributing factors, but in reality it’s not that important in the long run. I think teams should definitely put thought into the trajectory of their throwers, but anything beyond simple kinematic equations is going to be wasted effort. I think the quote from Ian Curtis put it best,

Entire books have been written on drag, but FIRST robots tend to operate pretty well on the back of a napkin.

Rather than worry about every little detail that could potentially throw off a throw, people need to realize that this game, by it’s nature, is going to be full of variables. Heck, the balls are going to get sliced up, no doubt, so that right there is going to throw off any calculations of drag. The best thing to do is to do basic calculations to get a good idea, then build a shooter that is consistent, and try to get as accurate as you can but accept the fact that there will always be percent error. The old expression goes “measure with a micrometer, mark with chalk, cut with an ax.”