Friday, April 22, 2011

Thursday, April 21, 2011

Future Work/Improvements

With more time to spend on this project, there are a few changes that we would make, in this order:

  1. Achieve a more consistent, further shot
  2. More, complex moving object path's to track
  3. Real-time user input to the system (via Arduino's serial input or Matlab)
  4. Implement Euler's method of integration to determine the next position of the moving object, using the object's current velocity and position (instead of looking at the moving object's trajectory equations as a whole)
  5. Implement feedback, potentially with vision sensors (which would play nicely with Euler's method of integration)
  6. Gradually reduce hardware errors (from sturdier bases and smoother cannons to more consistent ping pong balls)

How To Make Your Own Tracking Ping Pong Shooter

Using Newtonian mechanics you can solve for the trajectory of a projectile traveling at a given velocity and angle of elevation (theta). We neglect the affects of drag in our equations.

Now, imagine that you know the position of a target and its current velocity. In order to hit the object we must rewrite the Newtonian equations to solve for the desired theta and phi to hit a given location.

Even after rewriting the equations of motion you cannot simply point the cannon to the targets current location, fire and hope to hit it. A projectile travels at a given velocity along a trajectory, thus it takes time to reach its destination. If the target travels with any velocity at all, the projectile could reach its destination and find the target long gone.

Since we know the targets current position and velocity we can approximate a location t from where it is now. We calculate t by solving for the trajectory time at the targets current position and then multiply it by a factor K. In the future we will create an equation for K that will use the r distance and current velocity to approximate a minimum possible t firing solution from its current position. Once we calculate the t we calculate the next position using Euler’s method of integration.

Check to see if the new trajectory time is greater than or equal to the t. If the trajectory time is greater than t, we fire; if not, we must calculate another trajectory time further ahead and repeat the process.

We have now come up with the ability to find out where the moving object is, determine where the shooter needs to be, and choose the correct time to fire. We have the crucial pieces of information, and now must formulate the architecture of how to solve this problem.

The tracking and shooting simplifies to the following:

  1. Determine the current location of the object to be hit, as well as time it takes to hit the object at that point
  2. Calculate the future position where the shooter must move to (theta and phi) such that if the shooter were to fire at that position, the ball would hit the moving target as it passed
  3. Move to this position
  4. Calculate how much time it will take for a fired ball to reach where the moving object should be from the shooter’s new position, and confirm whether there is enough time to fire and hit it (time has passed since step 1 which is the reason we must check again)
  5. If the shooter has moved far enough ahead that it can hit the moving target once it passes, wait until the perfect time to launch the ball, and then launch. If there isn’t enough time, do not shoot. In either of these situations, finish by returning back to step 2

The following diagram illustrates this process:

Project Components

In order to do this project, we need:


-Microcontroller (we used the Arduino Duemilanove)


-2 Degree of Freedom Ping Pong Shooter with Actuator



-H-Bridge to power the actuator (Ours: http://www.pololu.com/catalog/product/755)




-Power Supply



-Object to fire at!

Project Objective

The purpose of this project is to take a simple, two degree of freedom ping pong shooter, track a moving object (in open loop), and hit it at a user specified time.

In order to accomplish this task, we will need the ability to:

-Have the shooter follow the path of the moving object
-Determine how long it would take to hit the object at various locations
-Move to a predicted location ahead of the object
-Fire the ping pong ball to hit the target accurately and on time

Tuesday, April 19, 2011

Answer for Exam Question

When reading the answers below, keep in mind that Theta1 corresponds to the rotation of the base. In our explanations of the system, we denoted this rotation as phi. Theta2 is the rotation of the cylinder which is noted as Theta in the explanations.

Also, note that frame one is fixed to the base at the center of mass, while frame two is fixed to the cylinder at the joint.
e















Question for the Final Exam






Our Toy Robot has a low mass and uses servo motor actuators. Therefore, there is no need for any dynamical equations while going from one configuration to another.



Now consider a much heavier robot with the same basic mechanism. Take the Autocannon above for example. If we're using torque control for driving the motors, we're gonna have to derive the dynamical equations governing the movement of the robot. Derive the Equations of motion for this robot in Joint Space.