line following using camera in webots · line following using camera in webots s.i.s p4....
TRANSCRIPT
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
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
METHOD
IDEAS
• Initial
settings
• Braitenberg
structure
TRY
• Hierarchy
• Initial
conditions
• Robot
reactions
OPTIMIZE• Run model
• Observe
difficulties
3
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
CONDITIONS
• Limit sensor value : 150
• Camera Field of View : 1.7
• Initial speed : 400
• Time Step : 64
• Braitenbergs’s coefficients
5
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
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
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
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
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
PROBLEMS
• Hierarchy
• Cross Section Recognition
• Oldstate actualisation
• Simulation speed
• Shadows
11
RESULTS
12
CONCLUSION
13
- Configuration issues
- Conditions varability
- Complex global organization
IMPROVEMENTS : - optimization (order, functions)
- line color