Communicating with ROS robots using Fast RTPS
FIWARE Summit - Utrecht- 30/May/2017
Jaime Martin Losa
eProsima CEO. I2ND Ch...
Agenda
 FIWARE Advanced Middleware: When to use it
• Fast RTPS
• KIARA
 ROS2 (Robot Operating System)
 DDS/RTPS Quick I...
FIWARE Advanced Middleware:
When to use it?
2
FIWARE Advanced Middleware: When to use it
 Real Time Requirements
• Latency measured in µSec
 High Throughput Requireme...
FIWARE Advanced Middleware: When to use it
 eProsima Fast RTPS
• C++
• Full RTPS (Real Time Publish Subscribe) implementa...
ROS (Robot Operating System)
5
ROS2: Robotics de facto Standard
 The Robot Operating System (ROS) is a set of software libraries and
tools that help you...
DDS/RTPS Quick Introduction
7
Introduction: Everything is distributed
 Enterprise Internet
 Internet of Things
 Cloud Computing
 Industry 4.0
 …
 ...
Challenge
 Everything is connected, and we should enable communication
between the different nodes.
 And this means:
• C...
DDS/RTPS: Standards-based Integration
Infrastructure for Critical Applications
10
Streaming
Data
Sensors Events
Real-Time
...
Family of Specifications
11
Broad Adoption
 Vendor independent
• API for portability
• Wire protocol for interoperability
 Multiple implementations
...
DDS adopted by key programs in Europe
 European Air Traffic Control
• DDS proposed for interoperate ATC
centers
 Spanish...
US-DoD mandates DDS for data-distribution
 DISR (formerly JTA)
• DoD Information Technology
Standards Registry
 US Navy ...
RTPS Adoption
 ROS (Robotic Operating System)
 FIWARE
• EU R&D Software Platform
 Many Drone Companies
• 3D Robotics
• ...
DDS Architecture
16
DDS
 DDS (Data Distribution Service for Real-Time Systems) is
a OMG specification for a pub/sub data centric model
(DCPS,...
DDS
DDS uses the concept of Global Data Space. In this Space we define
topics of data, and the publishers publish samples ...
Why DDS? Decoupled model
 Space (location)
• Automatic Discovery ensures network topology independence
 Redundancy:
• It...
Why DDS? Fully configurable
QoS Policy
DURABILITY
HISTORY
READER DATA LIFECYCLE
WRITER DATA LIFECYCLE
LIFESPAN
ENTITY FACT...
DDS Infrastructure
• Standard API for
portability.
• RTPS can be
implemented over
any transport
• No central
Broker/Servic...
Quality of Service: QoS
The DDS Model
Domain Participant
Data
Reader
Node
Subscriber
Data Domain
Subscriber
Data
Writer
Da...
Topics, Instances and Keys
• Topic: A set of similar objects, sharing a common
Data Type
• Instance: A particular object o...
Demo
const long STR_LEN=24;
struct ShapeType {
string<MSG_LEN> color; //@key
long x;
long y;
long shapesize;
};
• 3 Topics...
Fast RTPS Hands On:
A Hello World
25
Hands-on Example (C++)
Type
Definition
MyType.idl
fastrtpsgen
MyType.h
MyTypePubSubTypes.c
MyTypePublisher.cxx
MyTypeSubsc...
Example #1 - Hello World
We will use this data-type :
const long MSG_LEN=256;
struct HelloMsg {
string<MSG_LEN> user; //@k...
Generate type support (for C++)
[Windows]
• Look at the directory you should see:
– solution-x64Win64VS2015.sln
– And Seve...
Execute the program [Windows]
• C++:
– On one window run:
• binx64Win64VS2015HelloMsgPublisherSubscriberd.exe publisher
– ...
Writting some data
• Modify HelloMsgPublisher.cxx:
/* Main loop */
do
{
if(ch == 'y')
{
st.msg() = std::string("Hello usin...
How to Get Data? (Listener-Based)
// Listener code
void HelloMsgSubscriber::SubListener::onNewDataMessage(Subscriber* sub)...
Connecting to ROS2 from FIWARE
32
FIROS2: ROS2 to Fast RTPS
33
FIROS2: ROS2 to Fast RTPS
34
FIROS2: Roadmap
 Bridge to Orion Context Broker
35
Want to know more?
• https://catalogue.fiware.org/enablers/fast-rtps
• https://catalogue.fiware.org/enablers/kiara-advance...
Thank you!
http://fiware.org
Follow @FIWARE on Twitter
Próxima SlideShare
Cargando en…5
×

Fiware - communicating with ROS robots using Fast RTPS

102 visualizaciones

Publicado el

How to connect FIWARE to Robots ? We discuss how the FIWARE enablers can connect to ROS2, a de facto standard for robotic frameworks, using Fast RTPS and KIARA.

Publicado en: Software
0 comentarios
0 recomendaciones
Estadísticas
Notas
  • Sé el primero en comentar

  • Sé el primero en recomendar esto

Sin descargas
Visualizaciones
Visualizaciones totales
102
En SlideShare
0
De insertados
0
Número de insertados
32
Acciones
Compartido
0
Descargas
4
Comentarios
0
Recomendaciones
0
Insertados 0
No insertados

No hay notas en la diapositiva.

Fiware - communicating with ROS robots using Fast RTPS

  1. 1. Communicating with ROS robots using Fast RTPS FIWARE Summit - Utrecht- 30/May/2017 Jaime Martin Losa eProsima CEO. I2ND Chapter – Advanced Middleware & Robotics JaimeMartin@eProsima.com
  2. 2. Agenda  FIWARE Advanced Middleware: When to use it • Fast RTPS • KIARA  ROS2 (Robot Operating System)  DDS/RTPS Quick Introduction • The Standard • Architecture • Shapes Demo  Fast RTPS Hello World Example  Connecting to ROS2 from FIWARE • Fast RTPS • FIROS2 1
  3. 3. FIWARE Advanced Middleware: When to use it? 2
  4. 4. FIWARE Advanced Middleware: When to use it  Real Time Requirements • Latency measured in µSec  High Throughput Requirements • Take advantage of Pub/Sub Architecture  Low bandwidth, intermittent and unreliable datalinks • Radio networks • Wifi  Many to Many communications  Decoupled architectures  Different QoS over different datalinks and performance requirements.  Efficient Data Models 3
  5. 5. FIWARE Advanced Middleware: When to use it  eProsima Fast RTPS • C++ • Full RTPS (Real Time Publish Subscribe) implementation • Security (Encryption and Authentication) • RPC layer available through eProsima RPC over DDS • Based on OMG standards, Interoperable. • Comprehensive docs, videos, examples, etc. • Multi-Platform: Windows, Linux, Android, Mac OS, iOS □ Many ports developed by the community • Robotics Adoption (ROS2) • Apache 2.0 License  KIARA • Java Release • Complete RTPS implementation □ No Support for large data (>64kb) yet • Basic Security: Encryption • RPC included • LGPL License (Plans to migrate to Apache 2.0) • Interoperable with Fast RTPS 4
  6. 6. ROS (Robot Operating System) 5
  7. 7. ROS2: Robotics de facto Standard  The Robot Operating System (ROS) is a set of software libraries and tools that help you build robot applications. From drivers to state-of- the-art algorithms, and with powerful developer tools, ROS has what you need for your next robotics project. And it's all open source. ROS has become a de facto standard for Robotic applications.  OSRF Sponsors: Bosh, DARPA, google, MathWorks, Nasa, Nissan, Qualcomm, rethink robotics, ROS-Industrial Consortium, Sandia National Laboratories, SICK, Willow Garage, Yujin Robot 6
  8. 8. DDS/RTPS Quick Introduction 7
  9. 9. Introduction: Everything is distributed  Enterprise Internet  Internet of Things  Cloud Computing  Industry 4.0  …  Next-generation systems needs: • Scalability • Integration & Evolution • Robustness & Availability • Performance • Security 8
  10. 10. Challenge  Everything is connected, and we should enable communication between the different nodes.  And this means: • Common protocols • Common Data Types • Known interfaces • Different QoS over different datalinks and performance requirements. • Different comunications patterns. • Broad platform and programming language support. • Good Data Models! 9
  11. 11. DDS/RTPS: Standards-based Integration Infrastructure for Critical Applications 10 Streaming Data Sensors Events Real-Time Applications Enterprise Applications Actuators
  12. 12. Family of Specifications 11
  13. 13. Broad Adoption  Vendor independent • API for portability • Wire protocol for interoperability  Multiple implementations • 10 of API • 8 support RTPS  Heterogeneous • C, C++, Java, .NET (C#, C++/CLI) • Linux, Windows, VxWorks, other embedded & real•time  Loosely coupled 12
  14. 14. DDS adopted by key programs in Europe  European Air Traffic Control • DDS proposed for interoperate ATC centers  Spanish Army • DDS is mandated for C2 Interoperability (ethernet, radio & satellite)  UK Generic Vehicle Architecture • Mandates DDS for vehicle comm. • Mandates DDS-RTPS for interop. 13
  15. 15. US-DoD mandates DDS for data-distribution  DISR (formerly JTA) • DoD Information Technology Standards Registry  US Navy Open Architecture  Army, OSD • UCS, Unmanned Vehicle Control  SPAWAR NESI • Net-centric Enterprise Solutions for Interoperability • Mandates DDS for Pub-Sub SOA 14
  16. 16. RTPS Adoption  ROS (Robotic Operating System)  FIWARE • EU R&D Software Platform  Many Drone Companies • 3D Robotics • Magma UAVs • …  Dronecode • Main OSS platform for Drones 15
  17. 17. DDS Architecture 16
  18. 18. DDS  DDS (Data Distribution Service for Real-Time Systems) is a OMG specification for a pub/sub data centric model (DCPS, Data Centric Publish/Subscribe) for Real-Time data comms in distributed systems.  DDS is a networking middleware that: • Simplifies and Standardizes data flows in distributed real-time systems. • Provides robust comms (no single point of failure) and efficient (minimum latency) • Provides all kind of QoS to shape the data flows and deliver predictable results. 17
  19. 19. DDS DDS uses the concept of Global Data Space. In this Space we define topics of data, and the publishers publish samples of these topics. DDS distributes these samples to all the subscribers of those topics. Any node can be a publisher or a subscriber. 18
  20. 20. Why DDS? Decoupled model  Space (location) • Automatic Discovery ensures network topology independence  Redundancy: • It is possible to configure redundant publishers and subscribers, primary/secundary and takeover schemas supported  Time: • The reception of data does not need to be synchronous with the writing. A subscriber may, if so configured, receive data that was written even before the subscriber joined the network.  Platform: • Applications do not have to worry about data representation, processor architecture, Operating System, or even programming language on the other side  Implementation: • DDS Protocol is also an standard. Different implementations interoperate. 19
  21. 21. Why DDS? Fully configurable QoS Policy DURABILITY HISTORY READER DATA LIFECYCLE WRITER DATA LIFECYCLE LIFESPAN ENTITY FACTORY RESOURCE LIMITS RELIABILITY TIME BASED FILTER DEADLINE CONTENT FILTERS Volatility UserQoS Delivery PresentationRedundancy Infrastructure Transport QoS Policy USER DATA TOPIC DATA GROUP DATA PARTITION PRESENTATION DESTINATION ORDER OWNERSHIP OWNERSHIP STRENGTH LIVELINESS LATENCY BUDGET TRANSPORT PRIORITY
  22. 22. DDS Infrastructure • Standard API for portability. • RTPS can be implemented over any transport • No central Broker/Service • Different Comm channel per topic
  23. 23. Quality of Service: QoS The DDS Model Domain Participant Data Reader Node Subscriber Data Domain Subscriber Data Writer Data Writer Data Reader Data Reader Data Writer Publisher Topic Publisher Topic Topic
  24. 24. Topics, Instances and Keys • Topic: A set of similar objects, sharing a common Data Type • Instance: A particular object of the set • Key: Fields of the Data Type to identify an object. Topic: RadarTrack Key: Flight ID Instance Flight ID= MAD-BER57 Instance Flight ID= PAR-BER89 Instance Flight ID= PAR-BER89 Qos Applied by Instance.
  25. 25. Demo const long STR_LEN=24; struct ShapeType { string<MSG_LEN> color; //@key long x; long y; long shapesize; }; • 3 Topics: • Square, Circle, Triangle • Color is the KEY
  26. 26. Fast RTPS Hands On: A Hello World 25
  27. 27. Hands-on Example (C++) Type Definition MyType.idl fastrtpsgen MyType.h MyTypePubSubTypes.c MyTypePublisher.cxx MyTypeSubscriber.cxx MyType.sln Publisher Subscriber.exe Three minutes to a running app! 1. Define your data 2. Create your project 3. Build 4. Run: publisher subscriber compiler
  28. 28. Example #1 - Hello World We will use this data-type : const long MSG_LEN=256; struct HelloMsg { string<MSG_LEN> user; //@key string<MSG_LEN> msg; };
  29. 29. Generate type support (for C++) [Windows] • Look at the directory you should see: – solution-x64Win64VS2015.sln – And Several other files… • Open the Solution: • Compile from visual studio fastrtpsgen HelloMsg.idl -example x64Win64VS2015 -replace -ppDisable
  30. 30. Execute the program [Windows] • C++: – On one window run: • binx64Win64VS2015HelloMsgPublisherSubscriberd.exe publisher – On another window run: • binx64Win64VS2015HelloMsgPublisherSubscriberd.exe subscriber • You should see the subscribers getting an empty string…
  31. 31. Writting some data • Modify HelloMsgPublisher.cxx: /* Main loop */ do { if(ch == 'y') { st.msg() = std::string("Hello using cpp ") + std::to_string(msgsent); mp_publisher->write(&st); ++msgsent; cout << "Sending sample, count=" << msgsent << ",send another sample?(y-yes,n-stop): "; }
  32. 32. How to Get Data? (Listener-Based) // Listener code void HelloMsgSubscriber::SubListener::onNewDataMessage(Subscriber* sub) { // Take data HelloMsg st; if(sub->takeNextData(&st, &m_info)) { if(m_info.sampleKind == ALIVE) { // Print your structure data here. ++n_msg; cout << "Sample received, count=" << n_msg << endl; cout << " " << st.msg() << endl; } } }
  33. 33. Connecting to ROS2 from FIWARE 32
  34. 34. FIROS2: ROS2 to Fast RTPS 33
  35. 35. FIROS2: ROS2 to Fast RTPS 34
  36. 36. FIROS2: Roadmap  Bridge to Orion Context Broker 35
  37. 37. Want to know more? • https://catalogue.fiware.org/enablers/fast-rtps • https://catalogue.fiware.org/enablers/kiara-advanced- middleware • www.eProsima.com • Youtube: https://www.youtube.com/user/eprosima • Mail: JaimeMartin@eProsima.com • Phone: +34 607913745 • Twitter: @jaimemartinlosa • http://es.slideshare.net/JaimeMartin-eProsima
  38. 38. Thank you! http://fiware.org Follow @FIWARE on Twitter

×