Introduction to Service Robotics Application development with - - PowerPoint PPT Presentation

introduction to service robotics application development
SMART_READER_LITE
LIVE PREVIEW

Introduction to Service Robotics Application development with - - PowerPoint PPT Presentation

Introduction to Service Robotics Application development with ludus.russo@gmail.com http://www.hotblackrobotics.com/ http://www.ludusrusso.cc/ 1 Ludovico Russo, Gabriele Ermacora May 2017 Robotics Fields - Industrial Robotics 2 Ludovico


slide-1
SLIDE 1

Introduction to Service Robotics Application development with

ludus.russo@gmail.com http://www.hotblackrobotics.com/ http://www.ludusrusso.cc/

1 Ludovico Russo, Gabriele Ermacora May 2017

slide-2
SLIDE 2

Robotics Fields - Industrial Robotics

2 Ludovico Russo - May 2017

slide-3
SLIDE 3

Robotics Fields - Space Exploration

3 Ludovico Russo - May 2017

slide-4
SLIDE 4

Robotics Fields - Military Robots

4 Ludovico Russo - May 2017

slide-5
SLIDE 5

Robotics Fields - Wearable Robotics

5 Ludovico Russo - May 2017

slide-6
SLIDE 6

Robotics Fields - Service Robotics

6 Ludovico Russo - May 2017

slide-7
SLIDE 7

HOTBLACK ROBOTICS Cloud Robotics e IoT

slide-8
SLIDE 8

Team / HotBlack Robotics was born during the PhD in TIM JOL CRAB (Connected Robotics Application Lab) and Politecnico di Torino

Ph.D. in Robotics Engineering, focused on Human Robot Interaction and Cloud Services. Ph.D. in Robotics Engineering, expert in Service and Cloud Robotics

slide-9
SLIDE 9

MISSION: Democratize robotics through a cloud platform.

slide-10
SLIDE 10

The cloud platform and the community

S W H W

Sharing of robotics Open Hardware projects and robotic Open Source (Robotic App Store)

slide-11
SLIDE 11

Write a robotic app is easy via cloud

slide-12
SLIDE 12

Dotbot - the first open hardware project programmable by cloud

slide-13
SLIDE 13

Cloud robotics will be the enabler for service robotics

slide-14
SLIDE 14

[Google Autonomous car] You see, a driverless vehicle needs to be able to make a decision in a split

  • second. In order to make that decision, it needs to scan and analyze everything in its local
  • environment. While it is certainly possible to create a computer — housed inside the vehicle — that can

do all these complex calculations, store all the necessary data and handle the analytics side of it, that’s not what you would call efficient. Instead, these vehicles tap into a remote cloud computing network to access boatloads of stored data. This data includes roadmaps, instructions and strategies, visual indicators or identifiers and much more.

e.g Google Car and cloud robotics

slide-15
SLIDE 15

Introduction to ROS

15 Ludovico Russo - May 2017

slide-16
SLIDE 16

What is ROS? Robot Operating System

  • Framework for Robot Application

Development

  • OS-like functionalities (meta-operating system)
  • Hardware Abstraction / Drivers
  • Multiprocess Communication
  • Package Management
  • Collection of Libraries, Tools and

Conventions

  • Stacks
  • Packages
  • Ecosystem and Community

16 Ludovico Russo - May 2017

slide-17
SLIDE 17

Why ROS?

  • Because creating truly robust,

general-purpose robot software is hard.

  • Provides plug-and-play solutions to common

problems in robotics

  • ROS encourages

collaborative Software Development

17 Ludovico Russo - May 2017

slide-18
SLIDE 18

ROS Distribution

  • Versioned set of ROS packages
  • Like a Linux distributions
  • Allows developers to work on a stable codebase
  • Scheduling
  • There is a ROS release every year in May.
  • Releases on even numbered years will be a LTS release, supported

for five years.

  • Releases on odd numbered years are normal ROS releases,

supported for two years.

18 Ludovico Russo - May 2017

slide-19
SLIDE 19

ROS release history

19

End-of-life 7 distribution C Turtle (2010) -> Hydro (2013) Supported

Indigo Igloo 2014 - 2019 Jade Turtle 2015 - 2017 Kinetic Kame 2016 - 2021 Lunar Loggerhead 2017 - 2019

Ludovico Russo - May 2017

slide-20
SLIDE 20

Hardware

20 Ludovico Russo - May 2017

slide-21
SLIDE 21

The ROS Framework

  • Lives on an Existing OS
  • Supported
  • Ubuntu (ARM)
  • Debian
  • Experimental
  • Mac OS X
  • Others Ubuntu Distro

(Gentoo)

21

  • Binded for many languages
  • Compiled in
  • C++
  • Python
  • Wrappers
  • JavaScript
  • Java
  • Matlab
  • ...

Ludovico Russo - May 2017

slide-22
SLIDE 22

The ROS Framework - Communication

  • Multi Machines communication
  • ROS Node
  • A process in a ROS application
  • Communication Patterns
  • Publish/Subscribe
  • Service/Client
  • Actions

22 Ludovico Russo - May 2017

slide-23
SLIDE 23

ROS Organization

  • Code
  • Node
  • Library
  • Messages
  • Package
  • Collection of

Nodes/Libraries/Messages

  • Other related data

23

  • Metapackage
  • Collection of thematically similar Packages.
  • Bundle together code that is developed

together and is mutually interdependent.

  • Repositories

Ludovico Russo - May 2017

slide-24
SLIDE 24

ROS Tools

  • Analysis, Debug and Visualization
  • Command Line Tools
  • RVIZ
  • RQT
  • ROS Bag
  • Simulation
  • Gazebo

24 Ludovico Russo - May 2017

slide-25
SLIDE 25

ROS Tools - Command Line Tools

  • Main tools to manage ROS
  • Allows to visualize and interact

with a ROS environment from the command line

  • catkin - Compilation suite
  • roscore
  • rosrun/roslaunch
  • rostopic/rosnode
  • rosmsg/rossrv
  • rosmessage/rosservice
  • etc.

25 Ludovico Russo - May 2017

slide-26
SLIDE 26

ROS Tools - RVIZ

26

3D visualizer for the Robot Operating System (ROS) framework

Ludovico Russo - May 2017

slide-27
SLIDE 27

ROS Tools - RQT

27

GUI tool for data visualization for the Robot Operating System (ROS) framework

Ludovico Russo - May 2017

slide-28
SLIDE 28

ROS Tools - ROSBag

28

Set of tools for recording from and playback ROS stream information

Ludovico Russo - May 2017

slide-29
SLIDE 29

ROS Tools - Simulators

29 Ludovico Russo - May 2017

slide-30
SLIDE 30

How does ROS work?

30 Ludovico Russo - May 2017

slide-31
SLIDE 31

ROSGraph Robot Application

An application developed in ROS is a network

  • f processes able to exchange information in

a multi-machine communication network:

  • The ROS Graph
slide-32
SLIDE 32

ROS main components

ROSNode

  • A process in a ROS Application
  • Actual Code when running
  • A node belongs to a package

32

ROSMessage

  • Data definition of information that nodes

exchange to communicate

  • A message belongs to a package

ROS Master

  • A special node that initialize a ROS

application and enables communication ROSTopic

  • Main ROS communication
  • A channel through which nodes exchange

async information

Ludovico Russo - May 2017

slide-33
SLIDE 33

ROS Nodes

A node is a process (a program that is executed) inside a ROS network, that perform a specific task

  • A node is identified by an unique string (name)

in the network.

  • Nodes interact each other by exchanging

messages using topics, services and actions

  • A node can
  • control hardware (drivers)
  • Perform computations
slide-34
SLIDE 34

ROS Topics

Topics are the main communication channels in a ROS network:

  • A topic is identified by an unique string (name)

in the network

  • On each topic, data can be send in a specific

format (Message Type)

  • A node that send data to a topic is called

publisher

  • A node that receives data from a topic is called

subscriber

slide-35
SLIDE 35

ROS Messages and Message Types

Topics exchange data encapsulated in messages.

  • Message Types describes the format of a

message.

  • Each topic has a specific type.
  • Can be simple (bool, int, float, string)
  • Can be complex struct
  • geometry_msgs/Point
slide-36
SLIDE 36

ROS Services

Services are communication channes in a ROS network:

  • A node that send a message on a service is

called as Client

  • A node that receive a message on a service is

called as Server

  • They works like topics, but a service call is

blocking

  • Client waits a response from a server
slide-37
SLIDE 37

ROS Actions

Actions are a complex communication system designed for long executing tasks:

  • Works like services but with a non blocking

system:

  • feedback topic
  • Result topic
slide-38
SLIDE 38

Starting a Node Master

  • roscore is the command to start a ROS master
  • The ROS master must be started before any other node
  • Usage

38

$ roscore

Ludovico Russo - May 2017

slide-39
SLIDE 39

Bring up ros nodes - rosrun

  • rosrun is the command to run a specific node
  • The ROS master must be started before any other node
  • Usage: rosrun <package_name> <node_name> <OPTIONS>

39

$ rosrun turtlesim turtlesim_node $ rosrun turtlesim turtle_teleop_key

Ludovico Russo - May 2017

slide-40
SLIDE 40

Bring up ros nodes - roslaunch

  • rosrun requires a shell per node to

be execute

  • In large project, rosrun is too complex to

be used

  • Roslaunch is a solution to launch

several nodes at the same time

  • Usage: roslaunch <package_name>

<launchfile.launch>

40

<launch> <param name="somestring1" value="bar" /> <!-- force to string instead of integer --> <param name="somestring2" value="10" type="str" /> <param name="someinteger1" value="1" type="int" /> <param name="someinteger2" value="2" /> <param name="somefloat1" value="3.14159" type="double" /> <param name="somefloat2" value="3.0" /> <!-- you can set parameters in child namespaces --> <param name="wg/childparam" value="a child namespace parameter" /> <!-- upload the contents of a file to the server --> <param name="configfile" textfile="$(find roslaunch)/example.xml" /> <!-- upload the contents of a file as base64 binary to the server --> <param name="binaryfile" binfile="$(find roslaunch)/example.xml" /> </launch>

Ludovico Russo - May 2017

slide-41
SLIDE 41

Topics

  • A Topic is a communication channel in ROS
  • Each node can listen or publish on a topic
  • Nodes send messages over a topic
  • Rostopic is a ros command to interact using the terminal with topics
  • rostopic list
  • rostopic echo <topic_name>
  • rostopic pub <topic_name> <message_type> <message>

41

$ rostopic echo /turtle1/cmd_vel $ rosrun pub ….

Ludovico Russo - May 2017

slide-42
SLIDE 42

Message Type

  • A Message Type represents a data type sent over a topic
  • Each topics transfer specific message type information
  • rosmsg allows to get informations about a message type in ROS

42

$ rosmsg show geometry_msgs/Twist geometry_msgs/Vector3 linear float64 x float64 y float64 z geometry_msgs/Vector3 angular float64 x float64 y float64 z

Ludovico Russo - May 2017

slide-43
SLIDE 43

Message Type

ROS defines standard messages to handle common type of communication

43

  • std_msgs
  • Int8 - Int16 ..
  • Float8 - Float16
  • String
  • Empty
  • Time
  • Bool
  • Arrays
  • Int8MultiArray
  • ….
  • geometry_msgs
  • Accel
  • Pose
  • Quaternion
  • Twist
  • ...
  • Different version of the same

message that can be stamped and WithCovariance

  • PoseStamped
  • PoseWithCovariaceStamped

Ludovico Russo - May 2017

slide-44
SLIDE 44

ROS Service/Client

  • Synchronous communication

between nodes

  • A Service is a couple of

messages

  • Request (a message)
  • Response (a message)
  • The Client sends a Request

and waits for a Response from the Server

44

$ rosservice list $ rosservice call /kill turtle1 $ rosservice call /reset

  • rosservice is the command line

tool to hand Services

Ludovico Russo - May 2017

slide-45
SLIDE 45

ROS Service Type

  • Like message Type, a Service

Type are the data type sent over a Service/Client communication

  • rossrv allows to get

informations about a service type in ROS

45

$ rossrv show turtlesim/Spawn float32 x float32 y float32 theta string name

  • string name

Ludovico Russo - May 2017

slide-46
SLIDE 46

ROS Param Server

  • Store and manipulate data

accessible by all nodes

  • ROS Parameter Server
  • rosparam is the command line

tool to access to the rosparam server

46

$ rosparam list /background_b /background_g /background_r /rosdistro /roslaunch/uris/host_imacdiludovico_home net_telecomitalia_it__50532 /rosversion /run_id $rosparam set background_g 160

Ludovico Russo - May 2017

slide-47
SLIDE 47

Example

47 Ludovico Russo - May 2017

slide-48
SLIDE 48

ROS Developing - Catkin

  • Catkin is the build system for ROS
  • Catkin allows to
  • Organize packages
  • Build packages
  • Simplify the development of reusable code
  • Developed over Standard Build tools
  • CMake
  • Python-build
  • Allows developer to
  • Create workspace
  • Build Nodes
  • Generate Messages and Services types

48 Ludovico Russo - May 2017

slide-49
SLIDE 49

Catkin Workspace

  • A Catking workspace is a workspace

project where code and executables are placed

  • catkin_ws/
  • src/ (all packages code)
  • devel/
  • install/
  • To generate a catking workspace, you

need

  • Create the folder catkin_ws/src/
  • Run the command catking_init_workspace

within catkin_ws/src

49 Ludovico Russo - May 2017

slide-50
SLIDE 50

Catkin package

  • A catkin package is placed within

the src folder

  • package/
  • package.xml
  • CMakeLists.txt
  • src/ (c++ Code)
  • msg/ (messages definition)
  • srv/ (services definition)
  • scripts/ (Python code)

50

  • package.xml
  • Meta data information about the

package

  • Name, description, version etc...
  • CMakeLists.txt
  • CMake file containing information on

how to build the package

  • catkin_create_pkg <package_name> <deps>

Ludovico Russo - May 2017

slide-51
SLIDE 51

ROS Useful Packages

51 Ludovico Russo - May 2017

slide-52
SLIDE 52

gmapping

  • A state of the art node for 2D

mapping

  • http://wiki.ros.org/gmapping
  • https://www.youtube.com/watch?

v=khSrWtB0Xik

52 Ludovico Russo - May 2017

slide-53
SLIDE 53

Navigation metapackage

  • A 2D navigation stack
  • Implement and solves common

problems in Robot Navigation

  • http://wiki.ros.org/navigation

53 Ludovico Russo - May 2017

slide-54
SLIDE 54

AMCL

  • Amcl implements a robot

localization algorithm based on particle filtes

  • https://www.youtube.com/watch?

v=xaeUc1-r9rY

54 Ludovico Russo - May 2017

slide-55
SLIDE 55

move_base

  • Path planning and following

algorithm

  • http://wiki.ros.org/move_base
  • https://www.youtube.com/watch?

v=QFxTCL-i72A

55 Ludovico Russo - May 2017

slide-56
SLIDE 56

MoveIt - Mobile Manipulation

  • Set of tools for mobile

manipulation

  • Simulation
  • Motion planning
  • Control
  • 3D Perception
  • http://moveit.ros.org/
  • https://www.youtube.com/wat

ch?v=vAeEEoxVhAo

56 Ludovico Russo - May 2017

slide-57
SLIDE 57

Octomap

  • 3D Mapping Framework
  • Equivalent package to gmapping
  • https://octomap.github.io/
  • https://www.youtube.com/watch?v=JwbZe

gYgxzc

57 Ludovico Russo - May 2017

slide-58
SLIDE 58

ROSSerial http://wiki.ros.org/rosserial

  • A protocol for wrapping ROS serialized messages and multiplexing multiple

topics and services over a character device such as a serial port or network socket

58

ROS Network Rosserial Node Serial Devices

Ludovico Russo - May 2017

slide-59
SLIDE 59

ROS Bridge http://wiki.ros.org/rosbridge_suite

  • Rosbridge provides a JSON API to ROS functionality for non-ROS programs.

59

ROS Network Rosbridge Server Web APPs

Ludovico Russo - May 2017

slide-60
SLIDE 60

Robot Web Tools http://robotwebtools.org/

60 Ludovico Russo - May 2017

slide-61
SLIDE 61

What you can do with ROS?

61 Ludovico Russo - May 2017

slide-62
SLIDE 62

Robot@CED

62 Ludovico Russo - May 2017

slide-63
SLIDE 63

63 Ludovico Russo - May 2017

slide-64
SLIDE 64

https://www.youtube.com/watch?v=HlUB0oHuXrc

64 Ludovico Russo - May 2017

slide-65
SLIDE 65

65 Ludovico Russo - May 2017

slide-66
SLIDE 66

66 Ludovico Russo - June 2016 Ludovico Russo - May 2017

slide-67
SLIDE 67

67 Ludovico Russo - June 2016 Ludovico Russo - May 2017

slide-68
SLIDE 68

68 Ludovico Russo - May 2017

slide-69
SLIDE 69

69 Ludovico Russo - May 2017

slide-70
SLIDE 70

70

https://www.youtube.com/watch?v=EJ5-uBt7rHs

Ludovico Russo - May 2017

slide-71
SLIDE 71

DotBot

71 Ludovico Russo - May 2017

slide-72
SLIDE 72

Examples Using the HotBlack Robotics Cloud Platform

72 Ludovico Russo - May 2017

slide-73
SLIDE 73

ROKERS www.rokers.io

73 Ludovico Russo - May 2017

slide-74
SLIDE 74

Thank you!

74 Ludovico Russo - May 2017