35
Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

  • View
    236

  • Download
    3

Embed Size (px)

Citation preview

Page 1: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

ENGR 100 - Robotics Project

Page 2: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

Presentation Outline

I. Background InformationII. Design ProjectIII. Engineering (Programming and

Gears)

IV. Programming the RCX

Page 3: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

Presentation Outline

I. Background InformationII. Design ProjectIII. Engineering (Programming and

Gears)

IV. Programming the RCX

Page 4: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

Who Builds Robots?EE - designs “the brain”, sensors, actuators &

wiring. ME - designs body, gearing, actuators

CSE - writes software

CHEM E - designs (or selects) power supply.

MAT’L SCI - materials

All engineers listed above work together to design/build robots.

Page 5: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

Design Challenges for Mobile Robots

Position -How does robot know where it is (or has been)?

Power supply - How does it avoid running over cord?

Navigation - How does it navigate around obstacles?

Object Recognition - How does it recognize money, toys, even cats?

Page 6: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

Presentation Outline

I. Background InformationII. Design ProjectIII. Engineering (Programming and

Gears)

IV. Programming the RCX

Page 7: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

Project Objectives

The goals of this project are for students to: Build a programmable robot. Learn how robotics involves a multitude of skills

and knowledge from many subject areas. Experience the design process. Be introduced to basic computer programming. Get excited about Science and Technology.

Page 8: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

Problem Definition

The objective of this project is to build a computer controlled robot that can safely deliver an stuff animal through an obstacle course in the shortest amount of time.

To simulate real world situations, the robot must be able to climb a small ramp, cross a street without getting hit by a car, turn corners, fight off aggressive animals, climb stairs and free itself from a sandpit.

Page 9: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Obstacle Course Layout

10 pts

25 pts10 pts

10 pts

10 pts10 pts

10 pts

50 pts

60 pts

10 ptsDefender Zone50 Pts

10 pts

10 pts

Page 10: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

Programming Tasks

The RCX can store 3 different programs:

Program 1 - Robotic Wheelchair (do first!)Program 2 - CarProgram 3 - Unfriendly Robot (be

creative!)

Page 11: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

10 pts

25 pts10 pts

10 pts

10 pts10 pts

10 pts

50 pts

60 pts

10 ptsDefender Zone50 Pts

10 pts

10 pts

25 points are awarded to team that programs the robot to stop at the crosswalk when the “message # 1” signal is received from the master controller and it proceeds after receiving the “message # 2”.

25 points are awarded to team that programs the robot to stop and back away from the crosswalk when “message # 1” is received from the master controller.

50 points are awarded to team that either fight off the unfriendly robot or stop the robotic wheelchair from moving forward.

10 points each are awarded to team that go over a 3” ramp, ¼” steps or sand pit

Page 12: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

Design Approaches

"Top-down" design the process of starting with the goal of the

project and then developing a solution. "Bottom-up" design

the process of first learning about the available materials and then determining what can be done with them.

Page 13: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

ENGR 100 - Robotics Project Deliverables

HW Simple Pathfinder Test Design Specification Final Report

pathfinder program (20%)Design Specification (10%) Final Robot - Score (30%)Group Final Report (40%)Extra Credit (10%)

Page 14: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

Robotics Project Schedule

*Final Report & Reflection Paper due Fri. June 8.

Monday Wednesday Friday

Week 7

May 9 - Problem

Definition - Inventory - Gears & Sensors

May 11 - "Hints & Tips" - Programming

Week 8

May 14 - Pathfinder due

May 16 - Design Spec

May 18 - Construction &

Testing

Week 9

May 21 - Revision

May 23 - Robot

construction

May 25 - Robot construction

Week 10

May 28 - HOLIDAY

May 30 - Competition

June 1 - Competition - Final Inventory

Page 15: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

Homework Assignments

Final Report

Please follow the format in the handout

Page 16: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

Homework Assignments

Go forward for 2.5 second (set the power at 7).Go backwards for 3 seconds (set the power at 1) - Can your robot move?Maneuver a 30 o turn. Avoid obstacles to the left, right, and between the two tactile sensors as the robot moves forward.Halt for 5 s when the light intensity reaches 50%.Stop after receiving Message 1 and move forward after receiving Message 2 from the Master Controller.

Simple Pathfinder

Page 17: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

Homework Assignments

Design Specification

Print out copies of the 3 programs (wheelchair, car, and unfriendly). With a pen, label what each command does and why. Someone reading these programs would be able to understand your programming logic (similar to pseudo code).

The purpose of this assignment is to make sure your team understands computer programming.

Page 18: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

Presentation Outline

I. Background InformationII. Design ProjectIII. Engineering (Programming and

Gears)

IV. Programming the RCX

Page 19: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

Robot Basics - Gears

SpeedPower (climb over obstacles)Turns

Tips -Try different size gear combinations,

different types of gears (worm), and different motor placement (rear wheel drive or 4 wheel drive).

Page 20: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

4 wheel drive

Page 21: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

Robot Basics - Programming

No matter what language you use, there are 3 basic techniques for organizing the commands used in programming: Selection Repetition (Loops) Conditional

Page 22: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

SelectionSelection statements are defined as a list of

commands that are executed in order.For example:

Set Forward DirectionGo forward for 3 sStop

Page 23: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

RepetitionRepetition statements

allow for a series of commands to be repeated for a set number times.

For example:Repeat 3 timesSet forward directionMove forward for 3 sStopEnd Repeat

Page 24: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

ConditionalConditional statements allow for two

(or more) different sets of commands to be executed depending on the conditions at the time.

For example, if certain conditions are true, one set of actions will be taken, and if any (or all) are false, than another set of commands will be executed.

Page 25: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

Example of Conditional StatementsFor example -

If the light is <50% Set Direction ForwardMove Forward for 3 sStop

Else If light is >= 50%Stop

End

Page 26: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

Features of RCX software

Multi-threaded languageMeans that the main program can be executing at

the same times as a subprogram. Can cause unexpected results!

Variables limited to 1 or 0 (or counter)

Consider programming in Not Quite C language if you have previous programming experience, if need more values for variables.

Page 27: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

Presentation Outline

I. Background InformationII. Design ProjectIII. Engineering (Programming and

Gears)

IV. Programming the RCX

Page 28: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

Programming the RCX

Stack puzzle pieces to make programs.

Then download them to the RCX.

Page 29: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

Saving the Program

Select button to download

Select program number (1-5)

Page 30: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

Saving the Program

Page 31: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

Programming the RCX

Tells robot how to respond to touch and light.

Tells robot how to move: on, off, direction, wait, other.

Changes the way parts of your program run (repeat, conditional)

Allows you to create your own “subroutines.”

See handout for more information!

Page 32: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

To download Firmware, click on “Getting Started” and then “Set Up Options”

Page 33: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

Page 34: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

RCX Command Center - NQC

Page 35: Wei-chih Wang, Engr. Section A ENGR 100 - Robotics Project

Wei-chih Wang, Engr. Section A

To do List:

Take kit home and install on computer.View training video and/or challenges. Check out the related web sites.Build a Simple Pathfinder (pg 12 - 17).Program the robot.