Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   General Forum (http://www.chiefdelphi.com/forums/forumdisplay.php?f=16)
-   -   Ball Trajectory Planning (http://www.chiefdelphi.com/forums/showthread.php?t=99495)

mikegrundvig 08-01-2012 14:19

Ball Trajectory Planning
 
Ugh, just got off the phone from a friend of mine with a masters in physics. I'm sure I'm not the only one starting down the painful math road of calculating accurate trajectory planning for small basketballs. I'm posting this in the hope it will help others or that others here who know more than me can contribute back.

According to my friend the problem is both very simple and very hard and he was unsure which terms would have a large enough impact to be relevant. In fact, that is ultimately the crux of the problem. If we account for everything in the equation then we are going to be far more accurate either way so I'm working from that assumption though I'm not sure if it's feasible.

To that end, we need to know quite a few things starting with the ball diameter, density, and mass (does someone have the weight of the ball measured accurately?). He was uncertain but he did feel that with the light weight of the ball the wind resistance might actually matter. Unless someone has access to a wind tunnel and wants to share results we are going to be guessing this one in part because determining the coefficient of friction for a pebbled surface seems exceptionally difficult. At best, we can use the friction coefficient for something like rubber to air and calculate it for a 7" diameter sphere at the temperature/pressure of the playing field.

This paper says drag through the air on a full size basketball is negligible:
http://www.phys.ubbcluj.ro/~evintele...na/Baschet.pdf

But then it gets shot down a bit here:
http://www.wired.com/wiredscience/20...n-basketballs/ You can see in the graph at the end here that air drag has a huge impact on a baseball:
http://wps.aw.com/wps/media/objects/...cs/topic01.pdf

Another potential nasty problem is the Magnus Effect. This is what happens when something is spinning and creating lift. This is one my friend felt we could likely ignore due to the low spin RPM though it's also one of the easier ones to do:
http://en.wikipedia.org/wiki/Magnus_effect

So what is everyone else currently looking at? How deep down this rabbit hole are you going? Thanks!

-Mike

davidthefat 08-01-2012 14:21

Re: Ball Trajectory Planning
 
Quote:

Originally Posted by mikegrundvig (Post 1099519)
Ugh, just got off the phone from a friend of mine with a masters in physics. I'm sure I'm not the only one starting down the painful math road of calculating accurate trajectory planning for small basketballs. I'm posting this in the hope it will help others or that others here who know more than me can contribute back.

According to my friend the problem is both very simple and very hard and he was unsure which terms would have a large enough impact to be relevant. In fact, that is ultimately the crux of the problem. If we account for everything in the equation then we are going to be far more accurate either way so I'm working from that assumption though I'm not sure if it's feasible.

To that end, we need to know quite a few things starting with the ball diameter, density, and mass (does someone have the weight of the ball measured accurately?). He was uncertain but he did feel that with the light weight of the ball the wind resistance might actually matter. Unless someone has access to a wind tunnel and wants to share results we are going to be guessing this one in part because determining the coefficient of friction for a pebbled surface seems exceptionally difficult. At best, we can use the friction coefficient for something like rubber to air and calculate it for a 7" diameter sphere at the temperature/pressure of the playing field.

This paper says drag through the air on a full size basketball is negligible:
http://www.phys.ubbcluj.ro/~evintele...na/Baschet.pdf

But then it gets shot down a bit here:
http://www.wired.com/wiredscience/20...n-basketballs/ You can see in the graph at the end here that air drag has a huge impact on a baseball:
http://wps.aw.com/wps/media/objects/...cs/topic01.pdf

Another potential nasty problem is the Magnus Effect. This is what happens when something is spinning and creating lift. This is one my friend felt we could likely ignore due to the low spin RPM though it's also one of the easier ones to do:
http://en.wikipedia.org/wiki/Magnus_effect

So what is everyone else currently looking at? How deep down this rabbit hole are you going? Thanks!

-Mike

Keep in mind that this very topic is being researched in universities. It goes VERY FAR.


For the context of FIRST, I personally think only basic kinematics is required... Unless you are making an arm that will catch the ball mid air.

Andrew Lawrence 08-01-2012 14:25

Re: Ball Trajectory Planning
 
If you're unsure, go with the simplest, and then physically test it. Math is great, but unless you test it IRL, there can be many variables you're forgetting about.

mikegrundvig 08-01-2012 14:33

Re: Ball Trajectory Planning
 
Quote:

Originally Posted by davidthefat
For the context of FIRST, I personally think only basic kinematics is required... Unless you are making an arm that will catch the ball mid air.

I think this is the case for shorter shots. I'm not so sure for longer shots due to the light weight of the ball.
Quote:

Originally Posted by SuperNerd256 (Post 1099527)
If you're unsure, go with the simplest, and then physically test it. Math is great, but unless you test it IRL, there can be many variables you're forgetting about.

I appreciate the input but I actually disagree agree with this suggestion. I know that drag, magnus effect, etc. all have a real world impact. I am unsure if it's significant enough to cause a noticeable impact in practice. I think it would be better to start with the math being as accurate as it can be first rather than over-simplify and be left guessing where the inconsistency came from if it does matter. It's quite easy to compare the complicated math solution against the simple math solution for a sanity check. It's extremely hard to dial in accuracy from an inaccurate starting point while it's quite easy to take something super accurate and make it less so.

Now with that said, this is likely beyond my math/physics skill so it could very easily all become a moot point in the end :)

-Mike

Andrew Lawrence 08-01-2012 14:36

Re: Ball Trajectory Planning
 
Quote:

Originally Posted by mikegrundvig (Post 1099535)
I think this is the case for shorter shots. I'm not so sure for longer shots due to the light weight of the ball.
I appreciate the input but I actually disagree agree with this suggestion. I know that drag, magnus effect, etc. all have a real world impact. I am unsure if it's significant enough to cause a noticeable impact in practice. I think it would be better to start with the math being as accurate as it can be first rather than over-simplify and be left guessing where the inconsistency came from if it does matter. It's quite easy to compare the complicated math solution against the simple math solution for a sanity check. It's extremely hard to dial in accuracy from an inaccurate starting point while it's quite easy to take something super accurate and make it less so.

Now with that said, this is likely beyond my math/physics skill so it could very easily all become a moot point in the end :)

-Mike

Well, being only a sophomore in High School, I must first applaud you for attempting the math involved in this. With my current skill level, I would never be able to calculate stuff like this. Being on a robotics team, I will secondly tell you that you can skip a lot of long, confusing math by making a prototype. While the math still exists, it's sometimes easier to mock up something and just change it little by little until it's perfect.

Hope this helps, and whatever path you choose for this game, I wish you the best! :D

GBilletdeaux930 08-01-2012 14:39

Re: Ball Trajectory Planning
 
Once you have a basic shooter that is very similar to the final design, you can begin some experimentation. Obviously, all experimental data will have to be retaken with the final design. But what you should do is set your shooter to shoot at 0-degrees relative to the ground, or as horizontally as you can.

Using the same rpm, shoot the ball a dozen or so times, recording how far it went. With that, you can calculate how much velocity your shooter has at that rpm. If you plan on having a static rpm with varying angles and distances, you shouldn't need any more data beyond what you have. If you plan on varying your rpm as well, you will need to take more data to see how your velocity varies with rpm.

These balls are heavy enough, that I don't feel wind resistance will be too critical at 57' (maximum length you will never reach) but I could easily be wrong. Have your team member with the best arm go outside and just whip the thing. You should be able to see lift if it occurs. And if there is significant resistance, you should be able to observe that as well.

RyanCahoon 08-01-2012 14:49

Re: Ball Trajectory Planning
 
Quote:

Originally Posted by GBilletdeaux930 (Post 1099543)
Once you have a basic shooter that is very similar to the final design, you can begin some experimentation.

[...]

Using the same rpm, shoot the ball a dozen or so times, recording how far it went.

This. I would see how far I could get with fitting a line to a set of data points.

lcoreyl 08-01-2012 15:21

Re: Ball Trajectory Planning
 
The physics degree in me says this is a very interesting question to pursue.

The engineer in me says 2 things:
1) speed is a factor in how much drag comes into play. I don't think you're going to be approaching baseball speeds unless you're going for the robot that parks in the alley, receives the pass and chucks it full court (if you are--bravo!).

2) this math would only matter after you have a mechanism that is VERY repeatable with the shot. I would worry about that error first.

Mr. Lim 08-01-2012 15:31

Re: Ball Trajectory Planning
 
To at least provide some useful info, a paper in 2002 from a prof at the University of Waterloo proposed:

45 degrees + half the elevation from the shot origin to the basket.

Take it for what it's worth. I tend to believe him.

DjMaddius 08-01-2012 15:39

Re: Ball Trajectory Planning
 
Well, really it depends on how much power your throwing mechanism has. If it throws hard you'll have to put much more arch on it so that it goes in instead of bouncing off of the backboard. On that same note, if it throws too light, you simply can't make a basket. You will have to perfect the mechanism before you can do any math towards which trajectory your throw it.

I personally plan on doing research on how catapults and what not determine where what they throw will land. Sometimes they can be very accurate though they tend to throw odd shapped things which makes it more difficult to guess.

If at all possible, I'd like to be able to accurately throw a ball from the other end of the field and make it in though this will require very precision mechanics which I'm not sure the guys running the machines around here can do. One thing is off and all my code doing the angle estimations will do no good.

Well, good luck to you!

Templar1396 08-01-2012 15:51

Re: Ball Trajectory Planning
 
I'm a senior year mechanical engineer student mentoring my former high school trying to do these calculations.

so a few things, Drag is a function of v^2, i would say that unless you are using a large air cannon it is pretty much MOSTLY negligible

Coefficient of restitution will probably be the greatest loss of energy you will encounter

if you want to tackle this i would say, construct a free body diagram, do some energy calculations, maybe some work calculations. balance using Newtonian mechanics and then try to come up with something feasible.

Good luck, and remember to just have some fun

Gdeaver 08-01-2012 16:47

Re: Ball Trajectory Planning
 
Spin can have a major effect on the path. Also a ball with spin has very different interaction when bouncing off the wall as we noticed today.In 2006 we choose top spin. After some simple testing today the opposite may be better.

mathking 08-01-2012 16:55

Re: Ball Trajectory Planning
 
For what it's worth, my first impressions as a mathematician and former basketball coach... (and as a mentor who was around for Aim High)

Do some math first. You want to work out trajectories that bring the ball down in the center of the rim. The amount of arc is a function of the height above or below the rim and the distance to the rim. If you just start building prototypes you will likely make several designs which have fatal flaws. A little math ahead of time can avoid some of the mistakes.

Second, have someone with some skill at free throws shoot a few with this ball. Shoot some video (from a variety of angles) of the shots to give you some idea about trajectories. You might also want to watch a good free throw shooter shoot some shots with a regular basketball.

There balls deform a lot more than a basketball or baseball. That deformation will vary greatly depending on the mechanisms you use for shooting. This will have a lot of effect on the air resistance and flight characteristics of the ball. So there will be no getting around doing a lot of testing with prototypes.

The (horizontal) angle at which you are shooting at the rim will matter. In a theoretical world where your shooter is always the same, this isn't the case. But when you are shooting at an actual hoop, you are going to want to shoot as close to straight on as you can. There will be shots that are a little too long. If you are shooting close to straight on a decent percentage of the shots are going to bounce off the backboard and come back to the rim. This means you want to err a little bit on the side of too far rather than too short in your shooting.

Figuring out how quickly you can shoot without having the ball interfere with one another is another important thing to figure out. If you shoot too quickly you are likely to have one or two balls bounce out off of a preceding ball.

nickcvet89 08-01-2012 16:59

Re: Ball Trajectory Planning
 
Keep it simple, for the purpose of what most teams want to accomplish (shooting), stuff like drag, density and other factors can be set aside if you want to just shoot. If you have a general physics background, apply that math because even with calculating exactly how much speed, height, etc. needed to make a shot, remember we live in a imperfect world. If you want to have reasonable success and want to use math and physics, use the basics of physics formulas and you'll be fine. Otherwise build and test. Remember we only have 6 weeks to get a robot ready for a competition.

mikegrundvig 08-01-2012 17:01

Re: Ball Trajectory Planning
 
Hi all; thanks for all the feedback. I just got off with phone with Rhett Allain (http://www.wired.com/wiredscience/author/rhettallain/) - he is a physics professor and the friend-of-a-friend. He feels that the Magnus Effect can be effectively ignored in these foam basketballs because of their size, density, and low RPM of spin. Likewise, while air resistance will certainly be a measurable amount, it's exceptionally hard to calculate and also likely to be within the inconsistency of the machine itself in the best case scenario. This also means temperature, pressure, etc. can all be ignored.

Looks like you guys were right and I was wrong - no need to over-complicate it. This is good news for us though as the physics problem is now just one of projectile motion and nothing too nasty.

-Mike

sometimestommy 08-01-2012 17:44

Re: Ball Trajectory Planning
 
Ive worked on finding a good formula to make a good curve but to no avail. I think im just going to make a chart when our launcher is working what maps out various distances and initial velocities/theta. This way you can just either create a curve in labview or just store the data on the crio to have the code refer to

DjMaddius 08-01-2012 17:45

Re: Ball Trajectory Planning
 
Thats great news, I'm glad you went ahead and did a lot of research and posted it all here.

The information you are giving may be very vital to some of the games played this year!

Rocketeeringer 08-01-2012 18:00

Re: 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.

Assuming you are shooting a basket straight on, could you just calculate the normal angle of the plane that would give you the most area between the uppermost point of the backboard and outward most point of the hoop that would give you the greatest chance of scoring?

Basel A 08-01-2012 18:01

Re: Ball Trajectory Planning
 
I've been doing some basic physics on shooting the ball with near-optimal trajectory (still working on the equation for optimal trajectory) and have found that in some situations, essentially a full-field shot, ball initial velocities will need to exceed 10 m/s without accounting for air resistance (or spin, for that matter). As such speeds, wouldn't air resistance come into play?

Honestly, I'm doing this for fun without expecting accuracy, but I'd love to get as accurate as possible.

Ether, if you happen to be around, I'd love to get your input on this problem, since you know pretty much everything.

mikegrundvig 08-01-2012 18:07

Re: Ball Trajectory Planning
 
Quote:

Originally Posted by DjMaddius (Post 1099724)
The information you are giving may be very vital to some of the games played this year!

Heh, thanks. I'm trying to get this whole cooperation thing though it goes against my extremely competitive nature :)

mathking 08-01-2012 18:36

Re: Ball Trajectory Planning
 
Quote:

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.

Rocketeeringer 08-01-2012 18:50

Re: Ball Trajectory Planning
 
Quote:

Originally Posted by mathking (Post 1099799)
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!

DjMaddius 08-01-2012 18:52

Re: Ball Trajectory Planning
 
http://hyperphysics.phy-astr.gsu.edu...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.

JByrd 08-01-2012 19:33

Re: Ball Trajectory Planning
 
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.

mikegrundvig 08-01-2012 19:42

Re: Ball Trajectory Planning
 
Ah, thanks, I totally missed that!

Djur 08-01-2012 20:28

Re: Ball Trajectory Planning
 
Quote:

Originally Posted by JByrd (Post 1099869)
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.

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

Ninja_Bait 08-01-2012 20:33

Re: Ball Trajectory Planning
 
Quote:

Originally Posted by Djur (Post 1099939)
All of our foam balls weigh ~10 ounces. That's gonna be a problem :(

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

Djur 08-01-2012 21:21

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

Forum post

yarudl 09-01-2012 17:40

Re: Ball Trajectory Planning
 
Quote:

Originally Posted by DjMaddius (Post 1099818)
http://hyperphysics.phy-astr.gsu.edu...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.

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.

shuhao 09-01-2012 20:24

Re: Ball Trajectory Planning
 
Quote:

Originally Posted by Basel A (Post 1099746)
I've been doing some basic physics on shooting the ball with near-optimal trajectory (still working on the equation for optimal trajectory) and have found that in some situations, essentially a full-field shot, ball initial velocities will need to exceed 10 m/s without accounting for air resistance (or spin, for that matter). As such speeds, wouldn't air resistance come into play?

Honestly, I'm doing this for fun without expecting accuracy, but I'd love to get as accurate as possible.

Ether, if you happen to be around, I'd love to get your input on this problem, since you know pretty much everything.

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...12/bbairdrag.m

DonRotolo 09-01-2012 22:45

Re: Ball Trajectory Planning
 
Quote:

Originally Posted by mikegrundvig (Post 1099519)
To that end, we need to know quite a few things starting with the ball diameter, density, and mass (does someone have the weight of the ball measured accurately?).

because determining the coefficient of friction for a pebbled surface seems exceptionally difficult.

Another potential nasty problem is the Magnus Effect.

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.
Quote:

Originally Posted by mikegrundvig (Post 1099688)
no need to over-complicate it.

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.

SenorZ 09-01-2012 23:11

Re: Ball Trajectory Planning
 
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 = v*sin(a) - 0.5g*t^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.

slijin 10-01-2012 00:01

Re: Ball Trajectory Planning
 
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.

guymon 10-01-2012 08:35

Re: Ball Trajectory Planning
 
Simple Ballistic Calc

http://inceptus.org/calc.html

mikegrundvig 10-01-2012 10:01

Re: Ball Trajectory Planning
 
Wow, that GeoGebra thing is pretty sweet!

AlDee 10-01-2012 11:38

Re: Ball Trajectory Planning
 
Quote:

Originally Posted by mikegrundvig (Post 1099519)
This paper says drag through the air on a full size basketball is negligible:
http://www.phys.ubbcluj.ro/~evintele...na/Baschet.pdf

But then it gets shot down a bit here:
http://www.wired.com/wiredscience/20...n-basketballs/ You can see in the graph at the end here that air drag has a huge impact on a baseball:
http://wps.aw.com/wps/media/objects/...cs/topic01.pdf

-Mike

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.

engunneer 10-01-2012 11:54

Re: Ball Trajectory Planning
 
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:

Quote:

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.

JamesBrown 10-01-2012 12:27

Re: Ball Trajectory Planning
 
Quote:

Originally Posted by lcoreyl (Post 1099588)
The engineer in me says 2 things:
1) speed is a factor in how much drag comes into play. I don't think you're going to be approaching baseball speeds unless you're going for the robot that parks in the alley, receives the pass and chucks it full court (if you are--bravo!).
.

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.

Dan.Tyler 10-01-2012 13:04

Re: Ball Trajectory Planning
 
Quote:

Originally Posted by shuhao (Post 1101043)
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.

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.

Tom I 10-01-2012 13:21

Re: Ball Trajectory Planning
 
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,
Quote:

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."

Dan.Tyler 10-01-2012 13:24

Re: Ball Trajectory Planning
 
Quote:

Originally Posted by Tom I (Post 1101587)
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,

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."

I'd have to fervently agree with the sentiment here.

But, some people still like to do the math. So I thought I'd hand over a few more tidbits of information like the word "boundary layer" to open a world to as much math as they could possibly want (and the realization that all the math in the world can't describe how air behaves)

Michael Hill 10-01-2012 13:33

Re: Ball Trajectory Planning
 
See this thread: http://www.chiefdelphi.com/forums/sh...ad.php?t=99485

kws4000 10-01-2012 21:40

Re: Ball Trajectory Planning
 
2 Attachment(s)
I cooked this program up a while ago... more like more than a year ago, and I'm not sure how it still works, but it does. Based entirely on the metric system, uses meters/kilograms/seconds/degrees/jouiles/etc std SI units.

I planned on making it able to work backwards using given variables but never got that far. Feel free to edit, compile and post. Executable in the zip, scource in the .c file.

Bill_B 10-01-2012 22:02

Re: Ball Trajectory Planning
 
Quote:

Originally Posted by mikegrundvig (Post 1099760)
Heh, thanks. I'm trying to get this whole cooperation thing though it goes against my extremely competitive nature :)

Make a sticker we can put on the side of the shooter giving you some "props" for the research?

Frank C 11-01-2012 00:23

Re: Ball Trajectory Planning
 
My thought is to build a (reasonably) consistent shooter and then trying to create an "auto mode" (similar to autonomous) where the operator, once he has the robot in range of the targeting system, could let go of the stick and put the bot into auto so it can position itself and shoot the ball... is that possible??

waialua359 11-01-2012 04:40

Re: Ball Trajectory Planning
 
Quote:

Originally Posted by Ninja_Bait (Post 1099943)
I am growing more and more convinced that any kind of consistent shooter will be rendered useless by the thoroughly inconsistent balls. :mad:

This is why we believe the majority of this year's challenge is a programming one.
No successful basketball player has one type of shot making ability from different areas of the court or with defense.
However, our robots are limited to being of one type, thus making it a bigger challenge for the programming folks vs. everyone else.

lcoreyl 12-01-2012 02:19

Re: Ball Trajectory Planning
 
Quote:

Originally Posted by Frank C (Post 1102266)
My thought is to build a (reasonably) consistent shooter and then trying to create an "auto mode" (similar to autonomous) where the operator, once he has the robot in range of the targeting system, could let go of the stick and put the bot into auto so it can position itself and shoot the ball... is that possible??

Definitely. Top teams will likely use this. You could do a more simple method (but possibly less effective) and instead of having the code drive, just have it alert the driver when they are in the correct spot.

I can't imagine having a wonderfully repeatable 3 point shooter and then having drivers try to eyeball it from across the court.

Grim Tuesday 12-01-2012 02:24

Re: Ball Trajectory Planning
 
Our team didn't even consider drive controlled shooting as an option. Imagine the driver with little dials for pitch, yaw, velocity, etc... They would never get anything done on the field.

lcoreyl 12-01-2012 02:54

Re: Ball Trajectory Planning
 
Quote:

Originally Posted by JamesBrown (Post 1101547)
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.

throwing a dodgeball as hard as you can is much faster than shooting from the key. Also, I think we can agree that the density of this year's ball is much higher than a dodgeball.

JamesBrown 12-01-2012 10:57

Re: Ball Trajectory Planning
 
Quote:

Originally Posted by lcoreyl (Post 1103333)
throwing a dodgeball as hard as you can is much faster than shooting from the key. Also, I think we can agree that the density of this year's ball is much higher than a dodgeball.

There is a big difference between me throwing a traditional dodgeball (playground ball) as hard as I can and a 6 or 7 year old throwing a foam ball (simmilar in density to this years ball) as hard as he can (as described in my anecdote). The latter I am sure is much closer to the speeds we will be seeing in this game, and again I have observed the effects of drag on the ball.

mwtidd 12-01-2012 11:34

Re: Ball Trajectory Planning
 
Quote:

Originally Posted by Frank C (Post 1102266)
My thought is to build a (reasonably) consistent shooter and then trying to create an "auto mode" (similar to autonomous) where the operator, once he has the robot in range of the targeting system, could let go of the stick and put the bot into auto so it can position itself and shoot the ball... is that possible??

This is exactly what we did in 2006, and made it to the finals solely based on autonomous. In teleop we used the same function but because of defense we only able to score in teleop in a couple of matches. Where auto aiming will pay off is from anywhere where you can be incontact with they key, or close to the key. I have a feeling if you're a few inches off the key, a robot will be hesitant to interact with you.

In 2006 we were shooting 10 balls in sequence for about the same range. We shot at about 8 or 9 for 10. This year is a tougher shot, but you are only shooting 2 or 3 balls so you will be able to be more consistent by taking one shot at a time.

My hope is to also make it better by providing feedback, so when the robot takes a shot I can provide feedback as to if it was too far, short, left, or right. Allowing it to learn and adjust similar to a player would if it had to take a similar shot again. Also it could auto adjust to a location it knows a little better. Similar to a player shooting from a familiar location, or a foul shot.

SenorZ 12-01-2012 11:57

Re: Ball Trajectory Planning
 
Good programming and STABILITY are the keys.

lcoreyl 12-01-2012 13:30

Re: Ball Trajectory Planning
 
Ok, I’m going to table the debate of whether drag and magnus are significant in order to clarify the second point I was trying to make: who cares?

remember the science lesson when you learned about accuracy vs. precision (repeatability)?

all the calculations discussed are concerned with accuracy; however, your FIRST concern should be building a shooter with very good precision!! drag and magnus won't cause bad precision.
drag and magnus depend on speed and spin. If you build a shooter that always has exactly the same speed, angle, and spin, then there will be an "accuracy" error, but the ball will land in the same place each time. a few tweaks and you're golden.

Michael Hill 12-01-2012 14:06

Re: Ball Trajectory Planning
 
Quote:

Originally Posted by lcoreyl (Post 1103524)
Ok, I’m going to table the debate of whether drag and magnus are significant in order to clarify the second point I was trying to make: who cares?

remember the science lesson when you learned about accuracy vs. precision (repeatability)?

all the calculations discussed are concerned with accuracy; however, your FIRST concern should be building a shooter with very good precision!! drag and magnus won't cause bad precision.
drag and magnus depend on speed and spin. If you build a shooter that always has exactly the same speed, angle, and spin, then there will be an "accuracy" error, but the ball will land in the same place each time. a few tweaks and you're golden.

Because teams will be shooting from different parts of the field requiring different speeds/angles/what have you.

Drag calculations can be very nonlinear even at speeds we may see in this competition.

mwtidd 12-01-2012 14:23

Re: Ball Trajectory Planning
 
Quote:

Originally Posted by lcoreyl (Post 1103524)
Ok, I’m going to table the debate of whether drag and magnus are significant in order to clarify the second point I was trying to make: who cares?

remember the science lesson when you learned about accuracy vs. precision (repeatability)?

all the calculations discussed are concerned with accuracy; however, your FIRST concern should be building a shooter with very good precision!! drag and magnus won't cause bad precision.
drag and magnus depend on speed and spin. If you build a shooter that always has exactly the same speed, angle, and spin, then there will be an "accuracy" error, but the ball will land in the same place each time. a few tweaks and you're golden.

Your goals determine which is more important. A very precise robot is easier to defend, and more susceptible to problems. An accurate shot in this game has the opportunity to land in one of the other baskets. If you're shooting from the key, I'd definitely agree with you that precision is critical, however from the open court, putting it in a vicinity may be better than being precise.

Shooting for THE hoops as opposed to A hoop is not necessarily a bad strategy.

lcoreyl 12-01-2012 15:13

Re: Ball Trajectory Planning
 
Quote:

Originally Posted by Michael Hill (Post 1103550)
Because teams will be shooting from different parts of the field requiring different speeds/angles/what have you.

Drag calculations can be very nonlinear even at speeds we may see in this competition.

I see. I guess I hadn't considered that teams would have the goal of being able to shoot from anywhere on the court. I was figuring for being able to shoot from the key, and from 1 particular spot on the opposite side of the court.

lcoreyl 12-01-2012 15:58

Re: Ball Trajectory Planning
 
Quote:

Originally Posted by lineskier (Post 1103561)
It depends on what your goals are to determine which is more important.

You don't have to choose between precision and accuracy.

Quote:

Originally Posted by lineskier (Post 1103561)
A very precise robot is easier to defend, and more suseptable to problems.

I'm not sure I understand what you mean

Quote:

Originally Posted by lineskier (Post 1103561)
from the open court, putting it in a vicinity may be better than being precise.

I'm assuming you mean a shooter that has GOOD accuracy and BAD precision MIGHT make it, where one with BAD accuracy and GOOD precision, WON’T make it. I agree, but I’m not encouraging the latter robot be built.

Quote:

Originally Posted by lineskier (Post 1103561)
Shooting for THE hoops as opposed to A hoop is not necessarily a bad strategy.

That’s completely fine if this is your strategy, but why worry about drag/magnus? Say your software automatically compensates your expected landing spot by 2 feet; however, mechanically your margin of error is 10 feet. What’s the point there?

Bill_B 12-01-2012 16:18

Re: Ball Trajectory Planning
 
Quote:

Originally Posted by slijin (Post 1101312)
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.

Samuel, Thanks for posting this. Very neat way to visualize the basic trajectories involved this year. I was moving the backboard value and got a y-displacement doing it that altered the paths. Whoa, says I. Backboard distance should not alter the path, should it? Then I went on a search for a formula using y(backboard) - fruitlessly. Turns out that theta is defined as an angle involving backboard as a vector. I changed theta's definition to be angle(V) and things look more reasonable now. But in case I missed something (neophyte geogebra-ist and all) I hope you can explain why you had theta defined the way you did.

Frank C 13-01-2012 11:14

Re: Ball Trajectory Planning
 
Quote:

Originally Posted by lineskier (Post 1103480)
This is exactly what we did in 2006, and made it to the finals solely based on autonomous. In teleop we used the same function but because of defense we only able to score in teleop in a couple of matches. Where auto aiming will pay off is from anywhere where you can be incontact with they key, or close to the key. I have a feeling if you're a few inches off the key, a robot will be hesitant to interact with you.

In 2006 we were shooting 10 balls in sequence for about the same range. We shot at about 8 or 9 for 10. This year is a tougher shot, but you are only shooting 2 or 3 balls so you will be able to be more consistent by taking one shot at a time.

My hope is to also make it better by providing feedback, so when the robot takes a shot I can provide feedback as to if it was too far, short, left, or right. Allowing it to learn and adjust similar to a player would if it had to take a similar shot again. Also it could auto adjust to a location it knows a little better. Similar to a player shooting from a familiar location, or a foul shot.

This pretty much sums up where we're headed. Design a consistent shooter (arc and distance) and shoot from the same spot (top of the key) with an auto-aimer with a swivel head (that will adjust for position of the target) and take a shot. I'm not sure we can design a program that will auto-adjust and "learn" as the tournament progresses... sounds very complicated to me, although we may have to manually adjust some parameters as the balls become more worn. Good luck!!

Polaris395 13-01-2012 11:39

Re: Ball Trajectory Planning
 
Did I hear someone say something about this problem being at the University level?

I think 2D kinematics will be sufficient, but hey, maybe that's just trying to build for an ideal world. I'll post this link in the other thread to make sure that people see it.

Dusk Star 13-01-2012 12:17

Re: Ball Trajectory Planning
 
My team was actually planning on having a camera track the target, direct the turret to that target, use a laser rangefinder to determine distance, and have the turret adjust velocity and angle to adjust for that range. So, yes, some teams were planning on being able to shoot from anywhere.

We want to be able to get balls in the vicinity of the hoops from our player station, across the field, and were planning on a 70fps+ muzzle velocity. does that seem fast enough to range 55'?

JamesBrown 13-01-2012 14:18

Re: Ball Trajectory Planning
 
With a intitial velocity os 12m/s teams were able to shoot at a higher target from half court in 2006 with a ball of similar density, 70f/s should get you the whole way across the field. Keep in mind it will not be easy to shoot that far accuratly, and the faster you shoot the more effect drag has on the ball.

GBilletdeaux930 13-01-2012 14:35

Re: Ball Trajectory Planning
 
If you do the math, at 45-degrees, neglecting drag and air resistance, you would need to be going about 40ft/s to shoot 50ft. Probably going to need a little more to hit that top hoop.

I really don't think the variable here is the drag though. You can calculate for that, sure. But after the first match, the majority of balls are going to be ripped, torn, and not appropriate for your calculations.

Keep the calculations simple, like everyone is saying. Going for a consistent shooter is the best you can really do. Doing the 2d physics is plenty because after that you are throwing in variables that are going to change after every match.


All times are GMT -5. The time now is 18:08.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi