matlab meets mindstorms · matlab meets mindstorms how to control lego nxt robots using matlab for...
TRANSCRIPT
MATLAB meets Mindstorms How to control Lego NXT robots using Matlab for educational purposes
Dorian Schneider
Institute of Image Processing & Computer Vision
RWTH Aachen
MATLAB meets Mindstorms
How to control Lego NXT robots using Matlab for educational purposes 2
Controls Image &
Video Processing Robotics
Signal Processing Instrumentation
MATLAB/SIMULINK SUPPORT FOR LOW-COST HARDWARE
MATLAB meets Mindstorms
How to control Lego NXT robots using Matlab for educational purposes 3
MATLAB meets Mindstorms
How to control Lego NXT robots using Matlab for educational purposes 4
MATLAB MEETS MINDSTORMS 1/2
Each NXT can control 3 servo motors
interact with 4 sensors
MATLAB meets Mindstorms
How to control Lego NXT robots using Matlab for educational purposes 5
MATLAB MEETS MINDSTORMS 2/2
Each NXT can control 3 servo motors
interact with 4 sensors
MATLAB meets Mindstorms
How to control Lego NXT robots using Matlab for educational purposes 6
MATLAB MEETS MINDSTORMS 2/2
Each NXT can control 3 servo motors
interact with 4 sensors
Variety of sensors
pressure
light
sound
ultrasonic
gyro compass IR
RGB acceleration distance
MATLAB meets Mindstorms
How to control Lego NXT robots using Matlab for educational purposes 7
MATLAB MEETS MINDSTORMS MEETS EE FRESHMEN 1/2
500 EE freshmen students each year @ RWTH Aachen University
First semester syllabus is packed with prosaic content Higher Mathematics
Electrical Engineering I
Physics I
Computer Science I
Discrete Signal Processing I
How to keep students motivated? Need for motivation of syllabus content
Need for good delivery of programming skills
Need for hands-on real-world experiences
Need for team-work and soft skills
MATLAB meets Mindstorms
How to control Lego NXT robots using Matlab for educational purposes 8
MATLAB MEETS MINDSTORMS MEETS EE FRESHMEN 2/2
RWTH EE freshmen project 9 days full-time programming and experimenting
500 students at the same time, distributed among all institutes
RWTH Lego Mindstorms NXT Toolbox for Matlab
Behrens et. al., “MATLAB Meets LEGO Mindstorms - A Freshman Introduction Course
Into Practical Engineering”, IEEE Transactions on Education, Vol. 53, Issue 2, 2010
Mindstorms NXT Toolbox Let‘s get started!
• Toolbox installation
• Establishing a connection
• Read sensors
• Control motors
• Robot application
What we are going to do
LIVE IN-MATLAB (4 Min)
Demonstrate how to download the Toolbox (TB)
Installation of the TB into the Matlab path
First USB connection to NXT
First Bluetooth connection to NXT
Hello World: Play_Tone
MATLAB meets Mindstorms
How to control Lego NXT robots using Matlab for educational purposes 10
Live IN-MATLAB (5 Min)
Handle the pressure sensor
Handle the light sensor
Handle the sound sensor
Handle the ultrasonic sensor
MATLAB meets Mindstorms
How to control Lego NXT robots using Matlab for educational purposes 11
Mindstorms NXT Toolbox Reading the Sensors
• Check if the pressure sensor is pushed
• Record sound from the sound sensor
• Get in touch with the light sensor
• Measure distances using the Ultrasonic sensor
What we are going to do
Mindstorms NXT Toolbox Controlling the Motors
• How to create a new motor object
• How to control speed, distance and actions when stoping
• How to synchronize motors
What we are going to do
Live IN-MATLAB (6 Min)
Introduction to the motor class
Explication of different operator modes and options
Short annotations to „motorControl“
MATLAB meets Mindstorms
How to control Lego NXT robots using Matlab for educational purposes 14
Live IN-MATLAB (5 Min)
Put it all together: our first useful robot
Robot who is trapped in box with only one exit
Robot scans environment
Finds exit using basic signal processing
Rotates towards exit
Drives forward to exit the box
MATLAB meets Mindstorms
How to control Lego NXT robots using Matlab for educational purposes 15