25
Autonomous Robot Project Lauren Mitchell Ashley Francis

Autonomous Robot Project Lauren Mitchell Ashley Francis

Embed Size (px)

Citation preview

Page 1: Autonomous Robot Project Lauren Mitchell Ashley Francis

Autonomous Robot Project

Lauren Mitchell

Ashley Francis

Page 2: Autonomous Robot Project Lauren Mitchell Ashley Francis

The Challenge

The goal for our summer project was to be able to remotely control a robot using a camera interface and wireless communication.

The final challenge of this project was to teach the robot to follow a path specified through the camera interface.

Page 3: Autonomous Robot Project Lauren Mitchell Ashley Francis

Robot Capabilities Two motors Two 4.96 cm wheels One pivot wheel Two rotation sensors Green tracking material Java Programmable Lego

Brick (RCX) Bluetooth

Page 4: Autonomous Robot Project Lauren Mitchell Ashley Francis

Web Camera Capabilities

120 x 160 resolution Mounted 2.5 m (8.25 ft)

above ground Viewing area of

2.1 x 1.9 m (6.9 x 6.3 ft) Average of 10 fps Programmatic access

through C++ API

Page 5: Autonomous Robot Project Lauren Mitchell Ashley Francis

Bluetooth Capabilities

Serial communication with 8 data bits, 1 stop bit, max data transfer rate 115.2 kbps , and even, odd, or no parity

Maximum operating range of up to 30 meters (98 feet)

9 pin RS232 connector Required voltage of 5V -

13.6V

Page 6: Autonomous Robot Project Lauren Mitchell Ashley Francis

Past Progress Summary:

1. Tracking the robot

2. Robot movement and code

3. Communication

Page 7: Autonomous Robot Project Lauren Mitchell Ashley Francis

Images from the camera

2

1

3 4

Page 8: Autonomous Robot Project Lauren Mitchell Ashley Francis

HSV values were used to track robot on image

HSV values were calculated from RGB values of a pixel

Each pixel of image is scanned looking for specific HSV ranges

Crosshair placed where ranges found

Page 9: Autonomous Robot Project Lauren Mitchell Ashley Francis

Color analysis for pixels

Green CD case used for color tracking on robot

Range of HSV values for green pixels were determined :

Page 10: Autonomous Robot Project Lauren Mitchell Ashley Francis

Navigating the robot

Java RotationNavigator class was used to control robot movement through rotation sensors and motors

Provides ability to rotate 360 degrees and travel specified distances

Page 11: Autonomous Robot Project Lauren Mitchell Ashley Francis

Calculating angle and distance

(xsrc,ysrc)

(xdest,ydest)

distance

angle = [tan -1(y/x))*(180/л)]

x = 1.325*(xdest-xsrc)y = 1.604*(ysrc-ydest)

if(y != 0)distance = abs(y/sin(angle))elsedistance = abs(x/cos(angle))

Page 12: Autonomous Robot Project Lauren Mitchell Ashley Francis

Communication between robot and PC: using Bluetooth BL-830 (female) connects to

RS232 of PC BL-819 (male) connects to

signal converter on robot 2400 bps data transfer rate Odd parity One 9-Volt battery Serial communication (sends

1 unsigned byte at a time)

Page 13: Autonomous Robot Project Lauren Mitchell Ashley Francis

Midsummer Results:

Stationary robot found every 0.3 seconds

Moving robot found every 7.34 cm

On average, robot misses target by 9.2 cm (3.6 in)

Page 14: Autonomous Robot Project Lauren Mitchell Ashley Francis

The final stretch

Improving accuracy of robot movement Closing loop with camera Robot orientation

Developing a better tracking solution Teaching the robot a path to follow

Page 15: Autonomous Robot Project Lauren Mitchell Ashley Francis

SMOLES model

Page 16: Autonomous Robot Project Lauren Mitchell Ashley Francis

Inside the components

Page 17: Autonomous Robot Project Lauren Mitchell Ashley Francis

Inside the components

Page 18: Autonomous Robot Project Lauren Mitchell Ashley Francis

Inside the components

Page 19: Autonomous Robot Project Lauren Mitchell Ashley Francis

Robot orientation and correction

(xsrc,ysrc)

(xdest,ydest)

(robx,roby)

Page 20: Autonomous Robot Project Lauren Mitchell Ashley Francis

Teaching the robot to follow a path

User clicks are stored in a vector

Pointer is used to access coordinates of click

Pointer is incremented by 2 when robot reaches a node in the path

dest x1dest y1dest x2dest y2dest x3dest y3

Pointer

Pointer

dest x3, dest y3

dest x2, dest y2

dest x1, dest y1

dest x3, dest y3

dest x2, dest y2

dest x1, dest y1

Pointer

dest x3, dest y3

dest x2, dest y2

dest x1, dest y1

Page 21: Autonomous Robot Project Lauren Mitchell Ashley Francis

Control information is sent over Bluetooth using three

byte protocol

Show camera image on screen

Store coordinates of robot destination in a vector

Camera finds coordinates of robot on screen

Necessary angle and distance calculated

user clicks?

Search for Robot

Robot Found?

Converter circuit transform signal for the RCX to receive protocol

Robot receives information and responds

accordingly

no

yes

no

yes

Waits for new information

Dest Flag?

Destination pt equals vector pointer (pointer incremented by 2)

true

Correct Flag?

false

Update angle information is sent over Bluetooth

using four byte protocol

true

false

Page 22: Autonomous Robot Project Lauren Mitchell Ashley Francis

Java code to receive and execute protocol

Thread 2: Main Thread

angle & distance

received?

no

yes

Rotate Robot

Reset angle, distance, and correction flags

check correction

Flag

Thread 1: Read Thread

Read sent byte

check byte

Read next byte

Store as current position angle to update toStore as distance

robot needs to travel

Read next byte

If = -1

If = 1

If = 5

Stop Robot in path

Read next byte

check byte

Store as angle robot needs to rotate

Read next byte

Store as angle robot needs to rotate

Stop Robot

Update to current position and correct

angle along path

Move forward

If = 8

If = -1

truefalse

When distance is reached

Page 23: Autonomous Robot Project Lauren Mitchell Ashley Francis

Summer Results

Robot reaches target point within two turns

Robot has reached the target when it is between 0 – 6 cm from point

Robot consistently follows path repeatedly Results Achieved

Page 24: Autonomous Robot Project Lauren Mitchell Ashley Francis

If we had more time…

Find a better tracking solution

Implement two-way communication

Add obstacles to course

Page 25: Autonomous Robot Project Lauren Mitchell Ashley Francis

Autonomous Robot Project

Lauren Mitchell

Ashley Francis