developing robotics applications with matlab, simulink ... · 4 using matlab and simulink for...
TRANSCRIPT
![Page 1: Developing Robotics Applications with MATLAB, Simulink ... · 4 Using MATLAB and Simulink for “Building Robots” High number of DoF Nonlinearity Multiple Layers of Control Multiple](https://reader037.vdocuments.site/reader037/viewer/2022100218/5c16c2c909d3f252588d31aa/html5/thumbnails/1.jpg)
1© 2016 MathWorks, Inc.
Developing Robotics Applications
with MATLAB, Simulink:
Introducing the
Robotics System Toolbox
![Page 2: Developing Robotics Applications with MATLAB, Simulink ... · 4 Using MATLAB and Simulink for “Building Robots” High number of DoF Nonlinearity Multiple Layers of Control Multiple](https://reader037.vdocuments.site/reader037/viewer/2022100218/5c16c2c909d3f252588d31aa/html5/thumbnails/2.jpg)
2
What Are You Doing with Robotics?
Build
Robots
![Page 3: Developing Robotics Applications with MATLAB, Simulink ... · 4 Using MATLAB and Simulink for “Building Robots” High number of DoF Nonlinearity Multiple Layers of Control Multiple](https://reader037.vdocuments.site/reader037/viewer/2022100218/5c16c2c909d3f252588d31aa/html5/thumbnails/3.jpg)
3
Using MATLAB and Simulink for “Building Robots”
Plant
Recorded Webinar: How a Differential Equation Becomes a Robot
Controller+
-
Input Output
Festo Bionic Arm DLR Humanoid Robot
![Page 4: Developing Robotics Applications with MATLAB, Simulink ... · 4 Using MATLAB and Simulink for “Building Robots” High number of DoF Nonlinearity Multiple Layers of Control Multiple](https://reader037.vdocuments.site/reader037/viewer/2022100218/5c16c2c909d3f252588d31aa/html5/thumbnails/4.jpg)
4
Using MATLAB and Simulink for “Building Robots”
High number of DoF
Nonlinearity
Multiple Layers of Control
Multiple States or Modes
Demo
![Page 5: Developing Robotics Applications with MATLAB, Simulink ... · 4 Using MATLAB and Simulink for “Building Robots” High number of DoF Nonlinearity Multiple Layers of Control Multiple](https://reader037.vdocuments.site/reader037/viewer/2022100218/5c16c2c909d3f252588d31aa/html5/thumbnails/5.jpg)
5
What Are You Doing with Robotics?
Teach/Learn
Robotics
With
Low Cost hardware
Build
Robots
Arduino
Raspberry Pi
Lego
![Page 6: Developing Robotics Applications with MATLAB, Simulink ... · 4 Using MATLAB and Simulink for “Building Robots” High number of DoF Nonlinearity Multiple Layers of Control Multiple](https://reader037.vdocuments.site/reader037/viewer/2022100218/5c16c2c909d3f252588d31aa/html5/thumbnails/6.jpg)
6
Robotics with Low Cost Hardware:
Hardware Support Package
• No need C/C++/Python
• Drivers Provided
Build Robots with Low-Cost Hardware?
Visit:
www.mathworks.com/hardware
Free LAB workbooks
![Page 7: Developing Robotics Applications with MATLAB, Simulink ... · 4 Using MATLAB and Simulink for “Building Robots” High number of DoF Nonlinearity Multiple Layers of Control Multiple](https://reader037.vdocuments.site/reader037/viewer/2022100218/5c16c2c909d3f252588d31aa/html5/thumbnails/7.jpg)
7
Robotics with Low Cost Hardware:
![Page 8: Developing Robotics Applications with MATLAB, Simulink ... · 4 Using MATLAB and Simulink for “Building Robots” High number of DoF Nonlinearity Multiple Layers of Control Multiple](https://reader037.vdocuments.site/reader037/viewer/2022100218/5c16c2c909d3f252588d31aa/html5/thumbnails/8.jpg)
8
What Are You Doing with Robotics?
Teach/Learn
Robotics
With
Low Cost hardware
Build
Robots
Arduino
Raspberry Pi
Lego
Teach/Learn Robotics
With
More powerful hardware
?
![Page 9: Developing Robotics Applications with MATLAB, Simulink ... · 4 Using MATLAB and Simulink for “Building Robots” High number of DoF Nonlinearity Multiple Layers of Control Multiple](https://reader037.vdocuments.site/reader037/viewer/2022100218/5c16c2c909d3f252588d31aa/html5/thumbnails/9.jpg)
9
What Are You Doing with Robotics?
Teach/Learn
Robotics
With
Low Cost hardware
Build
Robots
Arduino
Raspberry Pi
Lego
Teach/Learn Robotics
With
More powerful hardware
ROS/Gazebo Interface
ROS Node Generation
Comprehensive Algorithms
Use Powerful Robots Running ROS?
Robotics System Toolbox
![Page 10: Developing Robotics Applications with MATLAB, Simulink ... · 4 Using MATLAB and Simulink for “Building Robots” High number of DoF Nonlinearity Multiple Layers of Control Multiple](https://reader037.vdocuments.site/reader037/viewer/2022100218/5c16c2c909d3f252588d31aa/html5/thumbnails/10.jpg)
10
What do we want to do today?
![Page 11: Developing Robotics Applications with MATLAB, Simulink ... · 4 Using MATLAB and Simulink for “Building Robots” High number of DoF Nonlinearity Multiple Layers of Control Multiple](https://reader037.vdocuments.site/reader037/viewer/2022100218/5c16c2c909d3f252588d31aa/html5/thumbnails/11.jpg)
11
Agenda
1. MATLAB-ROS Interface
2. Robotics Algorithms
3. Simulink-ROS Interface
Robotics
System
Toolbox
![Page 12: Developing Robotics Applications with MATLAB, Simulink ... · 4 Using MATLAB and Simulink for “Building Robots” High number of DoF Nonlinearity Multiple Layers of Control Multiple](https://reader037.vdocuments.site/reader037/viewer/2022100218/5c16c2c909d3f252588d31aa/html5/thumbnails/12.jpg)
12
What Can You Do with Robotics System Toolbox?
?
Robot
![Page 13: Developing Robotics Applications with MATLAB, Simulink ... · 4 Using MATLAB and Simulink for “Building Robots” High number of DoF Nonlinearity Multiple Layers of Control Multiple](https://reader037.vdocuments.site/reader037/viewer/2022100218/5c16c2c909d3f252588d31aa/html5/thumbnails/13.jpg)
13
Topics
Services
ROS Node(s) /topic
Data Exchange Paradigms
ROS Node(s)Publish Subscribe
ROS NodeRequest
Response
ROS Node(s)Service
Server Clients
![Page 14: Developing Robotics Applications with MATLAB, Simulink ... · 4 Using MATLAB and Simulink for “Building Robots” High number of DoF Nonlinearity Multiple Layers of Control Multiple](https://reader037.vdocuments.site/reader037/viewer/2022100218/5c16c2c909d3f252588d31aa/html5/thumbnails/14.jpg)
14
Ethernet
Main CPU
Developing Robotic Applications with ROS
Kinematics& Control
MATLAB
Image
processing
Localization &
Mapping
Simulink
Map server
Local
Planner
Global
Planner
NODE NODE NODE
NODE NODE NODE
NODE
NODE
Sensors
Robot (CPU 2)
NODE
NODE
NODENODE
Actuators
T6
![Page 15: Developing Robotics Applications with MATLAB, Simulink ... · 4 Using MATLAB and Simulink for “Building Robots” High number of DoF Nonlinearity Multiple Layers of Control Multiple](https://reader037.vdocuments.site/reader037/viewer/2022100218/5c16c2c909d3f252588d31aa/html5/thumbnails/15.jpg)
15
The essentials: ROS communication
>> rosshutdown( )
>> rosinit( )
>> rosnode( )
>> rostopic( )
>> rosmsg( )
>> rossubscriber( )
– >> receive( )
>> rospublisher( )
– >> rosmessage( )
– >> send( )
>> robotics.ros.Node ( )
Listening
Broadcasting
What’s there ?
What can we communicate about ?
Shutdown or start global MATLAB node
Connect to existing ROS master
Connect to multiple ROS masters
![Page 16: Developing Robotics Applications with MATLAB, Simulink ... · 4 Using MATLAB and Simulink for “Building Robots” High number of DoF Nonlinearity Multiple Layers of Control Multiple](https://reader037.vdocuments.site/reader037/viewer/2022100218/5c16c2c909d3f252588d31aa/html5/thumbnails/16.jpg)
16
MATLAB ROS connectivity: Demo
1. The MATLAB ROS interface – part 1
– Practice on a MATLAB Robotic simulator
2. The MATLAB ROS interface – part 2
– Practice on a GAZEBO Robotic simulator
(Turtlebot)
– A “teaser” on algorithm development
3. Processing ROS bag files
![Page 17: Developing Robotics Applications with MATLAB, Simulink ... · 4 Using MATLAB and Simulink for “Building Robots” High number of DoF Nonlinearity Multiple Layers of Control Multiple](https://reader037.vdocuments.site/reader037/viewer/2022100218/5c16c2c909d3f252588d31aa/html5/thumbnails/17.jpg)
17
Agenda
1. MATLAB-ROS Interface
2. Robotics Algorithms
3. Simulink-ROS Interface
Demo
![Page 18: Developing Robotics Applications with MATLAB, Simulink ... · 4 Using MATLAB and Simulink for “Building Robots” High number of DoF Nonlinearity Multiple Layers of Control Multiple](https://reader037.vdocuments.site/reader037/viewer/2022100218/5c16c2c909d3f252588d31aa/html5/thumbnails/18.jpg)
18
MATLAB Algorithm development : Demo
1. Path planning and Pure pursuit controller – part 1
– Practice on a MATLAB Robotic simulator
2. Path planning and Pure pursuit controller – part 2
– Practice on a GAZEBO Robotic simulator
![Page 19: Developing Robotics Applications with MATLAB, Simulink ... · 4 Using MATLAB and Simulink for “Building Robots” High number of DoF Nonlinearity Multiple Layers of Control Multiple](https://reader037.vdocuments.site/reader037/viewer/2022100218/5c16c2c909d3f252588d31aa/html5/thumbnails/19.jpg)
19
Overview: Robotics Algorithms
Test it with Gazebo or other Simulator through MATLAB-ROS Interface
![Page 20: Developing Robotics Applications with MATLAB, Simulink ... · 4 Using MATLAB and Simulink for “Building Robots” High number of DoF Nonlinearity Multiple Layers of Control Multiple](https://reader037.vdocuments.site/reader037/viewer/2022100218/5c16c2c909d3f252588d31aa/html5/thumbnails/20.jpg)
20
Overview: Robotics Algorithms
Test it with a physical ROS-Enabled robot
Turtlebot_IP = ‘XXX.XXX.XXX.XXX'
rosinit(Turtlebot_IP, 'NodeHost', my_laptop_IP, ...
'NodeName', my_name_for_global_MATLAB_node);
![Page 21: Developing Robotics Applications with MATLAB, Simulink ... · 4 Using MATLAB and Simulink for “Building Robots” High number of DoF Nonlinearity Multiple Layers of Control Multiple](https://reader037.vdocuments.site/reader037/viewer/2022100218/5c16c2c909d3f252588d31aa/html5/thumbnails/21.jpg)
21
Agenda
1. MATLAB-ROS Interface
2. Robotics Algorithms
3. Simulink-ROS Interface
![Page 22: Developing Robotics Applications with MATLAB, Simulink ... · 4 Using MATLAB and Simulink for “Building Robots” High number of DoF Nonlinearity Multiple Layers of Control Multiple](https://reader037.vdocuments.site/reader037/viewer/2022100218/5c16c2c909d3f252588d31aa/html5/thumbnails/22.jpg)
22
Generate a ROS Node from a Simulink Model
• Connect Simulink Model to a ROS network to simulate a Goal
tracking algorithm
![Page 23: Developing Robotics Applications with MATLAB, Simulink ... · 4 Using MATLAB and Simulink for “Building Robots” High number of DoF Nonlinearity Multiple Layers of Control Multiple](https://reader037.vdocuments.site/reader037/viewer/2022100218/5c16c2c909d3f252588d31aa/html5/thumbnails/23.jpg)
23
Prototype algorithm
in Simulink
Test algorithm
with a ROS-enabled
Simulator or Robot
Generate a
standalone ROS
node from
Simulink
Simulink Algorithm development and DEPLOYMENT : Demo
![Page 24: Developing Robotics Applications with MATLAB, Simulink ... · 4 Using MATLAB and Simulink for “Building Robots” High number of DoF Nonlinearity Multiple Layers of Control Multiple](https://reader037.vdocuments.site/reader037/viewer/2022100218/5c16c2c909d3f252588d31aa/html5/thumbnails/24.jpg)
24
DOC
“ How do I create
custom messages ?”
![Page 25: Developing Robotics Applications with MATLAB, Simulink ... · 4 Using MATLAB and Simulink for “Building Robots” High number of DoF Nonlinearity Multiple Layers of Control Multiple](https://reader037.vdocuments.site/reader037/viewer/2022100218/5c16c2c909d3f252588d31aa/html5/thumbnails/25.jpg)
25
DOC
“ How do I access the tf
Transformation tree in
ROS?”
![Page 26: Developing Robotics Applications with MATLAB, Simulink ... · 4 Using MATLAB and Simulink for “Building Robots” High number of DoF Nonlinearity Multiple Layers of Control Multiple](https://reader037.vdocuments.site/reader037/viewer/2022100218/5c16c2c909d3f252588d31aa/html5/thumbnails/26.jpg)
26
Key Capabilities Demonstrated
MATLAB-ROS Interface
– Create a ROS nodes, publishers, subscribers, services
– Design and test robotics algorithms on a robot
simulator such as Gazebo
– Test robotics algorithms on a physical robot
– Import rosbag log files
Simulink-ROS Interface
– Publish and Subscribe from Simulink Models
– ROS node generation from Simulink models
Algorithms
– Map representation with Binary Occupancy Grids
– Path Planning with Probabilistic Roadmap
– Path Tracking with Pure Pursuit Controller
– Coordinate System Transformations
Robotics
System
Toolbox
![Page 27: Developing Robotics Applications with MATLAB, Simulink ... · 4 Using MATLAB and Simulink for “Building Robots” High number of DoF Nonlinearity Multiple Layers of Control Multiple](https://reader037.vdocuments.site/reader037/viewer/2022100218/5c16c2c909d3f252588d31aa/html5/thumbnails/27.jpg)
27
Thank You