designing autonomous robotic systems with matlab and simulink€¦ · • connect matlab and...

26
1 © 2017 The MathWorks, Inc. Designing Autonomous Robotic Systems with MATLAB and Simulink Carlos Santacruz-Rosero, PhD Sr Application Engineer Robotics Pulkit Kapur Sr Industry Manager Robotics Trudy Rippel Account Management Team

Upload: others

Post on 18-Oct-2020

15 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Designing Autonomous Robotic Systems with MATLAB and Simulink€¦ · • Connect MATLAB and Simulink to ROS • Automatically generate C++ for ROS nodes Co-simulation with Gazebo

1© 2017 The MathWorks, Inc.

Designing Autonomous Robotic

Systems with MATLAB and Simulink

Carlos Santacruz-Rosero, PhD

Sr Application Engineer – Robotics

Pulkit Kapur

Sr Industry Manager – Robotics

Trudy Rippel

Account Management Team

Page 2: Designing Autonomous Robotic Systems with MATLAB and Simulink€¦ · • Connect MATLAB and Simulink to ROS • Automatically generate C++ for ROS nodes Co-simulation with Gazebo

2

Robotics Applications using MATLAB and Simulink

Autonomous Ground Robots Manipulator Arms

Visual Odometry Advanced Perception and Planning

Page 3: Designing Autonomous Robotic Systems with MATLAB and Simulink€¦ · • Connect MATLAB and Simulink to ROS • Automatically generate C++ for ROS nodes Co-simulation with Gazebo

3

Some challenges….

Applying Multidomain Expertise

Technical Depth and System Stability

IP Protection

End-to-End workflows

Complexity of Algorithms

Page 4: Designing Autonomous Robotic Systems with MATLAB and Simulink€¦ · • Connect MATLAB and Simulink to ROS • Automatically generate C++ for ROS nodes Co-simulation with Gazebo

4

Page 5: Designing Autonomous Robotic Systems with MATLAB and Simulink€¦ · • Connect MATLAB and Simulink to ROS • Automatically generate C++ for ROS nodes Co-simulation with Gazebo

5

Page 6: Designing Autonomous Robotic Systems with MATLAB and Simulink€¦ · • Connect MATLAB and Simulink to ROS • Automatically generate C++ for ROS nodes Co-simulation with Gazebo

6

Page 7: Designing Autonomous Robotic Systems with MATLAB and Simulink€¦ · • Connect MATLAB and Simulink to ROS • Automatically generate C++ for ROS nodes Co-simulation with Gazebo

7

Agenda

▪ Introduction

▪ Demo

▪ Conclusion

Page 8: Designing Autonomous Robotic Systems with MATLAB and Simulink€¦ · • Connect MATLAB and Simulink to ROS • Automatically generate C++ for ROS nodes Co-simulation with Gazebo

8

DemoPlatform

Perception

Control

Planning

Sense

Connect

Page 9: Designing Autonomous Robotic Systems with MATLAB and Simulink€¦ · • Connect MATLAB and Simulink to ROS • Automatically generate C++ for ROS nodes Co-simulation with Gazebo

9

C++ ROS node

Page 10: Designing Autonomous Robotic Systems with MATLAB and Simulink€¦ · • Connect MATLAB and Simulink to ROS • Automatically generate C++ for ROS nodes Co-simulation with Gazebo

10

Ground Vehicle Co-simulation with Gazebo

Page 11: Designing Autonomous Robotic Systems with MATLAB and Simulink€¦ · • Connect MATLAB and Simulink to ROS • Automatically generate C++ for ROS nodes Co-simulation with Gazebo

11

Modeling: Import CAD and URDF

Page 12: Designing Autonomous Robotic Systems with MATLAB and Simulink€¦ · • Connect MATLAB and Simulink to ROS • Automatically generate C++ for ROS nodes Co-simulation with Gazebo

12

MATLAB, Simulink, and ROS

MATLAB Code

SM Models

Built-in

algorithms

Robot

ROS node

Simulation

environment

Networking

Code Generation

ROS Bag import

Page 13: Designing Autonomous Robotic Systems with MATLAB and Simulink€¦ · • Connect MATLAB and Simulink to ROS • Automatically generate C++ for ROS nodes Co-simulation with Gazebo

13

Synthetic

data

Fusion & Tracking Algorithm Development Workflow

Logged

multi-sensor

data

Algorithm

Create new scenario or refine sensor model

Collect lab data

Refine algorithm

yes

no

Expected

Behavior

C Code

Generate code

Integrate

with embedded

environment

Page 14: Designing Autonomous Robotic Systems with MATLAB and Simulink€¦ · • Connect MATLAB and Simulink to ROS • Automatically generate C++ for ROS nodes Co-simulation with Gazebo

14

Humanoid Simulation

Page 15: Designing Autonomous Robotic Systems with MATLAB and Simulink€¦ · • Connect MATLAB and Simulink to ROS • Automatically generate C++ for ROS nodes Co-simulation with Gazebo

15

Planning and Control for Ground Robots

Page 16: Designing Autonomous Robotic Systems with MATLAB and Simulink€¦ · • Connect MATLAB and Simulink to ROS • Automatically generate C++ for ROS nodes Co-simulation with Gazebo

16

Integrate with common robotics frameworks

• Import and filter ROS

bags

• Connect MATLAB and

Simulink to ROS

• Automatically generate

C++ for ROS nodes

Co-simulation with Gazebo (CAT Vehicle Simulator) Clear separation between your algorithm

and the middleware/hardware

Page 17: Designing Autonomous Robotic Systems with MATLAB and Simulink€¦ · • Connect MATLAB and Simulink to ROS • Automatically generate C++ for ROS nodes Co-simulation with Gazebo

17Path Tracking for Unmanned Ground Vehicle

Page 18: Designing Autonomous Robotic Systems with MATLAB and Simulink€¦ · • Connect MATLAB and Simulink to ROS • Automatically generate C++ for ROS nodes Co-simulation with Gazebo

18

Robot SimulationLow-Level ControlRobotics Algorithm

Pure Pursuit with UGV: Multi-domain simulation

Page 19: Designing Autonomous Robotic Systems with MATLAB and Simulink€¦ · • Connect MATLAB and Simulink to ROS • Automatically generate C++ for ROS nodes Co-simulation with Gazebo

19

Underwater Vehicle Co-simulation with UWsim

Page 20: Designing Autonomous Robotic Systems with MATLAB and Simulink€¦ · • Connect MATLAB and Simulink to ROS • Automatically generate C++ for ROS nodes Co-simulation with Gazebo

20

UAV Co-simulation with Gazebo

Page 21: Designing Autonomous Robotic Systems with MATLAB and Simulink€¦ · • Connect MATLAB and Simulink to ROS • Automatically generate C++ for ROS nodes Co-simulation with Gazebo

21

Integrate Robotics Algorithms

MATLAB

Runtime

C, C++ HDL PLC

Embedded Hardware

C/C++ ++ExcelAdd-in Java

Hadoop/Spark

.NETMATLAB

ProductionServer

StandaloneApplication

Enterprise Systems

Python

Page 22: Designing Autonomous Robotic Systems with MATLAB and Simulink€¦ · • Connect MATLAB and Simulink to ROS • Automatically generate C++ for ROS nodes Co-simulation with Gazebo

22

Apps: Ground Truth Labeler

Why?

1. Verifying Algorithms

2. Training Classifiers

Page 23: Designing Autonomous Robotic Systems with MATLAB and Simulink€¦ · • Connect MATLAB and Simulink to ROS • Automatically generate C++ for ROS nodes Co-simulation with Gazebo

23

Perception with MATLAB

New App for

Ground Truth

Labeling

Label pixels

and regions for

semantic

segmentation

Caffe model

importer

LSTM (time series, text)

DAG Networks

Library of

pretrained

models

Multi-GPUs in

parallel

Optimized GPU

code

Training plots

NEW

PRODUCT:

GPU Coder-

Convert to

NVIDIA CUDA

code

Deploy / ShareTrain / PredictModelsData

“How do I label

my data?”

“How do I access

the latest models?”

“How do I make training

and prediction faster?”

“How do I deploy

my new model?”

Page 24: Designing Autonomous Robotic Systems with MATLAB and Simulink€¦ · • Connect MATLAB and Simulink to ROS • Automatically generate C++ for ROS nodes Co-simulation with Gazebo

24

Key Takeaways

▪ 1. Productivity increased through an interactive environment to

prototype, develop, debug, and implement algorithms in robotics.

▪ 2. Model-Based Design for motion control systems allows early

verification of requirements, production code generation, and

continuous testing.

Page 25: Designing Autonomous Robotic Systems with MATLAB and Simulink€¦ · • Connect MATLAB and Simulink to ROS • Automatically generate C++ for ROS nodes Co-simulation with Gazebo

25

Takeaways

▪ Workflows in robotics design and simulation, perception, planning, and controls.

▪ Meet us in San Jose during MATLAB EXPO (November 7th)

▪ ROS, ROS 2.0 and DDS support

▪ Image Processing and Computer Vision

▪ Machine Learning

▪ Deep Learning

▪ Path Planning

▪ SLAM

▪ Sensor Models and Sensor Fusion

▪ FDA Software Validation

▪ Ground truth labeling with LiDAR and Vision

▪ 3D Simulation with Physics

▪ Real-time support

▪ Code-generation for C/C++/CUDA/HDL/PLC

Page 26: Designing Autonomous Robotic Systems with MATLAB and Simulink€¦ · • Connect MATLAB and Simulink to ROS • Automatically generate C++ for ROS nodes Co-simulation with Gazebo

26

% Thank you