ROS distributed architecture


Published on

Author: Pablo Iñigo Blasco
Grupo de Investigación RTCAR
Robotica y Tecnología de Computadores
Universidad de Sevilla

Published in: Education, Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

ROS distributed architecture

  1. 1. Distributed Architecture,Deployment and Introspection Pablo Iñigo Blasco Grupo de Investigación RTCAR Robotica y Tecnología de Computadores Universidad de Sevilla
  2. 2. Contents● Distributed Architecture● ROS Architecture● Nodes● Communication mechanisms● Introspection Tools
  3. 3. 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
  4. 4. 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
  5. 5. ROS Distributed Architecture● Hybrid P2P Architecture● Distributed Components● Severals Node communication mechanisms (message passing based)● Focused on node communication mechanisms● Free internal node design
  6. 6. Nodes (I) Parameters(*)● Minimal building block● Own control flow Services● Operative system process● Reactive and/or proactive NODE● Any supported language● Communication mechanisms ● Services ● Topics ● Parameters Startup Topics configuration .yaml
  7. 7. Nodes (II) Example Parameters P 1.0 I 1.0 D 1.0 Services goHome shutdown Dyxinamel Servo Startup_config.yamlcurrent_pose P 1.0 I 1.0 D 1.0 goal
  8. 8. ROS Distributed Architecture (II) - Example Computer A Computer B RPC RPC Node services services Node topic NodeCentral Node Node Node topic Actuators
  9. 9. 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 ●
  10. 10. Message● Data Structure my_package/msg/example.msg● Message Interface Description File string field1 int8 field2● Code generation bool field3 other_pkg_msg/custom_msg field4● Specific language proxy code generation ● C++, Python..● Conveys● Message packages ● ● geometry_msgs sensor_msgs .h .h .py .java ● navigation_msgs
  11. 11. Messages (II) – Example $ rospack find geometry_msgs`/msg Point32.msg PoseWithCovarianceStamped.msg Polygon.msg Transform.msg PoseArray.msg TwistStamped.msg PoseWithCovariance.msg Vector3.msg WrenchStamped.msg QuaternionStamped.msg PointStamped.msg Twist.msg Pose2D.msg TwistWithCovarianceStamped.msg PoseStamped.msg Wrench.msg Quaternion.msg Point.msg TransformStamped.msg PolygonStamped.msg TwistWithCovariance.msg Pose.msg Vector3Stamped.msg●
  12. 12. Message (III) Examplesgeometry_msgs/PoseWithCovariance sensor_msgs/LaserScan Header headergeometry_msgs/Pose pose uint32 seq geometry_msgs/Point position time stamp float64 x string frame_id float64 y float32 angle_min float64 z float32 angle_max geometry_msgs/Quaternion orientation float32 angle_increment float64 x float32 time_increment float64 y float32 scan_time float64 z float32 range_min float64 w float32 range_maxfloat64[36] covariance float32[] ranges float32[] intensities
  13. 13. 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
  14. 14. Services● RPC my_package/srv/example.srv● Purely Reactive string request_field1 int8 request_field2 --- ● Request/Response string response_field1 other_pkg_msg/custom_msg response_field2● Stable Functionality Interface● Specific language proxy code generation ● C++, Python.. .h .h .py .java● Typical in others RSFs
  15. 15. ROS MASTER● Hybrid P2P Distributed Architecture● Central Information Node● Capabilities ● Parameter Server ● Resource Localization (White Pages) ● Service Lookup (Yellow Pages)
  16. 16. Nodelets● Threads● Compatible node communication nl nl mechanisms NODE nl● Zero copy communication between nodelets● Share Machine NODE● Only C++
  17. 17. Macro - Components (Components of Components) Robot A Robot B Launch Launch Ros Robot C Launch Master Launch
  18. 18. Parameters● Client/Server Model● Common Variable Information● Not automatically update inside nodes● Can be seen as node properties thanks to the ramming convention
  19. 19. Advanced mode communication mechanisms● Actions● Dynamic Reconfigure● (Custom) Based on state machines and workflows (SMACH)● They are based on basic primitives ● Nodes ● Parameters ● Services
  20. 20. 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
  21. 21. 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
  22. 22. Tools - Remote Introspection● Topics (rostopic)● Services (rosservice)● Nodes (rosnode)● Parameters (rosparam)● Messages (rosmsg)● Services (rossrv)● General debugging (roswtf)
  23. 23. Tools - RX-Graph
  24. 24. DEMO AMCL
  25. 25. Introspection tools - Rxplot● Monitor numerical data field at runtime● Example $ rxplot /odom/pose/pose/position/x /odom/pose/pose/position/y
  26. 26. Introspection tools - Rviz● Graphical Representation of message● Typical messages visualization plugins
  27. 27. DEMO AMCL
  28. 28. 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 - 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).