designing and building robots - allegheny college

21
Designing and Building Robots February 20, 2015 Janyl Jumadinova

Upload: others

Post on 21-Apr-2022

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Designing and Building Robots - Allegheny College

Designing and Building Robots

February 20, 2015

Janyl Jumadinova

Page 2: Designing and Building Robots - Allegheny College

Robotics in Computer Science

What is a robot?

2/16

Page 3: Designing and Building Robots - Allegheny College

Robotics in Computer Science

What is a robot?

2/16

Page 4: Designing and Building Robots - Allegheny College

Robotics in Computer Science

What is a robot?

2/16

Page 5: Designing and Building Robots - Allegheny College

What Can Robots Be Used For?

I Manufacturing

I 3 Ds : Dirty, Dull, Dangerous

I Space

I Satellites, probes, planetary landers, rovers

I Military

I Agriculture

I Construction

I Entertainment

I Consumer?

3/16

Page 6: Designing and Building Robots - Allegheny College

What Can Robots Be Used For?

I Manufacturing

I 3 Ds : Dirty,

Dull, Dangerous

I Space

I Satellites, probes, planetary landers, rovers

I Military

I Agriculture

I Construction

I Entertainment

I Consumer?

3/16

Page 7: Designing and Building Robots - Allegheny College

What Can Robots Be Used For?

I Manufacturing

I 3 Ds : Dirty, Dull, Dangerous

I Space

I Satellites, probes, planetary landers, rovers

I Military

I Agriculture

I Construction

I Entertainment

I Consumer?

3/16

Page 8: Designing and Building Robots - Allegheny College

The three key questions in Mobile Robotics

I Where am I ?

I Where am I going ?

I How do I get there ?

To answer these questions the robot has to:

I have a model of the environment (given or autonomously built)

I perceive and analyze the environment

I find its position/situation within the environment

I plan and execute the movement

4/16

Page 9: Designing and Building Robots - Allegheny College

The three key questions in Mobile Robotics

I Where am I ?

I Where am I going ?

I How do I get there ?

To answer these questions the robot has to:

I have a model of the environment (given or autonomously built)

I perceive and analyze the environment

I find its position/situation within the environment

I plan and execute the movement

4/16

Page 10: Designing and Building Robots - Allegheny College

Robot Components

Two main components:

I Sensors: to “understand” the world around

I Actuators: to “act” (do actions) on the world around

5/16

Page 11: Designing and Building Robots - Allegheny College

What Does a Robot Do?

Sense, Plan and ActI Sense - get information from sensors

I Plan - use the sensed information to decide to do things (e.g.,go down the hallway, turn left, go 3 meters, and stop)

I Act - do the thing (e.g, turn 60 degrees with a velocity of 0.2meters/sec)

6/16

Page 12: Designing and Building Robots - Allegheny College

How to Design a Robot?

7/16

Page 13: Designing and Building Robots - Allegheny College

Lego EV3 RobotsLego EV3 robot contains:

I a programmable EV3 controller (brick)I user interface with an LCD screenI Lego building blocksI motors and various sensors such as light, ultrasonic, color,

touch, gyro.

8/16

Page 14: Designing and Building Robots - Allegheny College

Lego EV3 Robots

The brick contains 4 outputs (motors) 4 inputs (sensors), USB,Bluetooth, or Wi-Fi connection, LCD screen, 16 MB flash memory,64 MB RAM, SD Card Port, EV3 Brick Button lights, sound.

9/16

Page 15: Designing and Building Robots - Allegheny College

LeJOS

leJOS is a small Java Virtual Machine, which allows us to writeJava programs for Lego robotsleJOS API documentation: http://www.lejos.org/ev3/docs/

10/16

Page 16: Designing and Building Robots - Allegheny College

EV3 GyroscopesI Preserve their orientation in relation to a fixed reference frameI They provide an absolute measure for the heading of a mobile

systemI measure rotational motion and changes in its orientation;I +/- 3 degrees accuracy;I maximum output of 440 degrees/second;I sample rate of 1 kHz;

11/16

Page 17: Designing and Building Robots - Allegheny College

EV3 Ultra sonic SensorI An ultrasonic sensor works with waves and often it is used in

applications for measure distance between a robot andsurrounded objects.

I The sensor emits sound waves and receives their echoes todetect and measure the distance from one or more objects.

I distance measure up to 250 cm ( 100-inch);I +/- 1 cm (+/- 0.394-inch) accuracy;I recognize other ultrasonic sound

12/16

Page 18: Designing and Building Robots - Allegheny College

EV3 Touch SensorI Useful for detection with high accuracy.I the EV3 Touch Sensor is an analog and simple tool with a

button located in the front and a counter for press/releaseactions of the button.

I Usually used for start/stop control systems, games likemaze-solving robots, and many other applications.

13/16

Page 19: Designing and Building Robots - Allegheny College

EV3 Color SensorI detection for up to seven colors;I detect the absence of color;I it works in ambient light;I sample rate of 1 kHz;I Auto-ID is built into the EV3 Software;

14/16

Page 20: Designing and Building Robots - Allegheny College

Now, we will check out somerobot programs ...

- demonstrate sensors- look at some of the lejos library’s classes andmethods - navigation and localization

15/16

Page 21: Designing and Building Robots - Allegheny College

Programs

I SquarePatrol: move 40 cm, turn 90 degrees (repeated 4 times)

I SoundPlay: plays tones of (frequency in Hertz, duration in ms)pairs of (300, 500), (400, 500), (500, 1000)

I LineFollower: Takes samples from the light sensor. When theescape button is pushed, it moves forward until another color isdetected.

I SensorTest: Takes samples from touch, sonic and gyro sensors.Push the escape button to exit.

I LocalizationTest: Select a random number, traverse that shapeand draw it to the LCD screen.

16/16