Dr. Gilbert Lai is a mentor for the FIRST Robotics team SWAT 771. He is helping an all girls team from grades 7-12 design a basketball-shooting robot for this year’s annual FIRST Robotics Competition. Dr. Lai is using MapleSim and Maple to help the team understand the principles involved and design their robot. This blog post is part of a series that chronicles the progress of the team. Posts in the series include:
The kick-off for this year's FIRST Robotics competition was held on January 7, 2012. The title for this year is Rebound Rumble. For those new to FIRST (For Inspiration and Recognition of Science and Technology), it is an annual event that lets high school student teams from around the world compete against each other in a game with robots that they build specifically to tackle the challenges posed to them by the organizer. This year's game, as suggested by the title, involves robots shooting basketballs to score points (among other things). The video below illustrates the Rebound Rumble game.
My involvement with FIRST is in the role of a mentor. My team is SWAT771, an all-girl team. This year is my second year with the team as mentor.
After watching the kick-off with my team, my first thought was this is really cool!!! Then, I thought, shooting a ball is intuitive enough that everyone knows how to do it: you aim the ball at the target (the hoop) and you throw it over. The ball will be travelling through the air in a curve before passing through the hoop (and score!). However, that is how I would have done it. What would be involved when I have to get the robot to do it?
Fortunately for us, the physics of shooting a ball is governed by a relatively well known concept called projectile motion. The mathematics for basic projectile motion is fairly straightforward and additional information is a quick internet search away (for example, http://en.wikipedia.org/wiki/Projectile motion). To summarize, the fundamental factors governing the trajectory of a projectile (that is, the ball) includes the following:
- Target Distance: The horizontal distance between the shooter (that is, the robot in this case) and the target (the hoop).
- Launch Angle: The angle at which the shooter is throwing the ball.
- Launch Speed: The speed at which the shooter is throwing the ball.
- Launch Height: The height of the shooter.
- Ball Mass: The mass of the ball.
- Target Height: The height of the target hoop.
For our case here, the target height of the hoop is predefined as per the game rules: there are three levels of hoops at 28 inches, 61 inches and 98 inches from the ground. So the final factor is given. Also, if we are ignoring air resistance (see this excellent blog on the justification for ignoring air resistance in this case), then the ball mass will not affect the ball trajectory (think of an object moving through a vacuum). This then narrows down to three factors to consider when programming our robot to shoot the ball (assuming the robot/shooter height is known as well).
At this point, rather than diving directly into the mathematics and doing all sorts of calculations to find the angles and speeds that we need to shoot the ball through the target hoop, I thought it would be nice to have a way to illustrate the relationships between these factors visually. The end result is this MapleSim model, which I had modified from a model that I had created previously for another blog post.
From the screenshot of the model, the aforementioned factors are defined as adjustable parameters (see the lower right portion of the window). This way, I can try out different combinations of the launch angles, launch speeds and distances away from the target to explore which ones would result in scoring and which ones would not.
Notice that this model is only a tool in checking the result. That is, you can use this tool to check the calculations to show that a particular combination of the parameters would result in scoring (or not). This model does not actually provide the solution for you (although, you could probably obtain a solution through trial-and-error with this model). The strategy for finding the optimal shooting angle and launch speed for a given target distance might vary, depending on what the criteria for optimal is. Here are a couple of example strategies in obtaining the desired shooting angle and speed:
So while this model provides a good first step in gaining insights into the underlying physics, this is, nonetheless, a simplified model. The model assumes the shooter is shooting the ball standing still. In the heat of the competition, wouldn't it be nice if the robot can shoot the ball while it is moving? Now, as an exercise, how would you modify this model to simulate a moving shooter?