Pablo Iñigo Blasco Grupo de Investigación RTCAR Robotica y Tecnología de Computadores Universidad de Sevilla Distributed Architecture, Deployment and Introspection
Pablo Iñigo BlascoGrupo de Investigación RTCAR
Robotica y Tecnología de ComputadoresUniversidad de Sevilla
Distributed Architecture, Deployment and Introspection
Contents
● Distributed Architecture● ROS Architecture● Nodes● Communication mechanisms● Introspection Tools
Complex Robotic Software Architectures
● Non-Functional requirements● Ubiquity● High computation power● Real Time● Fault Tolerance and Robustness
● Problems● Integration Problems● Deployment and Debugging Problems → Need of
complex and powerful tools
Problems
● Deployment Problems● Multiple cpus, multiple cores● Multiple computers distributed in a network● Software Engienering related (scalability, reusability, etc.)
● Integration of huge sets of software technologies● Need of Package reutilization (impossible reinvent the wheel)● Libraries● Programming languages
ROS Distributed Architecture
● Hybrid P2P Architecture● Distributed Components● Severals Node communication
mechanisms (message passing based)● Focused on node communication
mechanisms● Free internal node design
Nodes (I)
● Minimal building block
● Own control flow
● Operative system process
● Reactive and/or proactive
● Any supported language
● Communication mechanisms
● Services● Topics● Parameters
NODE
Topics
Services
Parameters(*)
Startup configuration
.yaml
Nodes (II) Example
Dyxinamel Servo
current_pose
Services
Parameters
goal
goHome
shutdown
P 1.0I 1.0D 1.0
P 1.0I 1.0D 1.0
Startup_config.yaml
ROS Distributed Architecture (II) - Example
NodeNode
NodeNode
topic
topic
Computer A Computer B
Actuators
Central NodeNode
RPC services
RPC services
ROS Distributed Architecture: Pros & Cons
● Advantages:
● Paralelism● Ubiquity● Fault Tolerance● Modularity – low coupling● Language Abstraction
● Disadvantages:
● Real Time applications● Heavier Robotic Systems
● Additional requirements:
● Deployment tools for distributed architecture ● Distributed logging System● Remote Introspection Tools
●
Message
● Data Structure● Message Interface Description
File● Code generation● Specific language proxy code
generation● C++, Python..
● Conveys● Message packages
● geometry_msgs● sensor_msgs● navigation_msgs
string field1int8 field2bool field3other_pkg_msg/custom_msg field4
my_package/msg/example.msg
.h.h .py .java
Messages (II) – Example $ rospack find geometry_msgs`/msg
Point32.msg
Polygon.msg
PoseArray.msg
PoseWithCovariance.msg
QuaternionStamped.msg
Twist.msg
TwistWithCovarianceStamped.msg
Wrench.msg
Point.msgPolygonStamped.msg
Pose.msg
●
PoseWithCovarianceStamped.msg
Transform.msg
TwistStamped.msg
Vector3.msg
WrenchStamped.msg
PointStamped.msg
Pose2D.msg
PoseStamped.msg
Quaternion.msg
TransformStamped.msg
TwistWithCovariance.msg
Vector3Stamped.msg
Message (III) Examples
geometry_msgs/PoseWithCovariance
geometry_msgs/Pose pose
geometry_msgs/Point position
float64 x
float64 y
float64 z
geometry_msgs/Quaternion orientation
float64 x
float64 y
float64 z
float64 w
float64[36] covariance
sensor_msgs/LaserScan
Header header
uint32 seq
time stamp
string frame_id
float32 angle_min
float32 angle_max
float32 angle_increment
float32 time_increment
float32 scan_time
float32 range_min
float32 range_max
float32[] ranges
float32[] intensities
Topics
● Publish/Subscribe Models● Proactive nodes (agents)● NxM
● Promotes the instrospection mechanisms
● Asynchronous● Several configurations (buffer,
latching, etc.)
● Underlying Transport Layer:● TCP, UDP, Shared Memory● Others Transport → rosserial,
ethercat
Services
● RPC● Purely Reactive
● Request/Response
● Stable Functionality Interface
● Specific language proxy code generation● C++, Python..
● Typical in others RSFs
string request_field1int8 request_field2---string response_field1other_pkg_msg/custom_msg response_field2
my_package/srv/example.srv
.h.h .py .java
ROS MASTER
● Hybrid P2P Distributed Architecture
● Central Information Node
● Capabilities● Parameter Server● Resource Localization (White
Pages)● Service Lookup (Yellow Pages)
NODE
Nodelets
● Threads● Compatible node
communication mechanisms
● Zero copy communication between nodelets
● Share Machine● Only C++
nl
nl
nl
NODE
Macro - Components (Components of Components)
Launch Launch
Launch
Ros Master
Robot A Robot B
Robot C Launch
Parameters
● Client/Server Model● Common Variable Information● Not automatically update inside nodes● Can be seen as node properties thanks to the
ramming convention
Advanced mode communication mechanisms
● Actions● Dynamic Reconfigure● (Custom) Based on state machines and
workflows (SMACH)
● They are based on basic primitives● Nodes● Parameters● Services
Actions
● Preemptive tasks● Non immediate tasks● Cancelable tasks● Based on topics● Examples
● Moving the robot to a target location
● Performing a laser scan and returning the resulting point cloud
● Detecting the handle of a door
Deployment: Launch Files
● Deployment layout of building blocks (nodes)● Naming pushing● Startup configuration (direct or yaml files)● XML syntax● Itself can be seen as an complex component or
building block
Tools - Remote Introspection
● Topics (rostopic)● Services (rosservice)● Nodes (rosnode)● Parameters (rosparam)● Messages (rosmsg)● Services (rossrv)● General debugging (roswtf)
Tools - RX-Graph
DEMO AMCL
Introspection tools - Rxplot
● Monitor numerical data field at runtime● Example
$ rxplot /odom/pose/pose/position/x /odom/pose/pose/position/y
Introspection tools - Rviz
● Graphical Representation of message
● Typical messages visualization plugins
References
(1) Iñigo-Blasco, Pablo, Fernando Diaz-del-Rio, Ma Carmen Romero-Ternero, Daniel Cagigas-Muñiz, and Saturnino Vicente-Diaz. 2012. “Robotics software frameworks for multi-agent robotic systems development” Robotics and
(2) ROS Wiki - http://ros.org
(3) Quigley, Morgan, Brian Gerkey, Ken Conley, Josh Faust, Tully Foote, Jeremy Leibs, Eric Berger, Rob Wheeler, and Andrew Ng. 2009. ROS: an open-source Robot Operating System. In Open-Source Software workshop of the International Conference on Robotics and Automation (ICRA). Autonomous Systems (February).