Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda...
Transcript of Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda...
![Page 1: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/1.jpg)
1© 2019 The MathWorks, Inc.
Infrared Sensor Basics and Robot Autonomy
Programming Using Simulink
By Jose Avendano
![Page 2: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/2.jpg)
2
Agenda
▪ Introduction to the BEST IR Sensor
▪ Sensor Applications
1. Object Detection
2. Line Detection
3. Motor Encoders
▪ Autonomy Integration
1. BEST SimBot
2. Joystick Triggering
3. Sequences of Commands
![Page 3: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/3.jpg)
3
BEST Robotics IR Sensor Kit
![Page 4: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/4.jpg)
4
BEST Robotics Infrared (IR) Sensor
▪ 2 Sensor components
Beam
Projection Area
Receiver
Field
Of
View
Transmitter Receiver
![Page 5: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/5.jpg)
5
Sensor Detections
1. IR Beam cannot be
obstructed
2. IR Beam must be within
detection distance
✔
X
X
![Page 6: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/6.jpg)
6
Sensor Testing
▪ Transmitter LED indicates power
▪ Receiver LED indicates detection of IR beam
IR Beam Broken (LED OFF)IR Beam Active (LED ON)
✔ X
![Page 7: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/7.jpg)
7
Sensor Sensitivity
▪ Adjust potentiometer to
change sensitivity
▪ Somewhere in the middle
(not either extreme) is the
highest sensitivity
![Page 8: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/8.jpg)
8
Sensor Sensitivity
![Page 9: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/9.jpg)
9
Sensor Application 1
Object Detection
![Page 10: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/10.jpg)
10
Object Detection
▪ Bouncing light from an object
▪ Place transmitter and receiver
facing in the same direction
▪ Reflected light will be detected
and indicate an object
✔ X
![Page 11: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/11.jpg)
11
Object Detection
![Page 12: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/12.jpg)
12
Simulink Example 1
Object Detection
![Page 13: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/13.jpg)
13
Simulink Example: Move Until Object is Detected
![Page 14: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/14.jpg)
14
Sensor Application 2
Line Following
![Page 15: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/15.jpg)
15
Line Detection
▪ Same as object detection, place
transmitter and receiver facing the
same direction
▪ Light will be reflected by bright
colored surfaces and absorbed by
dark surfaces
▪ Place the transmitter and receiver
strategically
▪ Make sure to calibrate the sensor
sensitivity
✔X
![Page 16: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/16.jpg)
16
Line Detection
![Page 17: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/17.jpg)
17
Line Following
![Page 18: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/18.jpg)
18
Simulink Example 2
Line Following
![Page 19: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/19.jpg)
19
Sensor Application 3
Wheel Encoders
![Page 20: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/20.jpg)
20
Motor/Wheel Encoders
▪ Place the transmitter and
receiver so the detection is
interrupted by a rotating
wheel
▪ Resolution of encoder
depends on number of
detections per rotation
▪ Use black paint and adjust
sensitivity to help reduce
false detections
![Page 21: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/21.jpg)
21
Motor/Wheel Encoders
▪ Derive distance traveled
with robot geometry
▪ Derive robot orientation
using multiple encoders
360°
123456789
![Page 22: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/22.jpg)
22
Simulink Example 3
Wheel Encoders
![Page 23: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/23.jpg)
23
Autonomy Integration
![Page 24: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/24.jpg)
24
Intro to SimBot
▪ Robot designed for teaching BEST workshops
▪ Built with BEST components
▪ Robot controller is a VEX Arm-Cortex
Microcontroller
![Page 25: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/25.jpg)
25
SimBot Components
A. 1 Servo Motor
B. 3 DC Motors
– Left Wheel
– Right Wheel
– Arm
C. 2 Contact switches
D. 2 Potentiometers
E. 1 InfraRed (IR) Sensor
A
C
B
E
D
![Page 26: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/26.jpg)
26
Fetching an object Autonomously
![Page 27: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/27.jpg)
27
Simulink Example 4
Trigger Autonomous Behavior
![Page 28: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/28.jpg)
28
Simulink Example 5
Sequencing Commands
![Page 29: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/29.jpg)
29
MathWorks Student Competitions
Mobile Robotics Tutorials
▪ Control of robot motion
▪ PID Controllers
▪ Line Following
▪ Obstacle Detection
▪ Path Navigation
![Page 30: Infrared Sensor and Autonomy Programming Using Simulink ...€¦ · By Jose Avendano. 2 Agenda Introduction to the BEST IR Sensor Sensor Applications 1. Object Detection 2. Line Detection](https://reader036.fdocuments.in/reader036/viewer/2022081615/5fd3cb7767161c22b16eba4a/html5/thumbnails/30.jpg)
30
Robot Autonomy and Control Webinar
▪ Intro to Robot Autonomy
▪ Motion Control
▪ Using VEX Sensors
▪ Control Algorithms
▪ Navigation Logic/State-Machines
▪ PID Control implementations