Robasics
-
Upload
cass-everitt -
Category
Engineering
-
view
449 -
download
0
description
Transcript of Robasics
FLL Robasicsgetting started with simple EV3 robotics
Robotics
● the branch of technology that deals with the design, construction, operation, and application of robots
Our “Base” Robot
Assumption: We’re all beginners at● How Robotics Works (in general)● Lego Mindstorm EV3 (specifically)
So let’s start simple...
Our “Base” Robot
● Pretty close to the one given in the instructions that came with the EV3 kit
● 2 motors (one per wheel)● 2 sensors
○ gyro (upper left in this photo)○ color sensor (will see later)
The undercarriage
● Note the location of the color sensor
● This is importanto We will learn why later
“Base” Robot
● Starting with the same robot we cano share programs, sub-programso learn the basic concepts
● We cannoto develop full mission plans
Final Robot
● Robot will need additions / changeso additional motors for arms, etco additional sensors
● Mission plans will dictateo what your robot looks likeo consequently, your programs
Getting Started
● Get the Mindstorm software installed● Add the gyro.ev3b block
o Not in the Home Editiono But a free download (google it)o tools -> block import
● Programming model is graphical
Connect your robot
● Connect via bluetooth if possible
● once connected, look at the motors and sensors connected
First Program!
What does it do?
Right face!
What does this do?What is this 0.62 business?
Regular Quadrilateral
What about this?
Dead Reckoning
● We have a block that can control the motors of the wheels in a natural wayo turn +/- 100%o power 0-100%o rotations or seconds
● We can chain these together as long as we like!
● Great, we’re done, right? :-)o Nope! We have to deal with the evil of error
Why did this program fail?
Sensors
● Gyroscope lets us trade “0.62” for something more natural, more robust
● Gyro tells us the change in angle, which is what we wanted anyway…
● But how do we use it?
Gyro “turn around” example...
353?
on until
Better Regular Quadrilateral
Other sensors
● Gyro is not perfecto Helps avoid errors though
● Other sensors help in similar ways● Color sensor lets us “see” landmarks
o Stop on color, follow edge● We use multiple sensors to manage error...
Simple color sensor program
Calibration
The color sensor requires calibration… ● So black reports as “0”● And white reports as “100”● Otherwise hard to pick “good” numbers
This is the prog to calibrate color:
Pitfall!
● Sharing programs is great!● But they are hardwired,
expecting specific motors on specific {A,B,C,D}.
● And sensors on specific {1,2,3,4}.
● Common copy/paste failure.
Original color calibration:
What’s wrong?