Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Technical Discussion (http://www.chiefdelphi.com/forums/forumdisplay.php?f=22)
-   -   Calculating the trajectory and where the ball will land with a 2D image (http://www.chiefdelphi.com/forums/showthread.php?t=125695)

yash101 02-02-2014 15:45

Calculating the trajectory and where the ball will land with a 2D image
 
So this year, as you may have noticed (by my posts), I'm working on a uber-powerful vision tracking system. So I was thinking about how to create a driver-aid widget to find where the ball is, and where it will land. I will have a 2D image of the ball, but I can grab the third by either a PING or Trigonometry.

So here's my question:
So our shooter will most likely have 2 or three modes, a shoot, pass and toss mode, depending on which cylinders are fired. So, if I can get the exit velocity of each mode, and I can know what mode the shooter is in, how can I find out where the ball will land. I want to use trigonometry to do this, so I don't have to recalibrate the camera to look for a ball of a different size. How can I estimate where the ball will hit the ground.

Also, if a ball is tossed towards the robot, how can the robot automatically align itself by calculating the ball's trajectory?

My platform is OpenCV-2.4.8.0/Windows 8.1, under Visual Studio 2013.

Also, how do I find out the exit velocity of the ball from the shooter?

Steven Donow 02-02-2014 15:54

Re: Calculating the trajectory and where the ball will land with a 2D image
 
Quote:

Originally Posted by yash101 (Post 1336408)
So this year, as you may have noticed (by my posts), I'm working on a uber-powerful vision tracking system. So I was thinking about how to create a driver-aid widget to find where the ball is, and where it will land. I will have a 2D image of the ball, but I can grab the third by either a PING or Trigonometry.

So here's my question:
So our shooter will most likely have 2 or three modes, a shoot, pass and toss mode, depending on which cylinders are fired. So, if I can get the exit velocity of each mode, and I can know what mode the shooter is in, how can I find out where the ball will land. I want to use trigonometry to do this, so I don't have to recalibrate the camera to look for a ball of a different size. How can I estimate where the ball will hit the ground.

Also, if a ball is tossed towards the robot, how can the robot automatically align itself by calculating the ball's trajectory?

My platform is OpenCV-2.4.8.0/Windows 8.1, under Visual Studio 2013.

Also, how do I find out the exit velocity of the ball from the shooter?

In order to determine the exit velocity of the ball, we used this program(I'm pretty sure this is it) in order to calculate exit velocity and angle. We used 120 fps video from a GoPro, and then used this program which tracks the trajectory of the ball in order to determine the velocity.

yash101 02-02-2014 16:20

Re: Calculating the trajectory and where the ball will land with a 2D image
 
I'll look into trying it out. So what are the variables I need? Distance from cam, Cam ViewAngle? By the way, what is the ViewAngle of the standard lens in the Canon T2i?

Also, would finding the ball trajectory be requiring any calculus or trig? I haven't learned either yet, so I'll need to spend some time reading textbooks!

faust1706 02-02-2014 20:12

Re: Calculating the trajectory and where the ball will land with a 2D image
 
Already ahead of you ;) review your kinematic equations to calculate velocity of a ball. You have to measure the distance the ball moves between two frames, and then divide that by the time between the two frames. This gives you velocity in 3d space if you do it properly. You can do more physics calculations to find the heading of the ball, which will remain constant in the real world but will change if the camera moves.

To find time you calculate velocity in the up direction, and do d =vt +att. Where d is it's height in the air in the initial frame.

You then use time to calculate how far the ball will travel in the left right forward back plane. You also have to take into account the delay of the program calculations and the time is takes for thr crio to do its stuff.

We're going for autonomous ball catching only on rare occasions during competitions, like in practice matches.

Joe Ross 02-02-2014 20:46

Re: Calculating the trajectory and where the ball will land with a 2D image
 
Assuming your shooter is precise, and a flat field, it's very easy to mark where it will land. No math is required. Figuring out where an arbitrary ball will land is much harder.

yash101 02-02-2014 23:26

Re: Calculating the trajectory and where the ball will land with a 2D image
 
Thyme for some Physix!
:D :D :D :D :D
And the smileys are back!


All times are GMT -5. The time now is 17:27.

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