Top Banner
1 © 2014 The MathWorks, Inc. ROS Support from MATLAB ROSCon Chicago September 2014 Ren Sang Nah Yanliang Zhang Remo Pillat
19

ROS Support from MATLAB · 3 MATLAB ROS I/O Package A Downloadable MATLAB Add-On MATLAB based API for interacting with ROS Create ROS nodes directly in MATLAB Exchange data via publishers

Apr 29, 2018

Download

Documents

lengoc
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: ROS Support from MATLAB · 3 MATLAB ROS I/O Package A Downloadable MATLAB Add-On MATLAB based API for interacting with ROS Create ROS nodes directly in MATLAB Exchange data via publishers

1© 2014 The MathWorks, Inc.

ROS Support from MATLAB

ROSCon Chicago

September 2014

Ren Sang Nah

Yanliang Zhang

Remo Pillat

Page 2: ROS Support from MATLAB · 3 MATLAB ROS I/O Package A Downloadable MATLAB Add-On MATLAB based API for interacting with ROS Create ROS nodes directly in MATLAB Exchange data via publishers

2

Agenda

Introduction

Motivations

Key features

Demonstrations

Page 3: ROS Support from MATLAB · 3 MATLAB ROS I/O Package A Downloadable MATLAB Add-On MATLAB based API for interacting with ROS Create ROS nodes directly in MATLAB Exchange data via publishers

3

MATLAB ROS I/O PackageA Downloadable MATLAB Add-On

MATLAB based API for interacting with ROS

Create ROS nodes directly in MATLAB

Exchange data via publishers and subscribers

Capable of launching ROS core to create a standalone ROS network within MATLAB

Examples for working with TurtleBot and Gazebo

Available for R2012b, R2013a, R2013b, and R2014a

Supports Windows, Linux, and Mac OS X

Page 4: ROS Support from MATLAB · 3 MATLAB ROS I/O Package A Downloadable MATLAB Add-On MATLAB based API for interacting with ROS Create ROS nodes directly in MATLAB Exchange data via publishers

4

MATLAB in Robotics

A powerful tool for:

• Data processing & visualization

• Algorithm design & prototyping

Commercialand

Academia

Page 5: ROS Support from MATLAB · 3 MATLAB ROS I/O Package A Downloadable MATLAB Add-On MATLAB based API for interacting with ROS Create ROS nodes directly in MATLAB Exchange data via publishers

5

ROS a State of the Art Robotics Developer Tools

Algorithm Libraries

Point Cloud

Library

Ethernet

CPU2

Main CPU

Kinematics

& Control

Your

Algorithm

Image

Processing

Localization &

Mapping

Visual SLAM

Map Server

Local

Planner

Global

Planner

NODE NODE NODE

NODE NODE NODE

NODE

NODE

Motion Planning

Library

Message Exchange

Distributed “Nodes”

Hardware Drivers

Page 6: ROS Support from MATLAB · 3 MATLAB ROS I/O Package A Downloadable MATLAB Add-On MATLAB based API for interacting with ROS Create ROS nodes directly in MATLAB Exchange data via publishers

6

The MATLAB

ROS Gap

Hand convert

to ROS node

Page 7: ROS Support from MATLAB · 3 MATLAB ROS I/O Package A Downloadable MATLAB Add-On MATLAB based API for interacting with ROS Create ROS nodes directly in MATLAB Exchange data via publishers

7

With MATLAB ROS I/O Package

Algorithm Libraries

Point Cloud

Library

Ethernet

CPU2

Main CPU

Kinematics& Control

Your

algorithm

Image pre-

processing

Localization &

Mapping

Visual SLAM

Map server

Local

Planner

Global

Planner

NODE NODE NODE

NODE NODE NODE

NODE

NODE

Motion Planning

Library

Message Exchange

Distributed “Nodes”

Hardware Drivers

Page 8: ROS Support from MATLAB · 3 MATLAB ROS I/O Package A Downloadable MATLAB Add-On MATLAB based API for interacting with ROS Create ROS nodes directly in MATLAB Exchange data via publishers

8

Process

Data

Data Files

Visualize and

Analyze

MATLAB ROS I/O Package

Design and

Test

MATLAB

Interact with

Real Robot

Interact with

Simulator

MATLAB ROS I/O Package

Page 9: ROS Support from MATLAB · 3 MATLAB ROS I/O Package A Downloadable MATLAB Add-On MATLAB based API for interacting with ROS Create ROS nodes directly in MATLAB Exchange data via publishers

9

Key Capabilities

Accelerate creation of ROS-based applications

Allow developers to

– Focus on developing the algorithm

– Prove concepts against ROS-enabled robots effortlessly

Useful for:

– Interactive exploration of ROS messages

– Interfacing with ROS-based simulators

– Interfacing with ROS-based robots

Page 10: ROS Support from MATLAB · 3 MATLAB ROS I/O Package A Downloadable MATLAB Add-On MATLAB based API for interacting with ROS Create ROS nodes directly in MATLAB Exchange data via publishers

10

Interactive Exploration of Robot Data

ROS Node

Kinect

ROS Node

Motors/Sensors

ROS Node

VICON Camera

ROS Node

Explore ROS messages from

the MATLAB command line

Page 11: ROS Support from MATLAB · 3 MATLAB ROS I/O Package A Downloadable MATLAB Add-On MATLAB based API for interacting with ROS Create ROS nodes directly in MATLAB Exchange data via publishers

11

Interfacing with Simulator

Gazebo is a 3D robot simulator commonly used with ROS

Page 12: ROS Support from MATLAB · 3 MATLAB ROS I/O Package A Downloadable MATLAB Add-On MATLAB based API for interacting with ROS Create ROS nodes directly in MATLAB Exchange data via publishers

12

Interfacing with Real Robot

Page 13: ROS Support from MATLAB · 3 MATLAB ROS I/O Package A Downloadable MATLAB Add-On MATLAB based API for interacting with ROS Create ROS nodes directly in MATLAB Exchange data via publishers

13

Demonstration

Algorithm must detect a ball within robot camera view

Robot must maintain a constant distance from the ball

Image processing and motion control are all performed in MATLAB

Page 14: ROS Support from MATLAB · 3 MATLAB ROS I/O Package A Downloadable MATLAB Add-On MATLAB based API for interacting with ROS Create ROS nodes directly in MATLAB Exchange data via publishers

14

Workflow Overview

Explore Robot

Interface

Develop

Algorithm

Test and Tune

in Simulator

Test and Refine

on Real Robot

Page 15: ROS Support from MATLAB · 3 MATLAB ROS I/O Package A Downloadable MATLAB Add-On MATLAB based API for interacting with ROS Create ROS nodes directly in MATLAB Exchange data via publishers

15

Tuning a Ball Tracking Algorithm

Page 16: ROS Support from MATLAB · 3 MATLAB ROS I/O Package A Downloadable MATLAB Add-On MATLAB based API for interacting with ROS Create ROS nodes directly in MATLAB Exchange data via publishers

16

Demo Setup

ROS Network for the

Teleoperated Robot

Monitor

Node

Ball Tracker

Node

ROS Android

Sensor Driver

Robot Steering

Node

ROS Network for the

Ball Tracking Robot

Page 17: ROS Support from MATLAB · 3 MATLAB ROS I/O Package A Downloadable MATLAB Add-On MATLAB based API for interacting with ROS Create ROS nodes directly in MATLAB Exchange data via publishers

17

ROS Network for the Teleoperated Robot

ROS Android

Sensor DriverRobot Steering

Node

Android IMU Android IMU Velocity Cmd

Page 18: ROS Support from MATLAB · 3 MATLAB ROS I/O Package A Downloadable MATLAB Add-On MATLAB based API for interacting with ROS Create ROS nodes directly in MATLAB Exchange data via publishers

18

ROS Network for the Ball Tracking Robot

Camera Image

Odometry

Camera ImageVelocity Cmd

Monitor

Node

Ball Tracker

Node

Page 19: ROS Support from MATLAB · 3 MATLAB ROS I/O Package A Downloadable MATLAB Add-On MATLAB based API for interacting with ROS Create ROS nodes directly in MATLAB Exchange data via publishers

19

Closing Remarks

Allow MATLAB/ROS users to take advantage of both

– Power of MATLAB in data analysis and algorithm design

– Flexibility of ROS in handling a network of applications

Enable multi-platform access to ROS from MATLAB

Available for download at official MathWorks website

– http://www.mathworks.com/ros

– Search for “MATLAB ROS”

Hands-on IROS Workshop

– How to Use MATLAB-ROS Interface to Prototype Robotics Algorithms for ROS-Powered Robots

– Demonstrations by Clearpath Robotics & Rethink Robotics

– Sunday Sep 14, 1:30 pm to 5:00 pm