SlideShare a Scribd company logo
1 of 37
Download to read offline
Part1: About OpenRTM-aist
and
Outline of RT-Component Programming
National Institute of Advanced Industrial Science and
Technology (AIST), Japan
Industrial CPS Research Center
Software Platform Research Team, Team Leader
Noriaki Ando, Ph.D.
1
Sep. 23rd, 2020
SICE AC 2020 RT-Middleware Tutorial
Outline
• Basic concept and overview of RT-
Middleware
• Comparison with ROS
• Activities of RT-Middleware
community
• RTC development overview
• Conclusion
2
What is RT-Middleware?
3
• RT = Robot Technology cf. IT
– not only standalone robots, but also robotic elements
(sensors, actuators, etc….)
• RT-Middleware
– middleware and platform for RT-element integration
• RT-Component
– basic software unit in RT-Middleware
RT-Middleware
+ + + + +
What is RT?
RT-Middleware developed by AIST
OpenRTM-aist
About Robot Middleware
• Platform software that provides common
functions to streamline robot system construction
– Sometimes called "robot OS"
– Commonization and standardization of interface and
protocols
– Examples
• Providing modular or componentized frameworks
• Supports communication among modules
• Provides parameter setting, deployment, startup, and
module composition functions
• Realize inter-OS and inter-language cooperation /
interoperability by abstraction
• Development became active from around 2000
– Various middleware is being developed and released all
over the world
5
6
Conventional systems
Controller
Controller
software
Compatible interfaces are connectable
Robot Arm
Control software
Robot Arm1
Robot Controller Program
Target Robot
7
Each robot has each control interfaces.
If no compatibility, cannot connect each other.
Robot Arm2
Robot Arm2
Controller
software
Humanoidʼs Arm
Control software
Robot Arm
Control software
Conventional systems
Controller
Robot Controller Program
Target Robot
Target Robot
8
compatible
arm interfaces
RTM provides a common I/F for
connecting separately made
software modules
Improved software reusability
Easy to build RT system
Controller
software
Arm A
Control software
Arm B
Control software
By using RT-Middleware
Robot Arm2
Robot Arm1
Controller
Robot Controller Program
Target Robot
Target Robot
Trend of Robot Software Development
Component Oriented DevelopmentConventional Style
Camera
Mic Actuator Speech
Stereo vision Interaction
Speech
Recognition
Image
Recognition
Middleware
Stereo vision
InteractionSpeech Recog.
Image
recognition
Camera
Mic Actuator
Speech
 Integrated design of various functions
 High run-time efficiency, but inflexible
 Development becomes difficult as the
system becomes more complex
 Division/integration of large-scale complex
functions
 Improvement of development and
maintenance efficiency (reuse of functions,
etc.)
 Increased system flexibility
9
The benefits of modularization
• Reusability
– A component can be reused in various systems.
• Diversification
– Various type of same functional modules can be tried
in systems.
• Flexibility
– System structure can be changed easily.
• Reliability
– Easy to test a module and well tested modules are
reliable.
• Durability
– Well divided and independent module error does not
affect too much to whole systems.
11
The benefits of RT-Component model
• Provides rich component lifecycle to enforce
state coherency among components
• Defines data structures for describing
components and other elements
• Supports fundamental design patterns
– Collaboration of fine-grained components tightly
coupled in time (e.g. Simulink)
– Stimulus response with finite state machines
– Dynamic composition of components collaborating
synchronously or asynchronously
Inactive Active
Error
Life cycle management, core logic execution
Common state machine
Sensor RTC
Composite execution
Real-time execution
Controller RTC
Actuator RTC
Encoder
component
Actuator
Component
Controller
Component
1
TI s
TDs
Kp+
-
Reference
pos
pos
torque
• Data centric communication
• Continuous data transfer
• Dynamic connection/disconnection
Data-centric communication
• User defined interface
• Access to detailed functionality of RTC
– Getting/setting parameters
– Changing modes
– etc…
Image
data
3D depth
data
Stereo vision
interface
・set_mode()
・set_coordination()
・do_calib()
・etc…
Service port
Stereo Vision
Component
Data port
Service oriented interaction
Name
Value
Set name
Name
Value
Set name
• Function for internal parameter
• Multiple parameter sets
• They can be changed from remote in run-time
Activity, Execution context Data Port
Service Port Configuration
Ex. Servo control
Ex. Stereo vision RTC can have several
configuration sets.
Runtime reconfiguration
and dynamic switching
are supported
Main features of RT-Component
Advantages of RTM based development
13
ℓ1
ℓ2
θ2
( x , y )
θ1
Reusable RTCs
Develop from
scratch
Self development
using existing
libraries
3D cameraPoint Cloud
Grasping
strategy Planning
Inverse
kinematics
Arm control Gripper control
By using RTM,
existing module can
be reused
Reduce development
from scratch
Bin-picking robot example
* This diagram is simplified version
RTM based Distributed Systems
RTCRTC
RTM
Windows
RTCRTC
RTM
uITRON
RTCRTC
RTM
Linux
RTCRTC
RTM
VxWorks
RTCRTC
RTM
QNX
RTCRTC
RTM
RT Linux
RTC
Application Input device Sensor
Robot A Robot B
Robot C
Network
RTM can manage
distributed RTCs
implemented by
various languages
or executed on
various OSs
on the network
Connections
Between RTCs
Can be established
dynamically
15
The aim of RT-Middleware
Problem Solving by Modularization
• 仕様の明確化
• 最新技術を容易に利用可能
• 誰でもロボットが作れる
Realize
low-cost robots
Satisfy
various needs
Cost Technical Issue Needs
! ! ! !
The state of
the art
Mobile base Manipulator Sensors・・・
Various users
System developers
Easy to customize
RT-Component
Utilize
the state of the art
Robot System Integration Innovation
Reusable modules
Spec.
Practical/commercialization examples
Robot operation simulator: NEDO
S-ONE︓SCHAFT
DAQ-Middleware: KEK/J-PARC
KEK: High Energy Accelerator Research Organization
J-PARC: Japan Proton Accelerator Research Complex
HIRO, NEXTAGE open: Kawada Robotics
HRP series: KAWADA and AIST
TOYOTA L&F︓Air-T
VSTONEʼs education robots OROCHI(RT corp.)
16
THK: SIGNAS system
RTM as a International Standard
Implementation Vendor Features Compatibility
OpenRTM-aist AIST Reference implementation by AIST ---
HRTM Honda R&D ASIMO is now moving to HRTM ◎
OpenRTM.NET SEC .NET(C#,VB,C++/CLI, F#, etc..) ◎
RTM on Android SEC RTM implementation for Android ◎
RTC-Lite AIST Tiny implementation on PIC and
dsPIC
〇
Mini/MicorRTC SEC RTM/RTC for CAN and Zigbee 〇
RTMSafety SEC/AIST Functional safety standard capable
RTM implementation
〇
RTC CANOpen SIT, CiA RTM for CANOpen standard 〇
PALRO Fujisoft Yet another C++ PSM implementation ×
OPRoS ETRI Implementation of Korean national
project
×
GostaiRTC GOSTAI,
THALES
C++ PSM implementation on a robot
language
×
Standardized by OMG process
→ It can not be modified by just one company
→ Various compatible implementation
→ It promoted competition and interoperability
OMG Standard
Users can chose and continue to use
on of the RTM implementations
Ten or more RT-Middleware implementation exist
History
• September, 2005
Request for Proposal issued (starting standardization)
• September, 2006
Specification approved by OMG
• April, 2008
OMG RTC ver.1.0 released
• September, 2012
Updated to ver. 1.1
• September, 2015
FSM4RTC (FSM based RTC standard) adopted
Comparison with ROS, and trend
18
ROS and RTM
Pros of ROS
• Design policy based on UNIX
culture
– Officially supports only Linux
– ROS2 supports Windows and
MacOS
• Original package management
systems
• Abundant quality and quantity of
nodes (components)
– Many nodes whose quality is
directly controlled by OSRF
• Large number of users
• Discussions such as forum and
ML are open and active
– Sometimes core libʼs specification
moves by users opinion
• Large number of English
documents
Pros of OpenRTM
• Many OS/Language support
– Windows, Linux (and other UNIX),
MacOS, Real-time OS (VxWorks, QNX)
– Windows native support
• Mainly spread in Japan
– Japanese document, ML, tutorials
– Less numbers of users
• GUI tools for beginners available
– Eclipse based tools officially provided
– CUI tools also available (rtshell)
• Standardized specification
– Open revision procedure at OMG
– Third-party implementation is
welcome
– Some compatible implementations
exist
• Well-defined component model
– High affinity with object-oriented, UML
and SysML design
– Model-based development
• IEC61508 functional-safety
certification ready
– RTMSafety by SEC corp.
19
From ROS1 to ROS2
• When they undertook NASAʼs work, ROS original
messaging protocol was not allowed to use. So
prototyping was implemented in ROS, but they are re-
implemented from scratch in the final product.
• DDS (Data distribution service, which is one of the OMG
standardized messaging protocol) was used, because
the only standardized protocol is allowed in NASA.
• There are inconvenient constraints such as no
component model exists, only one-node-one-process
model is allowed, ROS-masterʼs SPOF (single point of
failure) problem.
• Therefore, ROS2 is completely new implementation to
overcome these problems, so no compatibility between
ROS1 and ROS2.
20
ROS2
• Current release︓Foxy Fitzroy, June 5th, 2020
• Use of standardized middleware
– Stop reinventing the wheel
– Communication middleware is DDS standardized in OMG
• Component model is introduced
– Suitable for embedded use and performance effective
architecture like RTC
• Expansion of supported OS
– ROS1 only supports Linux (only Ubuntu Linux supported)
– Windows and MacOS support are added in ROS2
– But no support for commercial real-time OS such as
VxWorks, QNX
21
http://design.ros2.org/articles/ros_middleware_interface.html
Communication middleware standard with a proven track
record in aviation, military, medical, railway, etc.
RT-Middleware community
22
Project web pages
• Users can upload
their own RTCs on
the openrtm.org
• Users can search
and download other
users RTCs
23
Project type Number
RT-Components 405
RT-Middleware 14
Tools 19
Documents 4
Hardware related
RTCs
28
RT-Middleware Summer Camp
• 1 week camp every summer
• This year: August 24-28
– The first online camp
• Number of participants: 11
• Venue: AIST Tsukuba
center (Tsukuba city, Ibaraki pref.)
– Onlie (Zoom)
• Lectures, practical work and
presentation by five teams.
• Staying in the AIST’s
accommodation and coding
endlessly every night :-P.
24
RT-Middleware Contest
• Held as an organized session in SICE
SI conference
– Various prizes
– Entry deadline: Sep. 23rd
– Software registration:Oct.
– Paper submission due: Oct. 26th
– Online examination:from end of Nov.
– Presentation and award ceremony: Dec.
• Record of year 2019
– Number of applications :11
– SICE RT-Middleware award x1
– Product supporting award x2
– Company supporting award x9
– Personal supporting award x10
• See more details: openrtm.org
– Menu: community -> events
25
RTC development overview
Framework and core-logic
ステレオビジョン
ルゴリズムア
コアロジック
右目画像左目画像
デプスマップ
RT ンポーネント
レームワーク
コ
フ
RT ンポーネント
準インターフェース
コ
標
ステレオビジョン
RT ンポーネントコ
RT ンポーネント
準インターフェース
コ
標
右目画像左目画像
デプスマップ
+ =中身は空
RTC framework + Core logic = RT-Component
RT-Component
framework
Core-logic
Stereo vision
algorithm
RTC standard
interfaces
RTC standard
interfaces
Stereo vision
RT-Component
empty
Left image Right image Left image Right image
Depth map
Depth map
Code generation by model
28
RTC’s specification
MyComp
temp.sensor device
temp. sensor RTC
STATIC
PERIODIC
mode:TimedBool
temp: TimedDouble
name:
category:
description:
comp_type:
act_type:
InPorts:
OutPorts:
RTCBuilder (Template code generator)
C++
backend
Java
backend
Python
backend
RTC source
for C++
RTC source
for Java
RTC source
for Python
class MyComp
: public DataflowComponent {
public:
virutal onExecute(ec_id);
:
private:
TimedBool m_mode;
TimedDouble m_temp;
};
import RTC.DataFlowComponent;
public class MyCompImpl
extends DataFlowComponent
{
public ConsoleInImpl(mgr)
{
}
:
};
#/usr/bin/env python
import RTC
class MyComp(
DataFlowComponent):
def __init__(self, manager):
:
def onExecute(self, ec_id):
:
Same (model)
component will be
generated by same
specification, even if
implementation
languages is different
Core-logic is
embedded to
the template
code
Implement the
procedure in a
specific function
of the
generated class
RTC development flow
29
RTBUilder CMake Visual C++
Input spec of RTC Generating VC project
or Makefile
Implement logic
and compile
RTBUilder CMake
make
+
gcc (g++)
Windows
Linux
Almost all steps are the same, except compiler
CMake
• Open source software for compiler-
independent build automation
• Can generate build files for different
development environments on
different operating systems
• Generate Makefile on Linux
• Generate VC (Visual C++) project file
on Windows
• Most of the recent open source
software is built with CMake.
30
State machine and lifecycle of RTC
ActiveDo/RTC::onExecute() callback
function is here
You don’t need to aware here
Be aware state here and
its callback functions.
3232
Activity (Callback functions)
Callback functions Meanings
onInitialize Initialization
onActivated Called once when RTC is activated
onExecute Called periodically when RTC is in the active state
onDeactivated Called once when RTC is deactivated
onAborting Called once when entering ERROR state
onReset Called once when resetting
onError Called periodically when RTC is in the error state
onFinalize Called once when finalizing RTC
onStateUpdate Called after onExecute everytime
onRateChanged Called when ExecutionContext’s rate is changed
onStartup Called once when ExecutionContext starting
onShutdown Called once when ExecutionContext stopping
InPort
• InPort
– Input port for data flow type
communication
• Methods of InPort class
– isNew(): check if new data
arriving
– read(): retrieve data from
InPort buffer to the variable
bound to the InPort
– >> : same as above リングバッファ
バインドされた変数
read()
operator>>
最新値
InPort
Robot
Component
Sensor Data
Example
Basically paired with OutPort
Data ports (InPort/OutPort)
must have the same type
OutPort
リングバッファ
バインドされた変数
write()
operator<<
OutPort
最新値
Sensor
Component
Sensor Data
例Basically paired with InPort
Data ports (InPort/OutPort)
must have the same type
• OutPort
– Output port for data flow type
communication
• Methods of OutPort class
– write(): push data from
OutPort’s variable into
OutPort’s buffer to be
published to the remote
InPort
– << : same as above
Recommendation
• Letʼs stop reinventing the wheel!!
– Code that has been executed thousands of times by
different people works better than your code from
scratch!!
– Let's write the code you really need to write and borrow
the other non-essential part for you.
– A program released by someone is a program that has
worked once!!
– Other persons code is hard to read, but you shouldn't
throw it away for that reason!!
• Commit to open source projects!!
– Don't hesitate to ask questions on ML and forums!!
– No matter how rudimentary a question is, it is valuable
information for others.
– Letʼs complain to the project!! (good feedback grow the
project)
– Debug and send patches if you can!!
35
Conclusion
• Basic concept and overview of RT-
Middleware
• Comparison with ROS
• Activities of RT-Middleware
community
• RTC development overview
36
NEXT
• Part2: Introduction to
creating RT-Component
– Lecturer: Nobuhiko Miyamoto
• Please check your
development environment
– Did you install OpenRTM-aist
and other dependent software?
– During lunch time, staffs
support installation, if you do
not install them yet.
– If you have any question,
please call us via Zoomʼs chat
or Slack.
37
We will create a robot
controller for mobile robot and
connect it to Raspberry Pi
Mouse mobile robot
component in the simulator.

More Related Content

What's hot

Las16 309 - lua jit arm64 port - status
Las16 309 - lua jit arm64 port - statusLas16 309 - lua jit arm64 port - status
Las16 309 - lua jit arm64 port - status
Linaro
 
PLC: Principios básicos del controlador lógico programable mediante el softwa...
PLC: Principios básicos del controlador lógico programable mediante el softwa...PLC: Principios básicos del controlador lógico programable mediante el softwa...
PLC: Principios básicos del controlador lógico programable mediante el softwa...
SANTIAGO PABLO ALBERTO
 
An Introduction to the Yocto Embedded Framework 2018
An Introduction to the Yocto Embedded Framework 2018An Introduction to the Yocto Embedded Framework 2018
An Introduction to the Yocto Embedded Framework 2018
ICS
 

What's hot (20)

Tech Day 2015: A Gentle Introduction to GPS and GNATbench
Tech Day 2015: A Gentle Introduction to GPS and GNATbenchTech Day 2015: A Gentle Introduction to GPS and GNATbench
Tech Day 2015: A Gentle Introduction to GPS and GNATbench
 
LAS16-105: Walkthrough of the EAS kernel adaptation to the Android Common Kernel
LAS16-105: Walkthrough of the EAS kernel adaptation to the Android Common KernelLAS16-105: Walkthrough of the EAS kernel adaptation to the Android Common Kernel
LAS16-105: Walkthrough of the EAS kernel adaptation to the Android Common Kernel
 
Las16 309 - lua jit arm64 port - status
Las16 309 - lua jit arm64 port - statusLas16 309 - lua jit arm64 port - status
Las16 309 - lua jit arm64 port - status
 
LAS16-305: Smart City Big Data Visualization on 96Boards
LAS16-305: Smart City Big Data Visualization on 96BoardsLAS16-305: Smart City Big Data Visualization on 96Boards
LAS16-305: Smart City Big Data Visualization on 96Boards
 
Fpga Device Selection
Fpga Device SelectionFpga Device Selection
Fpga Device Selection
 
FPGA Configuration
FPGA ConfigurationFPGA Configuration
FPGA Configuration
 
Micro-controllers (PIC) based Application Development
Micro-controllers (PIC) based Application DevelopmentMicro-controllers (PIC) based Application Development
Micro-controllers (PIC) based Application Development
 
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
 
Asia 14-garcia-illera-dude-wtf-in-my-can
Asia 14-garcia-illera-dude-wtf-in-my-canAsia 14-garcia-illera-dude-wtf-in-my-can
Asia 14-garcia-illera-dude-wtf-in-my-can
 
PLC: Principios básicos del controlador lógico programable mediante el softwa...
PLC: Principios básicos del controlador lógico programable mediante el softwa...PLC: Principios básicos del controlador lógico programable mediante el softwa...
PLC: Principios básicos del controlador lógico programable mediante el softwa...
 
FPGA workshop
FPGA workshopFPGA workshop
FPGA workshop
 
An Introduction to the Yocto Embedded Framework 2018
An Introduction to the Yocto Embedded Framework 2018An Introduction to the Yocto Embedded Framework 2018
An Introduction to the Yocto Embedded Framework 2018
 
A low cost, real-time algorithm for embedded devices based on freertos kernel
A low cost, real-time algorithm for embedded devices based on freertos kernelA low cost, real-time algorithm for embedded devices based on freertos kernel
A low cost, real-time algorithm for embedded devices based on freertos kernel
 
BKK16-302: Android Optimizing Compiler: New Member Assimilation Guide
BKK16-302: Android Optimizing Compiler: New Member Assimilation GuideBKK16-302: Android Optimizing Compiler: New Member Assimilation Guide
BKK16-302: Android Optimizing Compiler: New Member Assimilation Guide
 
BUD17-104: Scripting Languages in IoT: Challenges and Approaches
BUD17-104: Scripting Languages in IoT: Challenges and ApproachesBUD17-104: Scripting Languages in IoT: Challenges and Approaches
BUD17-104: Scripting Languages in IoT: Challenges and Approaches
 
Embedded Android : System Development - Part III (Audio / Video HAL)
Embedded Android : System Development - Part III (Audio / Video HAL)Embedded Android : System Development - Part III (Audio / Video HAL)
Embedded Android : System Development - Part III (Audio / Video HAL)
 
Intro to Embedded OS, RTOS and Communication Protocols
Intro to Embedded OS, RTOS and Communication ProtocolsIntro to Embedded OS, RTOS and Communication Protocols
Intro to Embedded OS, RTOS and Communication Protocols
 
LAS16-TR02: Upstreaming 101
LAS16-TR02: Upstreaming 101LAS16-TR02: Upstreaming 101
LAS16-TR02: Upstreaming 101
 
Using FPGA in Embedded Devices
Using FPGA in Embedded DevicesUsing FPGA in Embedded Devices
Using FPGA in Embedded Devices
 
BKK16-502 Suspend to Idle
BKK16-502 Suspend to IdleBKK16-502 Suspend to Idle
BKK16-502 Suspend to Idle
 

Similar to 200923 01en

Embedded system.pptx
Embedded system.pptxEmbedded system.pptx
Embedded system.pptx
Saransh Garg
 
Four Ways to Improve Linux Performance IEEE Webinar, R2.0
Four Ways to Improve Linux Performance IEEE Webinar, R2.0Four Ways to Improve Linux Performance IEEE Webinar, R2.0
Four Ways to Improve Linux Performance IEEE Webinar, R2.0
Michael Christofferson
 
MingLiuResume2016
MingLiuResume2016MingLiuResume2016
MingLiuResume2016
Ming Liu
 

Similar to 200923 01en (20)

都立大「ユビキタスロボティクス特論」5月12日
都立大「ユビキタスロボティクス特論」5月12日都立大「ユビキタスロボティクス特論」5月12日
都立大「ユビキタスロボティクス特論」5月12日
 
Ankit sarin
Ankit sarinAnkit sarin
Ankit sarin
 
Embedded systems
Embedded systemsEmbedded systems
Embedded systems
 
Værktøjer udviklet på AAU til analyse af SCJ programmer
Værktøjer udviklet på AAU til analyse af SCJ programmerVærktøjer udviklet på AAU til analyse af SCJ programmer
Værktøjer udviklet på AAU til analyse af SCJ programmer
 
EC 308 Embedded Systems Module 1 Notes APJKTU
EC 308 Embedded Systems Module 1 Notes APJKTUEC 308 Embedded Systems Module 1 Notes APJKTU
EC 308 Embedded Systems Module 1 Notes APJKTU
 
Lab6 rtos
Lab6 rtosLab6 rtos
Lab6 rtos
 
Embedded system.pptx
Embedded system.pptxEmbedded system.pptx
Embedded system.pptx
 
Four Ways to Improve Linux Performance IEEE Webinar, R2.0
Four Ways to Improve Linux Performance IEEE Webinar, R2.0Four Ways to Improve Linux Performance IEEE Webinar, R2.0
Four Ways to Improve Linux Performance IEEE Webinar, R2.0
 
MingLiuResume2016
MingLiuResume2016MingLiuResume2016
MingLiuResume2016
 
What is RTOS Step by Step Guide?
What is RTOS Step by Step Guide?What is RTOS Step by Step Guide?
What is RTOS Step by Step Guide?
 
ODP Presentation LinuxCon NA 2014
ODP Presentation LinuxCon NA 2014ODP Presentation LinuxCon NA 2014
ODP Presentation LinuxCon NA 2014
 
Embedded Os [Linux & Co.]
Embedded Os [Linux & Co.]Embedded Os [Linux & Co.]
Embedded Os [Linux & Co.]
 
Aerospace Project Integration at OPAL-RT
Aerospace Project Integration at OPAL-RT Aerospace Project Integration at OPAL-RT
Aerospace Project Integration at OPAL-RT
 
Puresafe_RP_8_Final_conference
Puresafe_RP_8_Final_conferencePuresafe_RP_8_Final_conference
Puresafe_RP_8_Final_conference
 
ORTE - OCERA Real Time ethernet
ORTE - OCERA Real Time ethernetORTE - OCERA Real Time ethernet
ORTE - OCERA Real Time ethernet
 
Mastering Real-time Linux
Mastering Real-time LinuxMastering Real-time Linux
Mastering Real-time Linux
 
Applying Linux to the Civil Infrastructure
Applying Linux to the Civil InfrastructureApplying Linux to the Civil Infrastructure
Applying Linux to the Civil Infrastructure
 
UNIT V PPT.ppt
UNIT V PPT.pptUNIT V PPT.ppt
UNIT V PPT.ppt
 
Presentation on Behavioral Synthesis & SystemC
Presentation on Behavioral Synthesis & SystemCPresentation on Behavioral Synthesis & SystemC
Presentation on Behavioral Synthesis & SystemC
 
plc8-200417125816.pdf
plc8-200417125816.pdfplc8-200417125816.pdf
plc8-200417125816.pdf
 

More from openrtm

More from openrtm (20)

ROBOMECH2023 RTミドルウェア講習会 第1部
ROBOMECH2023 RTミドルウェア講習会 第1部ROBOMECH2023 RTミドルウェア講習会 第1部
ROBOMECH2023 RTミドルウェア講習会 第1部
 
ピッキングシステム
ピッキングシステムピッキングシステム
ピッキングシステム
 
GNGを使った未知環境における経路計画
GNGを使った未知環境における経路計画GNGを使った未知環境における経路計画
GNGを使った未知環境における経路計画
 
まねっこロボット
まねっこロボットまねっこロボット
まねっこロボット
 
商品自動補充ロボットシステム
商品自動補充ロボットシステム商品自動補充ロボットシステム
商品自動補充ロボットシステム
 
RTサマーキャンプ2022最終発表_都立大.pptx
RTサマーキャンプ2022最終発表_都立大.pptxRTサマーキャンプ2022最終発表_都立大.pptx
RTサマーキャンプ2022最終発表_都立大.pptx
 
SysML実習20220822SC_GA.pdf
SysML実習20220822SC_GA.pdfSysML実習20220822SC_GA.pdf
SysML実習20220822SC_GA.pdf
 
RTミドルウェアサマーキャンプ資料2022.pdf
RTミドルウェアサマーキャンプ資料2022.pdfRTミドルウェアサマーキャンプ資料2022.pdf
RTミドルウェアサマーキャンプ資料2022.pdf
 
NEDO講座 MoveIt! チュートリアル 第1部
NEDO講座 MoveIt! チュートリアル 第1部NEDO講座 MoveIt! チュートリアル 第1部
NEDO講座 MoveIt! チュートリアル 第1部
 
5.総合演習(2)
5.総合演習(2)5.総合演習(2)
5.総合演習(2)
 
4.総合演習(1)
4.総合演習(1)4.総合演習(1)
4.総合演習(1)
 
3.RTCプログラミング演習
3.RTCプログラミング演習3.RTCプログラミング演習
3.RTCプログラミング演習
 
2.プログラミングの基礎
2.プログラミングの基礎2.プログラミングの基礎
2.プログラミングの基礎
 
1.コース概要
1.コース概要1.コース概要
1.コース概要
 
OpenRTM概要
OpenRTM概要OpenRTM概要
OpenRTM概要
 
Slam実習
Slam実習Slam実習
Slam実習
 
Rtshell入門
Rtshell入門Rtshell入門
Rtshell入門
 
Rtコンポーネント作成入門
Rtコンポーネント作成入門Rtコンポーネント作成入門
Rtコンポーネント作成入門
 
Rtミドルウェアサマーキャンプ2021_宮本信彦
Rtミドルウェアサマーキャンプ2021_宮本信彦Rtミドルウェアサマーキャンプ2021_宮本信彦
Rtミドルウェアサマーキャンプ2021_宮本信彦
 
RTミドルウェアサマーキャンプ2021_坂本武志_1
RTミドルウェアサマーキャンプ2021_坂本武志_1RTミドルウェアサマーキャンプ2021_坂本武志_1
RTミドルウェアサマーキャンプ2021_坂本武志_1
 

Recently uploaded

Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 

Recently uploaded (20)

WSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - KanchanaWSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - Kanchana
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
 
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
WSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAMWSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAM
 
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and ApplicationsWSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
 
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2Con2024 - Software Delivery in Hybrid Environments
WSO2Con2024 - Software Delivery in Hybrid EnvironmentsWSO2Con2024 - Software Delivery in Hybrid Environments
WSO2Con2024 - Software Delivery in Hybrid Environments
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
 

200923 01en

  • 1. Part1: About OpenRTM-aist and Outline of RT-Component Programming National Institute of Advanced Industrial Science and Technology (AIST), Japan Industrial CPS Research Center Software Platform Research Team, Team Leader Noriaki Ando, Ph.D. 1 Sep. 23rd, 2020 SICE AC 2020 RT-Middleware Tutorial
  • 2. Outline • Basic concept and overview of RT- Middleware • Comparison with ROS • Activities of RT-Middleware community • RTC development overview • Conclusion 2
  • 4. • RT = Robot Technology cf. IT – not only standalone robots, but also robotic elements (sensors, actuators, etc….) • RT-Middleware – middleware and platform for RT-element integration • RT-Component – basic software unit in RT-Middleware RT-Middleware + + + + + What is RT? RT-Middleware developed by AIST OpenRTM-aist
  • 5. About Robot Middleware • Platform software that provides common functions to streamline robot system construction – Sometimes called "robot OS" – Commonization and standardization of interface and protocols – Examples • Providing modular or componentized frameworks • Supports communication among modules • Provides parameter setting, deployment, startup, and module composition functions • Realize inter-OS and inter-language cooperation / interoperability by abstraction • Development became active from around 2000 – Various middleware is being developed and released all over the world 5
  • 6. 6 Conventional systems Controller Controller software Compatible interfaces are connectable Robot Arm Control software Robot Arm1 Robot Controller Program Target Robot
  • 7. 7 Each robot has each control interfaces. If no compatibility, cannot connect each other. Robot Arm2 Robot Arm2 Controller software Humanoidʼs Arm Control software Robot Arm Control software Conventional systems Controller Robot Controller Program Target Robot Target Robot
  • 8. 8 compatible arm interfaces RTM provides a common I/F for connecting separately made software modules Improved software reusability Easy to build RT system Controller software Arm A Control software Arm B Control software By using RT-Middleware Robot Arm2 Robot Arm1 Controller Robot Controller Program Target Robot Target Robot
  • 9. Trend of Robot Software Development Component Oriented DevelopmentConventional Style Camera Mic Actuator Speech Stereo vision Interaction Speech Recognition Image Recognition Middleware Stereo vision InteractionSpeech Recog. Image recognition Camera Mic Actuator Speech  Integrated design of various functions  High run-time efficiency, but inflexible  Development becomes difficult as the system becomes more complex  Division/integration of large-scale complex functions  Improvement of development and maintenance efficiency (reuse of functions, etc.)  Increased system flexibility 9
  • 10. The benefits of modularization • Reusability – A component can be reused in various systems. • Diversification – Various type of same functional modules can be tried in systems. • Flexibility – System structure can be changed easily. • Reliability – Easy to test a module and well tested modules are reliable. • Durability – Well divided and independent module error does not affect too much to whole systems.
  • 11. 11 The benefits of RT-Component model • Provides rich component lifecycle to enforce state coherency among components • Defines data structures for describing components and other elements • Supports fundamental design patterns – Collaboration of fine-grained components tightly coupled in time (e.g. Simulink) – Stimulus response with finite state machines – Dynamic composition of components collaborating synchronously or asynchronously
  • 12. Inactive Active Error Life cycle management, core logic execution Common state machine Sensor RTC Composite execution Real-time execution Controller RTC Actuator RTC Encoder component Actuator Component Controller Component 1 TI s TDs Kp+ - Reference pos pos torque • Data centric communication • Continuous data transfer • Dynamic connection/disconnection Data-centric communication • User defined interface • Access to detailed functionality of RTC – Getting/setting parameters – Changing modes – etc… Image data 3D depth data Stereo vision interface ・set_mode() ・set_coordination() ・do_calib() ・etc… Service port Stereo Vision Component Data port Service oriented interaction Name Value Set name Name Value Set name • Function for internal parameter • Multiple parameter sets • They can be changed from remote in run-time Activity, Execution context Data Port Service Port Configuration Ex. Servo control Ex. Stereo vision RTC can have several configuration sets. Runtime reconfiguration and dynamic switching are supported Main features of RT-Component
  • 13. Advantages of RTM based development 13 ℓ1 ℓ2 θ2 ( x , y ) θ1 Reusable RTCs Develop from scratch Self development using existing libraries 3D cameraPoint Cloud Grasping strategy Planning Inverse kinematics Arm control Gripper control By using RTM, existing module can be reused Reduce development from scratch Bin-picking robot example * This diagram is simplified version
  • 14. RTM based Distributed Systems RTCRTC RTM Windows RTCRTC RTM uITRON RTCRTC RTM Linux RTCRTC RTM VxWorks RTCRTC RTM QNX RTCRTC RTM RT Linux RTC Application Input device Sensor Robot A Robot B Robot C Network RTM can manage distributed RTCs implemented by various languages or executed on various OSs on the network Connections Between RTCs Can be established dynamically
  • 15. 15 The aim of RT-Middleware Problem Solving by Modularization • 仕様の明確化 • 最新技術を容易に利用可能 • 誰でもロボットが作れる Realize low-cost robots Satisfy various needs Cost Technical Issue Needs ! ! ! ! The state of the art Mobile base Manipulator Sensors・・・ Various users System developers Easy to customize RT-Component Utilize the state of the art Robot System Integration Innovation Reusable modules Spec.
  • 16. Practical/commercialization examples Robot operation simulator: NEDO S-ONE︓SCHAFT DAQ-Middleware: KEK/J-PARC KEK: High Energy Accelerator Research Organization J-PARC: Japan Proton Accelerator Research Complex HIRO, NEXTAGE open: Kawada Robotics HRP series: KAWADA and AIST TOYOTA L&F︓Air-T VSTONEʼs education robots OROCHI(RT corp.) 16 THK: SIGNAS system
  • 17. RTM as a International Standard Implementation Vendor Features Compatibility OpenRTM-aist AIST Reference implementation by AIST --- HRTM Honda R&D ASIMO is now moving to HRTM ◎ OpenRTM.NET SEC .NET(C#,VB,C++/CLI, F#, etc..) ◎ RTM on Android SEC RTM implementation for Android ◎ RTC-Lite AIST Tiny implementation on PIC and dsPIC 〇 Mini/MicorRTC SEC RTM/RTC for CAN and Zigbee 〇 RTMSafety SEC/AIST Functional safety standard capable RTM implementation 〇 RTC CANOpen SIT, CiA RTM for CANOpen standard 〇 PALRO Fujisoft Yet another C++ PSM implementation × OPRoS ETRI Implementation of Korean national project × GostaiRTC GOSTAI, THALES C++ PSM implementation on a robot language × Standardized by OMG process → It can not be modified by just one company → Various compatible implementation → It promoted competition and interoperability OMG Standard Users can chose and continue to use on of the RTM implementations Ten or more RT-Middleware implementation exist History • September, 2005 Request for Proposal issued (starting standardization) • September, 2006 Specification approved by OMG • April, 2008 OMG RTC ver.1.0 released • September, 2012 Updated to ver. 1.1 • September, 2015 FSM4RTC (FSM based RTC standard) adopted
  • 18. Comparison with ROS, and trend 18
  • 19. ROS and RTM Pros of ROS • Design policy based on UNIX culture – Officially supports only Linux – ROS2 supports Windows and MacOS • Original package management systems • Abundant quality and quantity of nodes (components) – Many nodes whose quality is directly controlled by OSRF • Large number of users • Discussions such as forum and ML are open and active – Sometimes core libʼs specification moves by users opinion • Large number of English documents Pros of OpenRTM • Many OS/Language support – Windows, Linux (and other UNIX), MacOS, Real-time OS (VxWorks, QNX) – Windows native support • Mainly spread in Japan – Japanese document, ML, tutorials – Less numbers of users • GUI tools for beginners available – Eclipse based tools officially provided – CUI tools also available (rtshell) • Standardized specification – Open revision procedure at OMG – Third-party implementation is welcome – Some compatible implementations exist • Well-defined component model – High affinity with object-oriented, UML and SysML design – Model-based development • IEC61508 functional-safety certification ready – RTMSafety by SEC corp. 19
  • 20. From ROS1 to ROS2 • When they undertook NASAʼs work, ROS original messaging protocol was not allowed to use. So prototyping was implemented in ROS, but they are re- implemented from scratch in the final product. • DDS (Data distribution service, which is one of the OMG standardized messaging protocol) was used, because the only standardized protocol is allowed in NASA. • There are inconvenient constraints such as no component model exists, only one-node-one-process model is allowed, ROS-masterʼs SPOF (single point of failure) problem. • Therefore, ROS2 is completely new implementation to overcome these problems, so no compatibility between ROS1 and ROS2. 20
  • 21. ROS2 • Current release︓Foxy Fitzroy, June 5th, 2020 • Use of standardized middleware – Stop reinventing the wheel – Communication middleware is DDS standardized in OMG • Component model is introduced – Suitable for embedded use and performance effective architecture like RTC • Expansion of supported OS – ROS1 only supports Linux (only Ubuntu Linux supported) – Windows and MacOS support are added in ROS2 – But no support for commercial real-time OS such as VxWorks, QNX 21 http://design.ros2.org/articles/ros_middleware_interface.html Communication middleware standard with a proven track record in aviation, military, medical, railway, etc.
  • 23. Project web pages • Users can upload their own RTCs on the openrtm.org • Users can search and download other users RTCs 23 Project type Number RT-Components 405 RT-Middleware 14 Tools 19 Documents 4 Hardware related RTCs 28
  • 24. RT-Middleware Summer Camp • 1 week camp every summer • This year: August 24-28 – The first online camp • Number of participants: 11 • Venue: AIST Tsukuba center (Tsukuba city, Ibaraki pref.) – Onlie (Zoom) • Lectures, practical work and presentation by five teams. • Staying in the AIST’s accommodation and coding endlessly every night :-P. 24
  • 25. RT-Middleware Contest • Held as an organized session in SICE SI conference – Various prizes – Entry deadline: Sep. 23rd – Software registration:Oct. – Paper submission due: Oct. 26th – Online examination:from end of Nov. – Presentation and award ceremony: Dec. • Record of year 2019 – Number of applications :11 – SICE RT-Middleware award x1 – Product supporting award x2 – Company supporting award x9 – Personal supporting award x10 • See more details: openrtm.org – Menu: community -> events 25
  • 27. Framework and core-logic ステレオビジョン ルゴリズムア コアロジック 右目画像左目画像 デプスマップ RT ンポーネント レームワーク コ フ RT ンポーネント 準インターフェース コ 標 ステレオビジョン RT ンポーネントコ RT ンポーネント 準インターフェース コ 標 右目画像左目画像 デプスマップ + =中身は空 RTC framework + Core logic = RT-Component RT-Component framework Core-logic Stereo vision algorithm RTC standard interfaces RTC standard interfaces Stereo vision RT-Component empty Left image Right image Left image Right image Depth map Depth map
  • 28. Code generation by model 28 RTC’s specification MyComp temp.sensor device temp. sensor RTC STATIC PERIODIC mode:TimedBool temp: TimedDouble name: category: description: comp_type: act_type: InPorts: OutPorts: RTCBuilder (Template code generator) C++ backend Java backend Python backend RTC source for C++ RTC source for Java RTC source for Python class MyComp : public DataflowComponent { public: virutal onExecute(ec_id); : private: TimedBool m_mode; TimedDouble m_temp; }; import RTC.DataFlowComponent; public class MyCompImpl extends DataFlowComponent { public ConsoleInImpl(mgr) { } : }; #/usr/bin/env python import RTC class MyComp( DataFlowComponent): def __init__(self, manager): : def onExecute(self, ec_id): : Same (model) component will be generated by same specification, even if implementation languages is different Core-logic is embedded to the template code Implement the procedure in a specific function of the generated class
  • 29. RTC development flow 29 RTBUilder CMake Visual C++ Input spec of RTC Generating VC project or Makefile Implement logic and compile RTBUilder CMake make + gcc (g++) Windows Linux Almost all steps are the same, except compiler
  • 30. CMake • Open source software for compiler- independent build automation • Can generate build files for different development environments on different operating systems • Generate Makefile on Linux • Generate VC (Visual C++) project file on Windows • Most of the recent open source software is built with CMake. 30
  • 31. State machine and lifecycle of RTC ActiveDo/RTC::onExecute() callback function is here You don’t need to aware here Be aware state here and its callback functions.
  • 32. 3232 Activity (Callback functions) Callback functions Meanings onInitialize Initialization onActivated Called once when RTC is activated onExecute Called periodically when RTC is in the active state onDeactivated Called once when RTC is deactivated onAborting Called once when entering ERROR state onReset Called once when resetting onError Called periodically when RTC is in the error state onFinalize Called once when finalizing RTC onStateUpdate Called after onExecute everytime onRateChanged Called when ExecutionContext’s rate is changed onStartup Called once when ExecutionContext starting onShutdown Called once when ExecutionContext stopping
  • 33. InPort • InPort – Input port for data flow type communication • Methods of InPort class – isNew(): check if new data arriving – read(): retrieve data from InPort buffer to the variable bound to the InPort – >> : same as above リングバッファ バインドされた変数 read() operator>> 最新値 InPort Robot Component Sensor Data Example Basically paired with OutPort Data ports (InPort/OutPort) must have the same type
  • 34. OutPort リングバッファ バインドされた変数 write() operator<< OutPort 最新値 Sensor Component Sensor Data 例Basically paired with InPort Data ports (InPort/OutPort) must have the same type • OutPort – Output port for data flow type communication • Methods of OutPort class – write(): push data from OutPort’s variable into OutPort’s buffer to be published to the remote InPort – << : same as above
  • 35. Recommendation • Letʼs stop reinventing the wheel!! – Code that has been executed thousands of times by different people works better than your code from scratch!! – Let's write the code you really need to write and borrow the other non-essential part for you. – A program released by someone is a program that has worked once!! – Other persons code is hard to read, but you shouldn't throw it away for that reason!! • Commit to open source projects!! – Don't hesitate to ask questions on ML and forums!! – No matter how rudimentary a question is, it is valuable information for others. – Letʼs complain to the project!! (good feedback grow the project) – Debug and send patches if you can!! 35
  • 36. Conclusion • Basic concept and overview of RT- Middleware • Comparison with ROS • Activities of RT-Middleware community • RTC development overview 36
  • 37. NEXT • Part2: Introduction to creating RT-Component – Lecturer: Nobuhiko Miyamoto • Please check your development environment – Did you install OpenRTM-aist and other dependent software? – During lunch time, staffs support installation, if you do not install them yet. – If you have any question, please call us via Zoomʼs chat or Slack. 37 We will create a robot controller for mobile robot and connect it to Raspberry Pi Mouse mobile robot component in the simulator.