Line following using camera in webots · LINE FOLLOWING USING CAMERA IN WEBOTS S.I.S P4....

13
MATHIEU VERITER & FLAVIE MIALON LINE FOLLOWING USING CAMERA IN WEBOTS S.I.S P4

Transcript of Line following using camera in webots · LINE FOLLOWING USING CAMERA IN WEBOTS S.I.S P4....

Page 1: Line following using camera in webots · LINE FOLLOWING USING CAMERA IN WEBOTS S.I.S P4. PROBLEMATIC •Make an e-puck robot :-follow a line-turn at a T-Shape-avoid obstacles •Use

M A T H I E U V E R I T E R & F L A V I E M I A L O N

LINE FOLLOWING USING

CAMERA IN WEBOTS

S.I.S P4

Page 2: Line following using camera in webots · LINE FOLLOWING USING CAMERA IN WEBOTS S.I.S P4. PROBLEMATIC •Make an e-puck robot :-follow a line-turn at a T-Shape-avoid obstacles •Use

PROBLEMATIC

• Make an e-puck robot :

- follow a line

- turn at a T-Shape

- avoid obstacles

• Use the Webot dedicated program to code and run the

model simulation using multiple scenarios.

• Additional feature : recognise if the robot arrives

perpendicularly to the line or meets a cross section.

2

Page 3: Line following using camera in webots · LINE FOLLOWING USING CAMERA IN WEBOTS S.I.S P4. PROBLEMATIC •Make an e-puck robot :-follow a line-turn at a T-Shape-avoid obstacles •Use

METHOD

IDEAS

• Initial

settings

• Braitenberg

structure

TRY

• Hierarchy

• Initial

conditions

• Robot

reactions

OPTIMIZE• Run model

• Observe

difficulties

3

Page 4: Line following using camera in webots · LINE FOLLOWING USING CAMERA IN WEBOTS S.I.S P4. PROBLEMATIC •Make an e-puck robot :-follow a line-turn at a T-Shape-avoid obstacles •Use

INITIAL SETTINGS

• Get_device and enable : 8 IR sensors + 1 camera

• Variables: local and global

• Convert image into greyscale matrix

• Define states

Values from 0 to 256

4

Page 5: Line following using camera in webots · LINE FOLLOWING USING CAMERA IN WEBOTS S.I.S P4. PROBLEMATIC •Make an e-puck robot :-follow a line-turn at a T-Shape-avoid obstacles •Use

CONDITIONS

• Limit sensor value : 150

• Camera Field of View : 1.7

• Initial speed : 400

• Time Step : 64

• Braitenbergs’s coefficients

5

Page 6: Line following using camera in webots · LINE FOLLOWING USING CAMERA IN WEBOTS S.I.S P4. PROBLEMATIC •Make an e-puck robot :-follow a line-turn at a T-Shape-avoid obstacles •Use

STEP SEQUENCE

1. Analyze the matrix

2. Check for obstacles

3. Follow the line

4. Actuate wheel speed

-> check for black pixels

-> if yes initiate avoidance

-> adjust the direction to

be centered

Analyze environment

React and Adapt (while)

New Wheel Speed

6

Page 7: Line following using camera in webots · LINE FOLLOWING USING CAMERA IN WEBOTS S.I.S P4. PROBLEMATIC •Make an e-puck robot :-follow a line-turn at a T-Shape-avoid obstacles •Use

STATES

0 – search line

1 – follow line

2 – 180° turn

3 – obstacle

4 – perpendicular

5 – cross section

6 – board side

7 – right angle

8 – right side object

9 – back right

10 – left angle

11 – back left

12 – left side object

• At the beginning of the main

loop we check in which state

we should go

• To help, we use an oldstate

variable and other parameters

7

Page 8: Line following using camera in webots · LINE FOLLOWING USING CAMERA IN WEBOTS S.I.S P4. PROBLEMATIC •Make an e-puck robot :-follow a line-turn at a T-Shape-avoid obstacles •Use

LINE FOLLOWING

r – b + b/2

position of the center of the segment detected

Image Size : 52 x 39 px

8

position of last black pixel detected

1 segment considered

Page 9: Line following using camera in webots · LINE FOLLOWING USING CAMERA IN WEBOTS S.I.S P4. PROBLEMATIC •Make an e-puck robot :-follow a line-turn at a T-Shape-avoid obstacles •Use

Facing the line

4 aligned points activated

Cross Section

7 cross points activated

can also be the sides if diagonal

T-end-of-line

5 points activated

9

Page 10: Line following using camera in webots · LINE FOLLOWING USING CAMERA IN WEBOTS S.I.S P4. PROBLEMATIC •Make an e-puck robot :-follow a line-turn at a T-Shape-avoid obstacles •Use

OBSTACLE AVOIDANCE

• Front detection

• Adapt

- angle -> turn right/left

- side-following

- new angle -> turn back right/left

• Check if too close

• Find line again

10

Page 11: Line following using camera in webots · LINE FOLLOWING USING CAMERA IN WEBOTS S.I.S P4. PROBLEMATIC •Make an e-puck robot :-follow a line-turn at a T-Shape-avoid obstacles •Use

PROBLEMS

• Hierarchy

• Cross Section Recognition

• Oldstate actualisation

• Simulation speed

• Shadows

11

Page 12: Line following using camera in webots · LINE FOLLOWING USING CAMERA IN WEBOTS S.I.S P4. PROBLEMATIC •Make an e-puck robot :-follow a line-turn at a T-Shape-avoid obstacles •Use

RESULTS

12

Page 13: Line following using camera in webots · LINE FOLLOWING USING CAMERA IN WEBOTS S.I.S P4. PROBLEMATIC •Make an e-puck robot :-follow a line-turn at a T-Shape-avoid obstacles •Use

CONCLUSION

13

- Configuration issues

- Conditions varability

- Complex global organization

IMPROVEMENTS : - optimization (order, functions)

- line color