SlideShare a Scribd company logo
1 of 41
Download to read offline
Name: _________________________________
Date: _________________________________
Instructor: ______________________________
Introduction to Robotics
Basic Robotic Movement
Instructor: Mr. Kopec
Agenda
Week B6
MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY
11/16/09 11/17/09 11/18/09 11/19/09 11/20/09
Period
1
Introduction of
packet to
students.
Discussion of
Friday
Examination
will also be
indicated.
Collect and go
over homework
from previous
day. Lecture:
Pythagorean
Theorem,
relationship
between
robotic motion
and finding
shortest
trajectory.
Collect and go
over homework
from previous
day. Discussion
of gear ratios via
Vex Curriculum
2.0.
Collect and go
over homework
from previous
day. Continue
with Trajectory
lab from
previous day.
Examination via
packet.
2
Lecture:
Measures of
angles, solving
simple
equations.
Lecture:
Simple right
angle
trigonometry
with special
attention on
inverse trig
relationships.
Introductory
discussion on
Torque vs Speed.
Which allows for
more precision in
movement?
Students begin
modifications on
SquareBot 2.0
via changing gear
system.
When students
complete
PROBLEM, then
move onto
sample test
course.
ISSUE: Your
rover is on
Mars and needs
to analyze an
ice sample for
proteins.
However there
are many
obstacles in
your way. Plot
a course, write
pseudo code
and compile
your source
code to move
your rover from
its original
position to the
ice sample.
Examination via
packet.
3
Construct
SquareBot 2.0
via Vex
Curriculum 2.0.
Lecture:
Simple right
angle
trigonometry
with special
attention on
inverse trig
relationships.
Continue
modifications on
SquareBot 2.0.
Begin generating
linear and
rotational speed
[lab]. Linear
regressions are
discussed.
Time allotted
for ISSUE.
Examination via
packet.
LUNCH LUNCH LUNCH LUNCH LUNCH LUNCH
4
IF SquareBot
2.0 is
completed in
each group,
THEN move to
Programming
basics - finding
pseudo code.
Relationship
between
distance and
time, speed,
will be
discussed, via
packet. Begin
Lab write-up,
incrementally
expand
throught the
week.
Linear
regression of
data via Excel.
Finding motor
power levels to
produce straight
movement.
Time allotted
for ISSUE.
Examination via
packet.
5 Prep Prep Prep Prep Prep
6 Duty Duty Duty Duty Duty
7
Writing
Exercise:
Logical pattern
organization via
incremental
steps.
Generating
pseudo code
from a story.
Generation of
Source Code
for RobotC.
Motor
commands for
movement
discussed.
Special
attention to
video [packet]
so that
students can be
reminded of
motor
commands at
any time they
are near a
computer.
Produce motor
power levels to
produce straight
trajectory lab.
Time allotted
for ISSUE.
Presentation of
student work
via Q&A
session.
8
Reiterate a
succinct period
2. Special
attention to
struggling
students. HW:
Write a short
story about
WallE avoiding
obstacles.
Summarize and
complete
overall picture
of how time
affects robotic
movements.
HW: Finish
Problems pg
12,13 [packet].
PROBLEM:
Robot moves,
F10in; R45-deg
cw; F17in; R30-
deg ccw; F20in.
This will be
diagramed on
board for
students to
generate pseudo
code, then
source code and
finally input into
RobotC. HW:
Problems pg
Write-up
ISSUE,
including
SquareBot
construction,
linear and
rotational
speeds, gear
ratio and all
data plus a
discussion and
question
section.
Presentation of
student work
via Q&A
session. Clean-
up.
35,36,37.
Frameworks:
Robotics & Automation:
2.C Demonstrate skills in problem solving, diagnostics, and troubleshooting.
2.C.01c Identify the components and process of the system(equipment) .
2.C.02c Identify the problem or source of the problem..
2.C.03c Develop solutions using a structured problem solving process.
2.C.04c Use appropriate testing equipment and tools for diagnosing the problem.
2.C.05c Implement the correct strategies to remedy the problem.
2.D Maintain equipment and machinery.
2.D.01c Identify appropriate person(s) for maintained and repair of equipment.
2.D.02c Monitor equipment indicators to insure that it is operating correctly.
2.D.03c Demonstrate ability to maintain equipment.
2.V Identify and Categorize Varying Types of Robotic Manipulators, Power
Supplies and Controllers.
2.V.02 Determine the work envelop of a robot.
2.V.05 Given a robotic Workcell, identify and explain the robot’s power supply
and controller.
2.V.06 Identify the path of a given robot.
2.Y Utilize Electronic Motors and Mechanical Drives as Part of an Automated
Process.
2.Y.05 Determine the gear ratio for a transmission and the torque output of a
motor.
2.FF Apply Limit Sensors/Switches to an Automated Process.
2.FF.01 Identify the parts of a limit switch.
2.QQ Apply Principles of Engineering Systems.
2.QQ.01 Apply simple machines to create mechanical systems in the solution of a
design problem.
2.XX Write a Program.
2.XX.01 Identify the function types and explain their applications.
2.XX.02 Describe how statements are incorporated into the functions, and
demonstrate proper use of a statement dialogue box.
2.XX.03 Outline and demonstrate debugging techniques for a function.
2.YY Use Variables and Data Types.
2.YY.01 Identify and explain the various types of variables used.
Mathematics:
Geometry:
7.G.5 - Use a ruler, protractor, and compass to draw polygons and circles.
10.G.2 - Draw congruent and similar figures using a compass, straightedge, protractor,
and other tools such as computer software. Make conjectures about methods of
construction. Justify the conjectures by logical arguments.
10.G.5 - Apply properties of angles, parallel lines, arcs, radii, chords, tangents, and
secants to solve problems.
10.G.8 - Find linear equations that represent lines either perpendicular or parallel to a
given line and through a point, e.g., by using the "point-slope" form of the equation.
Patterns, Relations & Algebra:
7.P.4 - Solve linear equations using tables, graphs, models, and algebraic methods.
7.P.6 - Use linear equations to model and analyze problems involving proportional
relationships. Use technology as appropriate.
10.P.5 - Find solutions to quadratic equations (with real roots) by factoring, completing
the square, or using the quadratic formula. Demonstrate an understanding of the
equivalence of the methods.
10.P.8 - Solve everyday problems that can be modeled using systems of linear equations
or inequalities. Apply algebraic and graphical methods to the solution. Use technology
when appropriate. Include mixture, rate, and work problems.
12.P.8 - Solve a variety of equations and inequalities using algebraic, graphical, and
numerical methods, including the quadratic formula; use technology where appropriate.
Include polynomial, exponential, logarithmic, and trigonometric functions; expressions
involving absolute values; trigonometric relations; and simple rational expressions.
Measurement:
12.M.2 - Use dimensional analysis for unit conversion and to confirm that expressions
and equations make sense.
12.M.1 - Describe the relationship between degree and radian measures, and use radian
measure in the solution of problems, in particular, problems involving angular velocity
and acceleration.
Physical Sciences (Chemistry & Physics) HS:
Physics:
1. Motion and Forces
Central Concept: Newton’s laws of motion and gravitation describe and predict the
motion of most objects.
1.1 Compare and contrast vector quantities (e.g., displacement, velocity, acceleration
force, linear momentum) and scalar quantities (e.g., distance, speed, energy, mass, work).
1.2 Distinguish between displacement, distance, velocity, speed, and acceleration. Solve
problems involving displacement, distance, velocity, speed, and constant acceleration.
1.3 Create and interpret graphs of 1-dimensional motion, such as position vs. time,
distance vs. time, speed vs. time, velocity vs. time, and acceleration vs. time where
acceleration is constant.
Scientific Inquiry Skills:
SIS1. Make observations, raise questions, and formulate hypotheses.
• Observe the world from a scientific perspective.
• Pose questions and form hypotheses based on personal observations, scientific articles,
experiments, and knowledge.
• Read, interpret, and examine the credibility and validity of scientific claims in different
sources of information, such as scientific articles, advertisements, or media stories.
SIS2. Design and conduct scientific investigations.
• Articulate and explain the major concepts being investigated and the purpose of an
investigation.
• Select required materials, equipment, and conditions for conducting an experiment.
• Identify independent and dependent variables.
• Write procedures that are clear and replicable.
• Employ appropriate methods for accurately and consistently
o making observations
o making and recording measurements at appropriate levels of precision
o collecting data or evidence in an organized way
• Properly use instruments, equipment, and materials (e.g., scales, probeware, meter
sticks, microscopes, computers) including set-up, calibration (if required), technique,
maintenance, and storage.
• Follow safety guidelines.
SIS3. Analyze and interpret results of scientific investigations.
• Present relationships between and among variables in appropriate forms.
o Represent data and relationships between and among variables in charts and graphs.
o Use appropriate technology (e.g., graphing software) and other tools.
• Use mathematical operations to analyze and interpret data results.
• Assess the reliability of data and identify reasons for inconsistent results, such as
sources of error or uncontrolled conditions.
• Use results of an experiment to develop a conclusion to an investigation that addresses
the initial questions and supports or refutes the stated hypothesis.
• State questions raised by an experiment that may require further investigation.
SIS4. Communicate and apply the results of scientific investigations.
• Develop descriptions of and explanations for scientific concepts that were a focus of
one or more investigations.
• Explain diagrams and charts that represent relationships of variables.
• Construct a reasoned argument and respond appropriately to critical comments and
questions.
• Use language and vocabulary appropriately, speak clearly and logically, and use
appropriate technology (e.g., presentation software) and other tools to present findings.
• Use and refine scientific models that simulate physical processes or phenomena.
Technology/Engineering HS:
1.1 Identify and explain the steps of the engineering design process: identify the problem,
research the problem, develop possible solutions, select the best possible solution(s),
construct prototypes and/or models, test and evaluate, communicate the solutions, and
redesign.
6.3 Explain how the various components (source, encoder, transmitter, receiver, decoder,
destination, storage, and retrieval) and processes of a communication system function.
Topics:
Squarebot construction, robotic movement, gear ratios, programming robotic movement
[RobotC], unit circle, right angle trig, vectors, solving trigonometric as well as algebraic
equations, basic report writing and presentation.
Lecture & Discussion:
Discuss how time is calculated via angles by using a non-digital clock [Analog Clock].
Draw a clock on the board and indicate a specific time on the board. Have students
indicate the time verbally.
Draw two circles and make one a clock, [circle A] and the other [circle B] place a
Cartesian coordinate system on it.
If circle A indicates 2:20, then circle B would have:
Know: 360-degs in a circle
12 hours in 1/2 day
60 minutes in an hour
Want: The measure of the angle between the hour and minute hands on a
standard non-digital clock.
Since there are 12 hours in a day, we must uncover how much each hour is worth.
360-degs/12hrs = 30-degs/hr
If each hour is worth a value of 30-degs, then (a) how many degrees away
is the hour hand [2 o’clock] from noon? (b) How many degrees away is
the minute hand away from noon? (c) What is the measure of the angle
made at 2:20pm?
(a) 2 hours away from noon indicates 2, 30-deg angles therefore
indicating 60-degs.
2(30-degs) = 60-degs
(b) If we have 60 minutes in an hour, then how many degrees does each
minute represent on the clock?
Since there are 360-degs in 1hr and 1hr represents 60 minutes, then we
can see that this statement is true:
360-degs/60 min = 6-degs/min
Since 6-degs represents a minute then it is clear to see that in 20
minutes we have 120-degs away from noon:
20min x (6-degs/min) = 120-degs
(c) We have 2 angles we know and one we want to find therefore:
Know: 2 o’clock represents 60-degrees clockwise from noon
20 minutes represents 120-degrees away from noon
Want: The measure of the angle made between 2 o’clock and 20 minutes
relative to noon.
Since theta1 + theta2 = theta(total), then theta(total) – theta1 =
theta 2, or 120-degs – 60-degs = 60-degs.
We now know that the measure of the angle made at 2:20 is 60-
degs!
*Students worksheet calculating the measure of the angle made at a certain time.
Name: _________________________________
Date: _________________________________
Points Earned = _______
Total Points = __15___
1)
2)
3) 8:15pm
4) 5:13am
5) 7:20am
Robotic movement is essentially thinking about time. Think clock on top of robot. If
you want to move relative to your position, then you should always operate at a certain
distance at a certain number of degrees relative to time.
Here we have a robot moving forward; we can essentially place a clock on top and give
direction via angles. Remember SohCahToa and remember the Pythagorean Theorem?
We are always going to call forward, 0-degs even if it looks as if it should be 90-degs in
the picture above. You will know which direction is forward by identifying the arrow
located on the diagram. Therefore, how many degrees should we be thinking about when
looking at the picture above on the right? _________-degs.
Now let’s begin moving a robot from one position to another.
Move a robot forward 2 meters and the turn 90-degs clockwise and them move
0.5 meters.
The picture we have looks like this:
or
Can you calculate the value for R, the resultant, in the picture above, if
you know that c2
= a2
+ b2
, or that the square of the hypotenuse is the SDT
as the sum of the squares of both legs of the triangle.
Work out the problem in the space provided below:
Answer: ________________________________________
Now look at this exact problem in another way in order to check our
calculations.
Our problem looks like this:
Find the measure of the angle made between AR, if A = 2 meters,
B = 0.5 meters and R = 2.062 meters.
Let us revisit our old friends, the generals … SohCahToa!
G1: SIN(angle) = (OP/HYP)
G2: COS(angle) = (ADJ/HYP)
G3: TAN(angle) = (OP/ADJ)
Remember that the Generals help us uncover sides of triangles.
But we want to uncover the angle made between AR, so we must
learn another item that may help us out.
What is the ONE thing we should always be thinking about when
we are thinking about mathematics?
Answer: _______________________________________
So we know that SohCahToa helps us uncover sides of a triangle
so there must be something that is opposite to SohCahToa,
shouldn’t there be to uncover angles?
We now discuss the OPPOSITE of the Generals! The inverse
Generals!
For now, we will use this notation for the OPPOSITE or the
INVERSE of the Generals:
SIN-1
(SIN FUNCTION)
COS-1
(COS FUNCTION)
TAN-1
(TAN FUNCTION)
The negative 1 represents the OPPOSITE of the General! We will
discuss this in more detail when we build our first manipulator
later on in the year.
Remember our problem looks like this:
Find the measure of the angle made between AR, if A = 2 meters,
B = 0.5 meters and R = 2.062 meters.
Know: A = 2m
B = 0.5m
R = 2.062m  Careful this value was calculated and rounded, this might
cause derivations in our future calculations.
SohCahToa
Want: angle b
Since R was found through a calculation it is wise not to use it to uncover
our unknown angle. The reason was mentioned in the Know category,
please see above.
Let us use A = 2m and B = 0.5m since this was originally given in the
problem.
Remember circle the sides of the triangle we know and look to the
Generals for which one you need to use in order to solve the problem.
In this case we use G3 since we have both OP and ADJ relative to the
angle in question, angle b.
G3: The TANGENT function
TAN(angle b) = (0.5m/2m)
But we do not know the angle! How can we find this? We use the
INVERSE Generals [Inverse Trig functions]. If we do something
to one side of an equation we must do it to the other side to keep it
balanced. If you have a balance that is centered and add 20lbs to
one side, then that side goes down a bit. The solution to making it
balanced again is to add 20lbs on the OTHER side, therefore
making both sides the SAME!
In this case we have the following:
TAN(angle b) = (0.5m/2m)
But since we do not know the angle we must use the OPPOSITE of
the TANGENT function in order to find our angle. Here is how it
looks:
TAN-1
(TAN(angle b)) = (0.5m/2m)  this looks weird,
unbalanced!
TAN-1
(TAN(angle b)) = TAN-1
(0.5m/2m)  this is correct since
we are taking the
OPPOSITE
[INVERSE] of the
General on BOTH
SIDES, therefore
keeping it
BALANCED!
Therefore:
angle b = TAN-1
(0.5m/2m)
or
angle b = 14.04-degs!
The reason behind why we use the INVERSE TAN function is to
give us an angle!!! It is the SDT as the pirate problem we
discussed during exploratory.
Remember the pirate ship?
S = Ship, represents start position
T = Treasure, represents end position
Pirate buries treasure four steps away from his ship.
S + 4 = T
Pirate needs to get back to ship.
T – 4 = S
Didn’t the OPPOSITE (inverse) OPERATION get us back to
where we began? This is why this works. Remember when we
think mathematics we think opposites.
Now we can start to check our solution of R = 2.062m!
If we have A = 2m and angle b = 14.04-degs, then (a) find B, (b) find R.
If we find that B is close to 0.5 meters then we know we have a correct
triangle! Therefore we know that the robot’s path [trajectory] can safely
be deployed.
Know: SohCahToa
A = 2m = ADJ
ANGLE B = 14.04-degs  Here we use the calculated value to check our
original solution.
Want: (a) Find B  OP
(b) Find R  HYP
(a) Use SohCahToa to uncover side B [OP].
TAN(14.04-degs) = (B/2m)
2m[TAN(14.04-degs)] = B
0.500 = B  looks like it checks, but let’s be sure.
(b) Use SohCahToa to uncover side R [HYP].
COS(14.04-degs) = (2/R)
R[COS(14.04-degs)] = 2
R = (2/COS(14.04-degs))
R = 2.062-degs!  Looks like our check WORKS!!!
Recap: We discussed movement and time relative to circles and triangles. We used
Analog clocks [non-digital] in order to start [uncover angles] which lead to
Pythagorean Theorem to solve and finally our Generals [Trig functions and
Inverse Trig functions] to check our solution.
Name: _________________________________
Date: _________________________________
Points Earned = _______
Total Points = __45___
Find the missing side of the triangle in each of the following, please BOX your
ANSWER. Remember to place BOTH, Know and Want categories for each problem.
1)
2)
3)
4)
5)
6) Find the angle b in each of the problems 1 – 5.
(a) ANGLE b in question 1
(b) ANGLE b in question 2
(c) ANGLE b in question 3
(d) ANGLE b in question 4
(e) ANGLE b in question 5
7) Check all solutions by using the following:
(a) Use 6(a) and Side A (3m) to justify your solution to question 1.
(b) Use 6(b) and Side B (3m) to justify your solution to question 2.
(c) Use 6(c) and Side R (6m) to justify your solution to question 3.
(d) Use 6(d) and Side A (131.25m) to justify your solution to question 4.
(e) Use 6(e) and Side R (27.5m) to justify your solution to questions 5.
Now let us discuss the summation of these robotic movements in sequential movements.
Without covering vectors yet, (we will discuss in detail at a later date) we are going to
start summation of these movements.
What if we had a robot that needed sequential movements to move around an obstacle?
We loosely observed this during our exploratory day and now we are going to take it to
the next level. We are going to move a robot around an obstacle without making a big
triangle, [larger triangle means more derivations, therefore it is better for the robot to
move in smaller distances. In other words, it makes more sense to get the robot to a
specific area, then rotate a certain number of degrees, multiple times in order to get to
your primary destination than to make one gigantic triangle that might cause errors in
order to get to your primary destination, however we can do certain checks in order to
fully understand our destination relative to our original position in space-time, start
position.
The basic idea is to get the robot close to the obstacle then rotate 90-degrees cw, move a
certain distance then rotate 90-degs ccw, move a certain distance forward, rotate 90-deg
ccw forward a certain distance and then rotate 90-degs cw a certain distance (ending up
on the original line from start to end) and finally moving forward to the ending position,
on the original line.
In other words, in fact it would look like this:
It is easy to see that we can move around our object using right triangles but we
might have massive errors if the motors do not rotate at the same speed, (this is
frequently true) so it is easier to get to your end point if you move close to the
object then move around it and then back on the same line (HYP) in order to get
to your final destination.
What did we just do to the position of the robot?
The final look for our problem would look like this without any values.
Picture is a representation of robot movement; it may not be the EXACT picture that
students decide to use for programming.
So we need to talk about angles and about current to the DC motors supplied via VEX*,
in order to discuss movement. Let us mainly focus on the trajectory of the robot and
discuss motors at a later date, [TBA].
We need to make special note that we do not yet know the velocity of our robot so
specific vector movement must be addressed.
Remember the Cartesian coordinate system, y’s represent vertical displacements while
x’s represent horizontal displacements relative to the zero position or to origin.
Let us say that the distance the robot needs to travel is 10m and the obstacle is centered at
5m with a radius on 0.5m. Therefore we know that the diameter is 1m. Since the
obstacle is centered on 5m then it is safe to say that the obstacle is 5m +- 0.5m; or one
side of the obstacle is at 4.5m and the other is at 5.5m. Can you find a suitable path for
the robot to travel in order to end up at the destination?
Work out a solution to the problem; make sure to diagram your answer. If you get lost,
remember all you are looking at is start and end and how WOULD you get there.
After giving 15 minutes check on student progress and work out problem with students.
Here is the solution we did in class:
***Educational Use & Taken from: Vex Curriculum 2.0
***Educational Use & Taken from: Vex Curriculum 2.0
Now we must discuss how does speed work? Speed is a ratio of a certain distance per
unit of time. In other words it should look like this:
Speed = (Distance/Time)
We typically see this as miles per hour or miles/hour in a car. In our robots we will be
discussing meters/second.
Have students in each group draw out at least a one meter track in order to establish
speed. If we have a stopwatch and we know the distance the robot travels within that
time, then we have produced a speed!
S = D/T; where S = speed, D = Distance and T = time
Once we have established the speed of the robot then we may be able to indicate direction
as a resultant of the speed of the robot in relation to its positional angle for movement.
If we have a 1 meter track and the time the robot takes to complete straight 1
meter track is 1.6 seconds then what it its speed?
Know: 1 meter track = distance
1.6 seconds = time for completion
Want: Speed (m/s)
Since S = D/T, where D = 1m and T = 1.6 seconds, then,
S = D/T
S = 1m/1.6 seconds
S = 0.625 m/s
Now we know that in EVERY second we should obtain a distance of 0.625 meters.
So, if we double that time we should get the robot to move 1.25 meters.
If we take half the time then we should go 0.3125 meters.
We have set up a constant ratio of distance per unit of time! We should be able to figure
out how long to turn the motors on, in order to accomplish our goals. In other words,
how long do we supply the motors with current in order to achieve our goal, a change is a
certain position.
Name: _________________________________
Date: _________________________________
Points Earned = _______
Total Points = __50___
Find the speed for each of the following, please BOX your answer:
1) A robot moves forward 30 meters in a time interval of 5 seconds.
2) A robot moves forward 2 meters in a time interval of 5 seconds.
3) A robot moves forward 15.3 meters in a time interval of 3 seconds.
4) A robot moves forward 12 and a quarter meters in a time interval of
11.3 seconds.
5) A robot moves forward fifteen and a third meters in a time interval of
eleven and two-thirds seconds.
Find the distance traveled for each of the following, please BOX your answer:
6) A robot has a speed of 0.5m/s and the motors are turned on for 2
seconds.
7) A robot has a speed of 3.2m/s and the motors are turned on for 4.7
seconds.
8) A robot has a speed of 6.1m/s and the motors are turned on for 3.54
seconds.
9) A robot has a speed of twenty meters per second and the motors are
turned on for sixteen and a quarter seconds.
10) A robot has a speed of twelve meters per second and the motors are
turned on for four hundred and thirteen seconds.
Speed is an item that we call a SCALAR or SCALAR Quantity. This means it has a
magnitude but no direction. A magnitude can be considered at this time as any unit of
measure containing no direction or nonspecific direction.
We are now going to discuss something called VELOCITY. Velocity is simply speed, [a
magnitude unit] with a given direction. We call a magnitude with a specific direction a
VECTOR. Vectors are one of the most important items to consider when moving robots
or robotic components! We are going to use vectors in order to set-up our program to
move our robot! Let’s see how we can accomplish this task.
We want to move a robot ccw, 30-degs WRT* forward a distance of 6 meters and then
move cw, 45-degs WRT forward, 5 meters. If the speed of the robot is 0.6 m/s then find
(a) the time for the motors to run in order to achieve the distance wanted for the first
movement. (b) the time for the motors to run in order to achieve the distance wanted for
the second movement. (c) the shortest distance and time for motor operation to complete
starting point to ending point.
Know: Speed of the robot is 0.6 m/s
30-degs ccw WRT forward a distance of 6 meters
45-degs cw WRT forward a distance of 5 meters
Want: (a) time to turn motors on to achieve 30-degs ccw WRT forward a
distance of 6 meters
(b) time to turn motors on to achieve 45-degs cw WRT forward a
distance of 5 meters
*(c) the shortest distance and time for motor operation to complete starting
point to ending point, if the original angle was made.
(a) time to turn motors on to achieve 30-degs cw WRT forward a
distance of 6 meters
Since the robot’s speed is 0.6m/s it will be easy to uncover the
amount of time to turn on the motors. First we should draw out the
total problem so we can better visualize the problem.
Break this picture up into the two parts (a) and (b), but focus only
on (a). Take a look:
Since we know that the robot has a speed of 0.6m/s, then it is easy
to see that:
6m x (1s/0.6m) = 10s
Therefore we must turn the motors on for 10 seconds in order to
achieve our distance of 6 meters. We have an issue on how we
achieve the 30-deg angle, we will discuss this momentarily.
(b) Since the robot’s speed is 0.6m/s it will be easy to uncover the
amount of time to turn on the motors. First we should draw out the
problem so we can better visualize the problem.
Since we know that the robot has a speed of 0.6m/s, then it is easy
to see that:
5m x (1s/0.6m) = 5m/0.6s = 8.333s
Therefore we must turn the motors on for 8.333 seconds in order to
achieve our distance of 5 meters. We have an issue on how we
achieve the cw 45-deg angle, we will discuss this momentarily.
We now have two functions describing movement but no specific
direction. Since we are using our basic Squarebot design which
has two motors operating in operate rotations we must uncover the
amount of time to designate to each motor to achieve our desired
angles. In other words, we must find the amount of time to turn on
motors in order to obtain a certain degree.
Remember the Vex motor operates at -127 to 127, where the
negative means full power reverse where the positive means full
power forward. Zero means the motor is off and the robot will not
move.
Let us go back to our analog clock. We can base all of our
calculations on this idea.
Using your Squarebot, set the robot to do a point-turn, that is one motor
running full forward, while the other is full reverse. The robot will begin
making a circle. Since a circle has 360-degs, it should be easy to find the
amount of time for the robot to make a complete circle, therefore, you
know the amount of time to complete 360-degs! Find the amount of time
to achieve 30-degs.
(360-degs/time for circle completion) = 30-degs/t2
Or
t2 = 30-degs/(360-degs/time for circle completion)
The same proportion can be set-up to achieve the 45-deg angle made. The
only difference is that the motors operate opposite of the ccw rotation in
the first example. In other words, if motor[port2] = 127 and motor[port3]
= -127, then the opposite would be, motor[port2] = -127 and motor[port3]
= 127 at a specific amount of time.
In the space provided below indicate how long to turn on the motors on
your Squarebot to achieve (a) 30-degs and (b) 45-degs.
(a)
(b)
Now put together the 4 functions we will need to solve our problem as
stated above.
The first function represents the 30-deg angle ccw to forward.
ANS: ___________________
The second function indicates we must turn the motors on for 10
seconds in order to achieve our distance of 6 meters.
The third function represents the 45-deg angle cw to forward.
ANS: ___________________
The fourth function represents that we must turn the motors on for
8.333 seconds in order to achieve our distance of 5 meters.
You have just begun to write your pseudocode! A pseudocode is a
beginning picture of your program in order to correctly write it into
your compiler, [RobotC].
Let us take a closer look at vectors and writing pseudocode & source code.
Overview Site for Programming Movement via RobotC
http://www.education.rec.ri.cmu.edu/roboticscurriculum/vex_online/programming/robotc
/movement.html
Video on Basic Movement via RobotC
http://www.education.rec.ri.cmu.edu/roboticscurriculum/vex_online/programming/robotc
/movement/moving_forward/videos/dissection.html
If your Squarebot has a speed of _______m/s and its path is as follows:
Forward 2m, 30-degs ccw WRT original position
Forward 4m, 45-degs cw WRT secondary position
Forward 3.2m, 0-degs WRT third position
We do not know the speed! Have teams find their Squarebot’s speed via speed tests.
This problem we will work out in class. Please place the work in the space provided
below.
What are the items YOU need to find in order to accomplish this task?
1) Make sure you draw out the problem using head-tail method
for vectors [discussion in class].
2) Have your robot run two speed tests.
i. Distance per time
ii. Rotation per time
3) Write pseudocode.
4) Write out source code [code input into RobotC] on paper.
5) Write out source code [code input into RobotC] in RobotC.
6) Download firmware onto robot
7) Compile and Download program into the microcontroller
[brain] of the robot.
8) Test program and measure the distance traveled at specific
direction to have ACTUAL and THEORETICAL RESULTS.
A Basic Report should look like the following:
Name: _____________________________
Date: _____________________________
Teammates: _________________________
Abstract:
Subject: Basic continuous robot movement based on vectors. Programming the
robot to carry out a specified path. Measuring actual travel to identify
actual and theoretical results.
Problem: The robot is presented with a change in position. Find the program to
carry out path within a certain error.
Items used: Vex hardware, Vex microcontroller, Vex radio transmitter, RobotC, meter
stick, stopwatch, lab notebook.
Path for travel:
Forward 2m, 30-degs ccw WRT original position
Forward 4m, 45-degs cw WRT secondary position
Forward 3.2m, 0-degs WRT third position
Procedure:
Results:
Conclusion and Discussion:
It is imperative to establish a means to organizing data so it is clear to others viewing that
data. Here we will discuss Excel and how it can help us perform calculations. Notice
that there are no notes given in this area. Here we assess the ability of the student to
observe and take notes. Please write YOUR own notes in the space provided below.
Excel Notes:
Now that we have discussed Excel and inputting operations and functions such as our trig
functions we can now discuss how we present material for others to understand what and
why we carried out this study. In the following section we will be discussing PowerPoint
and how to create a basic presentation in order to present material to others. As in the
previous section, students will take notes on subject and scored in order to assess note-
taking abilities.
PowerPoint Notes:
Your mission is to find a way for your robot to move from the room to a specified
position in the hallway. You will have to avoid obstacles along the way. You must find
path and program that path into the microcontroller so that the robot can complete its
mission. You may use any item in the Vex arsenal in order to accomplish this task. The
team that does it in the best time wins a special surprise that will be announced at the end
of the mission. You MUST write a report [in Word] and present your findings to me in
the form of a PowerPoint presentation in order to receive a grade for the mission. Are
you brave enough to take on this challenge? I know you are, so let’s get started!
[Rubric to be given at time of presentation]
Lab & General Question Section
1) Write a procedure on how you program a robot to move around an object from
start to a finished product. [20 points]
[Each question 2 – 12 is worth 5 points.]
2) What do you write in order to make your robot to go forward in RobotC?
3) What is the code you would write into RobotC?
4) What is the first line of code that must be input into RobotC?
5) How does SOHCAHTOA aid us in moving our robot?
6) What does SOHCAHTOA mean?
7) What are the opposite functions to SOHCAHTOA?
8) What is linear speed?
9) What is rotational speed?
10) How can we use linear and rotational speed in order to calculate amount of time
to input into robot?
11) How can you adjust the motor speed in RobotC?
12) Why would you adjust the motor speed in RobotC?
In Questions 13 – 18 assume that motor[port2] = -127 and motor[port3] = 127 is
clockwise(cw); SPEEDrotational = 10.5-degs/sec; SPEEDrotational = 112-degs/sec;
SPEEDlinear = 0.6m/sec; SPEEDlinear = 17.2in/sec. [10 points each]
13) What is the pseudo code to make your robot move 3m forward, turn 50-degs ccw
and then forward 1.3m?
14) What is the source code to make your robot move 3m forward, turn 50-degs ccw
and then forward 1.3m?
15) What is the pseudo code to make your robot move 1.23m forward, turn 130-degs
cw and then forward 1.5m?
16) What is the source code to make your robot move 1.23m forward, turn 130-degs
cw and then forward 1.5m?
17) What is the pseudo code to make your robot move 14in forward, turn 30-degs cw
and then forward 17.3in?
18) What is the source code to make your robot move 14in forward, turn 30-degs cw
and then forward 17.3in?

More Related Content

What's hot

What's hot (6)

Fem
FemFem
Fem
 
Introduction to Finite Element Method
Introduction to Finite Element Method Introduction to Finite Element Method
Introduction to Finite Element Method
 
Aieee
AieeeAieee
Aieee
 
Lecture 13 modeling_errors_and_accuracy
Lecture 13 modeling_errors_and_accuracyLecture 13 modeling_errors_and_accuracy
Lecture 13 modeling_errors_and_accuracy
 
Introduction of Finite Element Analysis
Introduction of Finite Element AnalysisIntroduction of Finite Element Analysis
Introduction of Finite Element Analysis
 
Finete Element
Finete ElementFinete Element
Finete Element
 

Similar to Robotics exploatory plans week 1

Homework 21. Complete Chapter 3, Problem #1 under Project.docx
Homework 21. Complete Chapter 3, Problem #1 under Project.docxHomework 21. Complete Chapter 3, Problem #1 under Project.docx
Homework 21. Complete Chapter 3, Problem #1 under Project.docxadampcarr67227
 
Contoh rpt fizik tingkatan 4
Contoh rpt fizik tingkatan 4Contoh rpt fizik tingkatan 4
Contoh rpt fizik tingkatan 4lizsuhaimi
 
Fourth Class Power Engineering Objectives
Fourth Class Power Engineering ObjectivesFourth Class Power Engineering Objectives
Fourth Class Power Engineering ObjectivesSteven Bitschy
 
Building Pre-algebra Skills through Project Based Learning
Building Pre-algebra Skills through Project Based LearningBuilding Pre-algebra Skills through Project Based Learning
Building Pre-algebra Skills through Project Based Learningccpc
 
Assignment 1 - Application of Numerical Analysis.pdf
Assignment 1 - Application of Numerical Analysis.pdfAssignment 1 - Application of Numerical Analysis.pdf
Assignment 1 - Application of Numerical Analysis.pdfSafeen Yaseen Ja'far
 
Industrial Engineering Subjects
Industrial Engineering SubjectsIndustrial Engineering Subjects
Industrial Engineering Subjectsomar ayeah
 
Physics examination techniques
Physics examination techniquesPhysics examination techniques
Physics examination techniquesomosa elijah
 
Data Science and Machine learning-Lect01.pdf
Data Science and Machine learning-Lect01.pdfData Science and Machine learning-Lect01.pdf
Data Science and Machine learning-Lect01.pdfRAJVEERKUMAR41
 
Mattie Davis Solving equations using algebra tiles edci 557
Mattie Davis Solving equations using algebra tiles edci 557Mattie Davis Solving equations using algebra tiles edci 557
Mattie Davis Solving equations using algebra tiles edci 557mattie85
 
AllSem23.pdf
AllSem23.pdfAllSem23.pdf
AllSem23.pdfBhimRoy1
 
Artifact3 allen
Artifact3 allenArtifact3 allen
Artifact3 allenallent07
 

Similar to Robotics exploatory plans week 1 (20)

Homework 21. Complete Chapter 3, Problem #1 under Project.docx
Homework 21. Complete Chapter 3, Problem #1 under Project.docxHomework 21. Complete Chapter 3, Problem #1 under Project.docx
Homework 21. Complete Chapter 3, Problem #1 under Project.docx
 
Contoh rpt fizik tingkatan 4
Contoh rpt fizik tingkatan 4Contoh rpt fizik tingkatan 4
Contoh rpt fizik tingkatan 4
 
Fourth Class Power Engineering Objectives
Fourth Class Power Engineering ObjectivesFourth Class Power Engineering Objectives
Fourth Class Power Engineering Objectives
 
Numerical Project.pptx
Numerical Project.pptxNumerical Project.pptx
Numerical Project.pptx
 
Trig Unit Plan.doc
Trig Unit Plan.docTrig Unit Plan.doc
Trig Unit Plan.doc
 
Integrated Unit_TechQinectsGens
Integrated Unit_TechQinectsGensIntegrated Unit_TechQinectsGens
Integrated Unit_TechQinectsGens
 
3. ICS lab manual
3. ICS lab manual 3. ICS lab manual
3. ICS lab manual
 
Building Pre-algebra Skills through Project Based Learning
Building Pre-algebra Skills through Project Based LearningBuilding Pre-algebra Skills through Project Based Learning
Building Pre-algebra Skills through Project Based Learning
 
Assignment 1 - Application of Numerical Analysis.pdf
Assignment 1 - Application of Numerical Analysis.pdfAssignment 1 - Application of Numerical Analysis.pdf
Assignment 1 - Application of Numerical Analysis.pdf
 
Introduction.ppt
Introduction.pptIntroduction.ppt
Introduction.ppt
 
Physics form 4 yearly planning
Physics form 4 yearly planningPhysics form 4 yearly planning
Physics form 4 yearly planning
 
Industrial Engineering Subjects
Industrial Engineering SubjectsIndustrial Engineering Subjects
Industrial Engineering Subjects
 
Physics examination techniques
Physics examination techniquesPhysics examination techniques
Physics examination techniques
 
Orbital Mechanics via a Simulation-based learning
Orbital Mechanics via a Simulation-based learningOrbital Mechanics via a Simulation-based learning
Orbital Mechanics via a Simulation-based learning
 
Maths Program
Maths ProgramMaths Program
Maths Program
 
Data Science and Machine learning-Lect01.pdf
Data Science and Machine learning-Lect01.pdfData Science and Machine learning-Lect01.pdf
Data Science and Machine learning-Lect01.pdf
 
DME Syllabus.pdf
DME Syllabus.pdfDME Syllabus.pdf
DME Syllabus.pdf
 
Mattie Davis Solving equations using algebra tiles edci 557
Mattie Davis Solving equations using algebra tiles edci 557Mattie Davis Solving equations using algebra tiles edci 557
Mattie Davis Solving equations using algebra tiles edci 557
 
AllSem23.pdf
AllSem23.pdfAllSem23.pdf
AllSem23.pdf
 
Artifact3 allen
Artifact3 allenArtifact3 allen
Artifact3 allen
 

Robotics exploatory plans week 1

  • 1. Name: _________________________________ Date: _________________________________ Instructor: ______________________________ Introduction to Robotics Basic Robotic Movement Instructor: Mr. Kopec Agenda Week B6 MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY 11/16/09 11/17/09 11/18/09 11/19/09 11/20/09 Period 1 Introduction of packet to students. Discussion of Friday Examination will also be indicated. Collect and go over homework from previous day. Lecture: Pythagorean Theorem, relationship between robotic motion and finding shortest trajectory. Collect and go over homework from previous day. Discussion of gear ratios via Vex Curriculum 2.0. Collect and go over homework from previous day. Continue with Trajectory lab from previous day. Examination via packet. 2 Lecture: Measures of angles, solving simple equations. Lecture: Simple right angle trigonometry with special attention on inverse trig relationships. Introductory discussion on Torque vs Speed. Which allows for more precision in movement? Students begin modifications on SquareBot 2.0 via changing gear system. When students complete PROBLEM, then move onto sample test course. ISSUE: Your rover is on Mars and needs to analyze an ice sample for proteins. However there are many obstacles in your way. Plot a course, write pseudo code and compile your source code to move your rover from its original position to the ice sample. Examination via packet.
  • 2. 3 Construct SquareBot 2.0 via Vex Curriculum 2.0. Lecture: Simple right angle trigonometry with special attention on inverse trig relationships. Continue modifications on SquareBot 2.0. Begin generating linear and rotational speed [lab]. Linear regressions are discussed. Time allotted for ISSUE. Examination via packet. LUNCH LUNCH LUNCH LUNCH LUNCH LUNCH 4 IF SquareBot 2.0 is completed in each group, THEN move to Programming basics - finding pseudo code. Relationship between distance and time, speed, will be discussed, via packet. Begin Lab write-up, incrementally expand throught the week. Linear regression of data via Excel. Finding motor power levels to produce straight movement. Time allotted for ISSUE. Examination via packet. 5 Prep Prep Prep Prep Prep 6 Duty Duty Duty Duty Duty 7 Writing Exercise: Logical pattern organization via incremental steps. Generating pseudo code from a story. Generation of Source Code for RobotC. Motor commands for movement discussed. Special attention to video [packet] so that students can be reminded of motor commands at any time they are near a computer. Produce motor power levels to produce straight trajectory lab. Time allotted for ISSUE. Presentation of student work via Q&A session. 8 Reiterate a succinct period 2. Special attention to struggling students. HW: Write a short story about WallE avoiding obstacles. Summarize and complete overall picture of how time affects robotic movements. HW: Finish Problems pg 12,13 [packet]. PROBLEM: Robot moves, F10in; R45-deg cw; F17in; R30- deg ccw; F20in. This will be diagramed on board for students to generate pseudo code, then source code and finally input into RobotC. HW: Problems pg Write-up ISSUE, including SquareBot construction, linear and rotational speeds, gear ratio and all data plus a discussion and question section. Presentation of student work via Q&A session. Clean- up.
  • 3. 35,36,37. Frameworks: Robotics & Automation: 2.C Demonstrate skills in problem solving, diagnostics, and troubleshooting. 2.C.01c Identify the components and process of the system(equipment) . 2.C.02c Identify the problem or source of the problem.. 2.C.03c Develop solutions using a structured problem solving process. 2.C.04c Use appropriate testing equipment and tools for diagnosing the problem. 2.C.05c Implement the correct strategies to remedy the problem. 2.D Maintain equipment and machinery. 2.D.01c Identify appropriate person(s) for maintained and repair of equipment. 2.D.02c Monitor equipment indicators to insure that it is operating correctly. 2.D.03c Demonstrate ability to maintain equipment. 2.V Identify and Categorize Varying Types of Robotic Manipulators, Power Supplies and Controllers. 2.V.02 Determine the work envelop of a robot. 2.V.05 Given a robotic Workcell, identify and explain the robot’s power supply and controller. 2.V.06 Identify the path of a given robot. 2.Y Utilize Electronic Motors and Mechanical Drives as Part of an Automated Process. 2.Y.05 Determine the gear ratio for a transmission and the torque output of a motor. 2.FF Apply Limit Sensors/Switches to an Automated Process. 2.FF.01 Identify the parts of a limit switch. 2.QQ Apply Principles of Engineering Systems. 2.QQ.01 Apply simple machines to create mechanical systems in the solution of a design problem. 2.XX Write a Program. 2.XX.01 Identify the function types and explain their applications. 2.XX.02 Describe how statements are incorporated into the functions, and demonstrate proper use of a statement dialogue box. 2.XX.03 Outline and demonstrate debugging techniques for a function.
  • 4. 2.YY Use Variables and Data Types. 2.YY.01 Identify and explain the various types of variables used. Mathematics: Geometry: 7.G.5 - Use a ruler, protractor, and compass to draw polygons and circles. 10.G.2 - Draw congruent and similar figures using a compass, straightedge, protractor, and other tools such as computer software. Make conjectures about methods of construction. Justify the conjectures by logical arguments. 10.G.5 - Apply properties of angles, parallel lines, arcs, radii, chords, tangents, and secants to solve problems. 10.G.8 - Find linear equations that represent lines either perpendicular or parallel to a given line and through a point, e.g., by using the "point-slope" form of the equation. Patterns, Relations & Algebra: 7.P.4 - Solve linear equations using tables, graphs, models, and algebraic methods. 7.P.6 - Use linear equations to model and analyze problems involving proportional relationships. Use technology as appropriate. 10.P.5 - Find solutions to quadratic equations (with real roots) by factoring, completing the square, or using the quadratic formula. Demonstrate an understanding of the equivalence of the methods. 10.P.8 - Solve everyday problems that can be modeled using systems of linear equations or inequalities. Apply algebraic and graphical methods to the solution. Use technology when appropriate. Include mixture, rate, and work problems. 12.P.8 - Solve a variety of equations and inequalities using algebraic, graphical, and numerical methods, including the quadratic formula; use technology where appropriate. Include polynomial, exponential, logarithmic, and trigonometric functions; expressions involving absolute values; trigonometric relations; and simple rational expressions. Measurement: 12.M.2 - Use dimensional analysis for unit conversion and to confirm that expressions and equations make sense.
  • 5. 12.M.1 - Describe the relationship between degree and radian measures, and use radian measure in the solution of problems, in particular, problems involving angular velocity and acceleration. Physical Sciences (Chemistry & Physics) HS: Physics: 1. Motion and Forces Central Concept: Newton’s laws of motion and gravitation describe and predict the motion of most objects. 1.1 Compare and contrast vector quantities (e.g., displacement, velocity, acceleration force, linear momentum) and scalar quantities (e.g., distance, speed, energy, mass, work). 1.2 Distinguish between displacement, distance, velocity, speed, and acceleration. Solve problems involving displacement, distance, velocity, speed, and constant acceleration. 1.3 Create and interpret graphs of 1-dimensional motion, such as position vs. time, distance vs. time, speed vs. time, velocity vs. time, and acceleration vs. time where acceleration is constant. Scientific Inquiry Skills: SIS1. Make observations, raise questions, and formulate hypotheses. • Observe the world from a scientific perspective. • Pose questions and form hypotheses based on personal observations, scientific articles, experiments, and knowledge. • Read, interpret, and examine the credibility and validity of scientific claims in different sources of information, such as scientific articles, advertisements, or media stories. SIS2. Design and conduct scientific investigations. • Articulate and explain the major concepts being investigated and the purpose of an investigation. • Select required materials, equipment, and conditions for conducting an experiment. • Identify independent and dependent variables. • Write procedures that are clear and replicable. • Employ appropriate methods for accurately and consistently o making observations o making and recording measurements at appropriate levels of precision o collecting data or evidence in an organized way • Properly use instruments, equipment, and materials (e.g., scales, probeware, meter sticks, microscopes, computers) including set-up, calibration (if required), technique, maintenance, and storage. • Follow safety guidelines.
  • 6. SIS3. Analyze and interpret results of scientific investigations. • Present relationships between and among variables in appropriate forms. o Represent data and relationships between and among variables in charts and graphs. o Use appropriate technology (e.g., graphing software) and other tools. • Use mathematical operations to analyze and interpret data results. • Assess the reliability of data and identify reasons for inconsistent results, such as sources of error or uncontrolled conditions. • Use results of an experiment to develop a conclusion to an investigation that addresses the initial questions and supports or refutes the stated hypothesis. • State questions raised by an experiment that may require further investigation. SIS4. Communicate and apply the results of scientific investigations. • Develop descriptions of and explanations for scientific concepts that were a focus of one or more investigations. • Explain diagrams and charts that represent relationships of variables. • Construct a reasoned argument and respond appropriately to critical comments and questions. • Use language and vocabulary appropriately, speak clearly and logically, and use appropriate technology (e.g., presentation software) and other tools to present findings. • Use and refine scientific models that simulate physical processes or phenomena. Technology/Engineering HS: 1.1 Identify and explain the steps of the engineering design process: identify the problem, research the problem, develop possible solutions, select the best possible solution(s), construct prototypes and/or models, test and evaluate, communicate the solutions, and redesign. 6.3 Explain how the various components (source, encoder, transmitter, receiver, decoder, destination, storage, and retrieval) and processes of a communication system function. Topics: Squarebot construction, robotic movement, gear ratios, programming robotic movement [RobotC], unit circle, right angle trig, vectors, solving trigonometric as well as algebraic equations, basic report writing and presentation. Lecture & Discussion: Discuss how time is calculated via angles by using a non-digital clock [Analog Clock]. Draw a clock on the board and indicate a specific time on the board. Have students indicate the time verbally.
  • 7. Draw two circles and make one a clock, [circle A] and the other [circle B] place a Cartesian coordinate system on it. If circle A indicates 2:20, then circle B would have: Know: 360-degs in a circle 12 hours in 1/2 day 60 minutes in an hour Want: The measure of the angle between the hour and minute hands on a standard non-digital clock. Since there are 12 hours in a day, we must uncover how much each hour is worth. 360-degs/12hrs = 30-degs/hr If each hour is worth a value of 30-degs, then (a) how many degrees away is the hour hand [2 o’clock] from noon? (b) How many degrees away is the minute hand away from noon? (c) What is the measure of the angle made at 2:20pm? (a) 2 hours away from noon indicates 2, 30-deg angles therefore indicating 60-degs. 2(30-degs) = 60-degs (b) If we have 60 minutes in an hour, then how many degrees does each minute represent on the clock? Since there are 360-degs in 1hr and 1hr represents 60 minutes, then we can see that this statement is true: 360-degs/60 min = 6-degs/min Since 6-degs represents a minute then it is clear to see that in 20 minutes we have 120-degs away from noon: 20min x (6-degs/min) = 120-degs (c) We have 2 angles we know and one we want to find therefore: Know: 2 o’clock represents 60-degrees clockwise from noon 20 minutes represents 120-degrees away from noon Want: The measure of the angle made between 2 o’clock and 20 minutes
  • 8. relative to noon. Since theta1 + theta2 = theta(total), then theta(total) – theta1 = theta 2, or 120-degs – 60-degs = 60-degs. We now know that the measure of the angle made at 2:20 is 60- degs! *Students worksheet calculating the measure of the angle made at a certain time.
  • 9. Name: _________________________________ Date: _________________________________ Points Earned = _______ Total Points = __15___ 1) 2) 3) 8:15pm 4) 5:13am
  • 10. 5) 7:20am Robotic movement is essentially thinking about time. Think clock on top of robot. If you want to move relative to your position, then you should always operate at a certain distance at a certain number of degrees relative to time. Here we have a robot moving forward; we can essentially place a clock on top and give direction via angles. Remember SohCahToa and remember the Pythagorean Theorem? We are always going to call forward, 0-degs even if it looks as if it should be 90-degs in the picture above. You will know which direction is forward by identifying the arrow located on the diagram. Therefore, how many degrees should we be thinking about when looking at the picture above on the right? _________-degs. Now let’s begin moving a robot from one position to another. Move a robot forward 2 meters and the turn 90-degs clockwise and them move 0.5 meters. The picture we have looks like this:
  • 11. or Can you calculate the value for R, the resultant, in the picture above, if you know that c2 = a2 + b2 , or that the square of the hypotenuse is the SDT as the sum of the squares of both legs of the triangle. Work out the problem in the space provided below: Answer: ________________________________________ Now look at this exact problem in another way in order to check our calculations. Our problem looks like this:
  • 12. Find the measure of the angle made between AR, if A = 2 meters, B = 0.5 meters and R = 2.062 meters. Let us revisit our old friends, the generals … SohCahToa! G1: SIN(angle) = (OP/HYP) G2: COS(angle) = (ADJ/HYP) G3: TAN(angle) = (OP/ADJ) Remember that the Generals help us uncover sides of triangles. But we want to uncover the angle made between AR, so we must learn another item that may help us out. What is the ONE thing we should always be thinking about when we are thinking about mathematics? Answer: _______________________________________ So we know that SohCahToa helps us uncover sides of a triangle so there must be something that is opposite to SohCahToa, shouldn’t there be to uncover angles? We now discuss the OPPOSITE of the Generals! The inverse Generals! For now, we will use this notation for the OPPOSITE or the INVERSE of the Generals: SIN-1 (SIN FUNCTION) COS-1 (COS FUNCTION) TAN-1 (TAN FUNCTION) The negative 1 represents the OPPOSITE of the General! We will discuss this in more detail when we build our first manipulator later on in the year.
  • 13. Remember our problem looks like this: Find the measure of the angle made between AR, if A = 2 meters, B = 0.5 meters and R = 2.062 meters. Know: A = 2m B = 0.5m R = 2.062m  Careful this value was calculated and rounded, this might cause derivations in our future calculations. SohCahToa Want: angle b Since R was found through a calculation it is wise not to use it to uncover our unknown angle. The reason was mentioned in the Know category, please see above. Let us use A = 2m and B = 0.5m since this was originally given in the problem. Remember circle the sides of the triangle we know and look to the Generals for which one you need to use in order to solve the problem. In this case we use G3 since we have both OP and ADJ relative to the angle in question, angle b. G3: The TANGENT function TAN(angle b) = (0.5m/2m) But we do not know the angle! How can we find this? We use the INVERSE Generals [Inverse Trig functions]. If we do something to one side of an equation we must do it to the other side to keep it balanced. If you have a balance that is centered and add 20lbs to one side, then that side goes down a bit. The solution to making it balanced again is to add 20lbs on the OTHER side, therefore making both sides the SAME! In this case we have the following:
  • 14. TAN(angle b) = (0.5m/2m) But since we do not know the angle we must use the OPPOSITE of the TANGENT function in order to find our angle. Here is how it looks: TAN-1 (TAN(angle b)) = (0.5m/2m)  this looks weird, unbalanced! TAN-1 (TAN(angle b)) = TAN-1 (0.5m/2m)  this is correct since we are taking the OPPOSITE [INVERSE] of the General on BOTH SIDES, therefore keeping it BALANCED! Therefore: angle b = TAN-1 (0.5m/2m) or angle b = 14.04-degs! The reason behind why we use the INVERSE TAN function is to give us an angle!!! It is the SDT as the pirate problem we discussed during exploratory. Remember the pirate ship? S = Ship, represents start position T = Treasure, represents end position Pirate buries treasure four steps away from his ship. S + 4 = T Pirate needs to get back to ship. T – 4 = S Didn’t the OPPOSITE (inverse) OPERATION get us back to where we began? This is why this works. Remember when we think mathematics we think opposites.
  • 15. Now we can start to check our solution of R = 2.062m! If we have A = 2m and angle b = 14.04-degs, then (a) find B, (b) find R. If we find that B is close to 0.5 meters then we know we have a correct triangle! Therefore we know that the robot’s path [trajectory] can safely be deployed. Know: SohCahToa A = 2m = ADJ ANGLE B = 14.04-degs  Here we use the calculated value to check our original solution. Want: (a) Find B  OP (b) Find R  HYP (a) Use SohCahToa to uncover side B [OP]. TAN(14.04-degs) = (B/2m) 2m[TAN(14.04-degs)] = B 0.500 = B  looks like it checks, but let’s be sure. (b) Use SohCahToa to uncover side R [HYP]. COS(14.04-degs) = (2/R) R[COS(14.04-degs)] = 2 R = (2/COS(14.04-degs)) R = 2.062-degs!  Looks like our check WORKS!!! Recap: We discussed movement and time relative to circles and triangles. We used
  • 16. Analog clocks [non-digital] in order to start [uncover angles] which lead to Pythagorean Theorem to solve and finally our Generals [Trig functions and Inverse Trig functions] to check our solution.
  • 17. Name: _________________________________ Date: _________________________________ Points Earned = _______ Total Points = __45___ Find the missing side of the triangle in each of the following, please BOX your ANSWER. Remember to place BOTH, Know and Want categories for each problem. 1) 2) 3)
  • 18. 4) 5) 6) Find the angle b in each of the problems 1 – 5. (a) ANGLE b in question 1 (b) ANGLE b in question 2 (c) ANGLE b in question 3 (d) ANGLE b in question 4
  • 19. (e) ANGLE b in question 5 7) Check all solutions by using the following: (a) Use 6(a) and Side A (3m) to justify your solution to question 1. (b) Use 6(b) and Side B (3m) to justify your solution to question 2. (c) Use 6(c) and Side R (6m) to justify your solution to question 3. (d) Use 6(d) and Side A (131.25m) to justify your solution to question 4. (e) Use 6(e) and Side R (27.5m) to justify your solution to questions 5.
  • 20. Now let us discuss the summation of these robotic movements in sequential movements. Without covering vectors yet, (we will discuss in detail at a later date) we are going to start summation of these movements. What if we had a robot that needed sequential movements to move around an obstacle? We loosely observed this during our exploratory day and now we are going to take it to the next level. We are going to move a robot around an obstacle without making a big triangle, [larger triangle means more derivations, therefore it is better for the robot to move in smaller distances. In other words, it makes more sense to get the robot to a specific area, then rotate a certain number of degrees, multiple times in order to get to your primary destination than to make one gigantic triangle that might cause errors in order to get to your primary destination, however we can do certain checks in order to fully understand our destination relative to our original position in space-time, start position. The basic idea is to get the robot close to the obstacle then rotate 90-degrees cw, move a certain distance then rotate 90-degs ccw, move a certain distance forward, rotate 90-deg ccw forward a certain distance and then rotate 90-degs cw a certain distance (ending up on the original line from start to end) and finally moving forward to the ending position, on the original line. In other words, in fact it would look like this: It is easy to see that we can move around our object using right triangles but we might have massive errors if the motors do not rotate at the same speed, (this is frequently true) so it is easier to get to your end point if you move close to the object then move around it and then back on the same line (HYP) in order to get to your final destination.
  • 21. What did we just do to the position of the robot? The final look for our problem would look like this without any values. Picture is a representation of robot movement; it may not be the EXACT picture that students decide to use for programming. So we need to talk about angles and about current to the DC motors supplied via VEX*, in order to discuss movement. Let us mainly focus on the trajectory of the robot and discuss motors at a later date, [TBA]. We need to make special note that we do not yet know the velocity of our robot so specific vector movement must be addressed.
  • 22. Remember the Cartesian coordinate system, y’s represent vertical displacements while x’s represent horizontal displacements relative to the zero position or to origin. Let us say that the distance the robot needs to travel is 10m and the obstacle is centered at 5m with a radius on 0.5m. Therefore we know that the diameter is 1m. Since the obstacle is centered on 5m then it is safe to say that the obstacle is 5m +- 0.5m; or one side of the obstacle is at 4.5m and the other is at 5.5m. Can you find a suitable path for the robot to travel in order to end up at the destination? Work out a solution to the problem; make sure to diagram your answer. If you get lost, remember all you are looking at is start and end and how WOULD you get there. After giving 15 minutes check on student progress and work out problem with students. Here is the solution we did in class:
  • 23. ***Educational Use & Taken from: Vex Curriculum 2.0 ***Educational Use & Taken from: Vex Curriculum 2.0
  • 24. Now we must discuss how does speed work? Speed is a ratio of a certain distance per unit of time. In other words it should look like this: Speed = (Distance/Time) We typically see this as miles per hour or miles/hour in a car. In our robots we will be discussing meters/second. Have students in each group draw out at least a one meter track in order to establish speed. If we have a stopwatch and we know the distance the robot travels within that time, then we have produced a speed! S = D/T; where S = speed, D = Distance and T = time Once we have established the speed of the robot then we may be able to indicate direction as a resultant of the speed of the robot in relation to its positional angle for movement. If we have a 1 meter track and the time the robot takes to complete straight 1 meter track is 1.6 seconds then what it its speed? Know: 1 meter track = distance 1.6 seconds = time for completion Want: Speed (m/s) Since S = D/T, where D = 1m and T = 1.6 seconds, then, S = D/T S = 1m/1.6 seconds S = 0.625 m/s Now we know that in EVERY second we should obtain a distance of 0.625 meters. So, if we double that time we should get the robot to move 1.25 meters. If we take half the time then we should go 0.3125 meters. We have set up a constant ratio of distance per unit of time! We should be able to figure out how long to turn the motors on, in order to accomplish our goals. In other words, how long do we supply the motors with current in order to achieve our goal, a change is a certain position.
  • 25. Name: _________________________________ Date: _________________________________ Points Earned = _______ Total Points = __50___ Find the speed for each of the following, please BOX your answer: 1) A robot moves forward 30 meters in a time interval of 5 seconds. 2) A robot moves forward 2 meters in a time interval of 5 seconds. 3) A robot moves forward 15.3 meters in a time interval of 3 seconds. 4) A robot moves forward 12 and a quarter meters in a time interval of 11.3 seconds. 5) A robot moves forward fifteen and a third meters in a time interval of eleven and two-thirds seconds. Find the distance traveled for each of the following, please BOX your answer: 6) A robot has a speed of 0.5m/s and the motors are turned on for 2 seconds.
  • 26. 7) A robot has a speed of 3.2m/s and the motors are turned on for 4.7 seconds. 8) A robot has a speed of 6.1m/s and the motors are turned on for 3.54 seconds. 9) A robot has a speed of twenty meters per second and the motors are turned on for sixteen and a quarter seconds. 10) A robot has a speed of twelve meters per second and the motors are turned on for four hundred and thirteen seconds.
  • 27. Speed is an item that we call a SCALAR or SCALAR Quantity. This means it has a magnitude but no direction. A magnitude can be considered at this time as any unit of measure containing no direction or nonspecific direction. We are now going to discuss something called VELOCITY. Velocity is simply speed, [a magnitude unit] with a given direction. We call a magnitude with a specific direction a VECTOR. Vectors are one of the most important items to consider when moving robots or robotic components! We are going to use vectors in order to set-up our program to move our robot! Let’s see how we can accomplish this task. We want to move a robot ccw, 30-degs WRT* forward a distance of 6 meters and then move cw, 45-degs WRT forward, 5 meters. If the speed of the robot is 0.6 m/s then find (a) the time for the motors to run in order to achieve the distance wanted for the first movement. (b) the time for the motors to run in order to achieve the distance wanted for the second movement. (c) the shortest distance and time for motor operation to complete starting point to ending point. Know: Speed of the robot is 0.6 m/s 30-degs ccw WRT forward a distance of 6 meters 45-degs cw WRT forward a distance of 5 meters Want: (a) time to turn motors on to achieve 30-degs ccw WRT forward a distance of 6 meters (b) time to turn motors on to achieve 45-degs cw WRT forward a distance of 5 meters *(c) the shortest distance and time for motor operation to complete starting point to ending point, if the original angle was made. (a) time to turn motors on to achieve 30-degs cw WRT forward a distance of 6 meters Since the robot’s speed is 0.6m/s it will be easy to uncover the amount of time to turn on the motors. First we should draw out the total problem so we can better visualize the problem.
  • 28. Break this picture up into the two parts (a) and (b), but focus only on (a). Take a look: Since we know that the robot has a speed of 0.6m/s, then it is easy to see that: 6m x (1s/0.6m) = 10s Therefore we must turn the motors on for 10 seconds in order to achieve our distance of 6 meters. We have an issue on how we achieve the 30-deg angle, we will discuss this momentarily. (b) Since the robot’s speed is 0.6m/s it will be easy to uncover the
  • 29. amount of time to turn on the motors. First we should draw out the problem so we can better visualize the problem. Since we know that the robot has a speed of 0.6m/s, then it is easy to see that: 5m x (1s/0.6m) = 5m/0.6s = 8.333s Therefore we must turn the motors on for 8.333 seconds in order to achieve our distance of 5 meters. We have an issue on how we achieve the cw 45-deg angle, we will discuss this momentarily. We now have two functions describing movement but no specific direction. Since we are using our basic Squarebot design which has two motors operating in operate rotations we must uncover the amount of time to designate to each motor to achieve our desired angles. In other words, we must find the amount of time to turn on motors in order to obtain a certain degree. Remember the Vex motor operates at -127 to 127, where the negative means full power reverse where the positive means full power forward. Zero means the motor is off and the robot will not move. Let us go back to our analog clock. We can base all of our calculations on this idea.
  • 30. Using your Squarebot, set the robot to do a point-turn, that is one motor running full forward, while the other is full reverse. The robot will begin making a circle. Since a circle has 360-degs, it should be easy to find the amount of time for the robot to make a complete circle, therefore, you know the amount of time to complete 360-degs! Find the amount of time to achieve 30-degs. (360-degs/time for circle completion) = 30-degs/t2 Or t2 = 30-degs/(360-degs/time for circle completion) The same proportion can be set-up to achieve the 45-deg angle made. The only difference is that the motors operate opposite of the ccw rotation in the first example. In other words, if motor[port2] = 127 and motor[port3] = -127, then the opposite would be, motor[port2] = -127 and motor[port3] = 127 at a specific amount of time. In the space provided below indicate how long to turn on the motors on your Squarebot to achieve (a) 30-degs and (b) 45-degs. (a)
  • 31. (b) Now put together the 4 functions we will need to solve our problem as stated above. The first function represents the 30-deg angle ccw to forward. ANS: ___________________ The second function indicates we must turn the motors on for 10 seconds in order to achieve our distance of 6 meters. The third function represents the 45-deg angle cw to forward. ANS: ___________________ The fourth function represents that we must turn the motors on for 8.333 seconds in order to achieve our distance of 5 meters. You have just begun to write your pseudocode! A pseudocode is a beginning picture of your program in order to correctly write it into your compiler, [RobotC]. Let us take a closer look at vectors and writing pseudocode & source code. Overview Site for Programming Movement via RobotC http://www.education.rec.ri.cmu.edu/roboticscurriculum/vex_online/programming/robotc /movement.html
  • 32. Video on Basic Movement via RobotC http://www.education.rec.ri.cmu.edu/roboticscurriculum/vex_online/programming/robotc /movement/moving_forward/videos/dissection.html If your Squarebot has a speed of _______m/s and its path is as follows: Forward 2m, 30-degs ccw WRT original position Forward 4m, 45-degs cw WRT secondary position Forward 3.2m, 0-degs WRT third position We do not know the speed! Have teams find their Squarebot’s speed via speed tests. This problem we will work out in class. Please place the work in the space provided below. What are the items YOU need to find in order to accomplish this task? 1) Make sure you draw out the problem using head-tail method for vectors [discussion in class]. 2) Have your robot run two speed tests. i. Distance per time
  • 33. ii. Rotation per time 3) Write pseudocode. 4) Write out source code [code input into RobotC] on paper. 5) Write out source code [code input into RobotC] in RobotC. 6) Download firmware onto robot 7) Compile and Download program into the microcontroller [brain] of the robot. 8) Test program and measure the distance traveled at specific direction to have ACTUAL and THEORETICAL RESULTS. A Basic Report should look like the following: Name: _____________________________ Date: _____________________________ Teammates: _________________________ Abstract: Subject: Basic continuous robot movement based on vectors. Programming the robot to carry out a specified path. Measuring actual travel to identify actual and theoretical results. Problem: The robot is presented with a change in position. Find the program to carry out path within a certain error. Items used: Vex hardware, Vex microcontroller, Vex radio transmitter, RobotC, meter stick, stopwatch, lab notebook. Path for travel: Forward 2m, 30-degs ccw WRT original position Forward 4m, 45-degs cw WRT secondary position Forward 3.2m, 0-degs WRT third position Procedure:
  • 35.
  • 36. It is imperative to establish a means to organizing data so it is clear to others viewing that data. Here we will discuss Excel and how it can help us perform calculations. Notice that there are no notes given in this area. Here we assess the ability of the student to observe and take notes. Please write YOUR own notes in the space provided below. Excel Notes:
  • 37. Now that we have discussed Excel and inputting operations and functions such as our trig functions we can now discuss how we present material for others to understand what and why we carried out this study. In the following section we will be discussing PowerPoint and how to create a basic presentation in order to present material to others. As in the previous section, students will take notes on subject and scored in order to assess note- taking abilities. PowerPoint Notes:
  • 38. Your mission is to find a way for your robot to move from the room to a specified position in the hallway. You will have to avoid obstacles along the way. You must find path and program that path into the microcontroller so that the robot can complete its mission. You may use any item in the Vex arsenal in order to accomplish this task. The team that does it in the best time wins a special surprise that will be announced at the end of the mission. You MUST write a report [in Word] and present your findings to me in the form of a PowerPoint presentation in order to receive a grade for the mission. Are you brave enough to take on this challenge? I know you are, so let’s get started! [Rubric to be given at time of presentation]
  • 39. Lab & General Question Section 1) Write a procedure on how you program a robot to move around an object from start to a finished product. [20 points] [Each question 2 – 12 is worth 5 points.] 2) What do you write in order to make your robot to go forward in RobotC? 3) What is the code you would write into RobotC? 4) What is the first line of code that must be input into RobotC?
  • 40. 5) How does SOHCAHTOA aid us in moving our robot? 6) What does SOHCAHTOA mean? 7) What are the opposite functions to SOHCAHTOA? 8) What is linear speed? 9) What is rotational speed? 10) How can we use linear and rotational speed in order to calculate amount of time to input into robot? 11) How can you adjust the motor speed in RobotC? 12) Why would you adjust the motor speed in RobotC?
  • 41. In Questions 13 – 18 assume that motor[port2] = -127 and motor[port3] = 127 is clockwise(cw); SPEEDrotational = 10.5-degs/sec; SPEEDrotational = 112-degs/sec; SPEEDlinear = 0.6m/sec; SPEEDlinear = 17.2in/sec. [10 points each] 13) What is the pseudo code to make your robot move 3m forward, turn 50-degs ccw and then forward 1.3m? 14) What is the source code to make your robot move 3m forward, turn 50-degs ccw and then forward 1.3m? 15) What is the pseudo code to make your robot move 1.23m forward, turn 130-degs cw and then forward 1.5m? 16) What is the source code to make your robot move 1.23m forward, turn 130-degs cw and then forward 1.5m? 17) What is the pseudo code to make your robot move 14in forward, turn 30-degs cw and then forward 17.3in? 18) What is the source code to make your robot move 14in forward, turn 30-degs cw and then forward 17.3in?