libraries ). ⢠A language-independent architecture (c++, python, lisp, java, and more) .... Integration of C/C++, Python, Octave, Java, Lisp. Software Management :.
An Introduction To Open-Source Robotic Framework
Narrendar R.C., Mechatronics Engineer, VIT University – India.
The Problem •
• •
•
Sequential programming illsuited to asynchronous world. Must manage significant complexity. We want to abstract the details of specific robot hardware. Must be amicable to multilanguage Operation.
Achieving Solution With the intent to enable researchers to rapidly develop new robotic systems without having to “reinvent the wheel” through use of standard tools and interfaces. Issue being faced
Solution inherited by ROS
Sequential Programming
Call-backs
Complex, multifunction software
Separate processes that communicate through a messaging interface
Hardware-dependent software
Messaging interface helps avoid hardware dependencies
What Makes the Difference…? Conventional OS
ROS
Explicitly a general purpose OS
Exclusive for Robotic Platform
Ortho-Operational
Meta-Operational
Native Language Programming
Language-independent architecture
Sequential Architecture
Asynchronous Distributed architecture
Programming IDE
Software Frameworks
Propriety/Open-Source
Open-source under BSD license
Heavily coded frameworks
ROS frameworks are very light
Programs
Nodes
Communication
Messages
Kernel is Included
Kernelless
Current Robotic Frameworks Some of the products which render robotic frameworks other than ROS are: • • • • • • • • • • • • • •
Microsoft Robotics Studio NXJ (Open source Java pmrg environment for the Lego robot kit ) Player (robot framework) Orocos ( C++ framework for component-based robot control software ) Rock (the Robot Construction Kit) Orca (robot framework) MOOS (robot framework) CARMEN (robot simulator) Simbad robot simulator (robot simulator) Gazebo (multi-robot simulator) Dave's Robotic Operating System OpenJAUS (robot / unmanned systems framework) RI-JAUS SDK ( A cross-platform, GPL-licensed C++ SDK) OpenRTM (robotics technology middleware)
ROS Platform • It is a software framework for robot software development, providing Meta-operating system like functionality on a heterogenous computer cluster. • It also provides tools and libraries for obtaining, building, writing, and running code across multiple computers.
ROS - Birth • ROS was originally developed in 2007 under the name switchyard by the Stanford Artificial Intelligence Laboratory in support of the Stanford AI Robot (STAIR) project. • As of 2008, development continues primarily at Willow Garage, a robotics research institute/incubator, with more than twenty institutions collaborating in a federated development model.
Features of ROS • A “meta” operating system for robots • A collection of packaging, software building tools • An architecture for distributed* inter-process/intermachine • Communication and configuration • Development tools for system runtime and data analysis • Open-source under permissive BSD licenses (ros core libraries ) • A language-independent architecture (c++, python, lisp, java, and more) • A scalable platform (ARM CPUS to Xeon Clusters)
ROS Supported Operating Systems Ubuntu Mac OS X systems Fedora Gentoo Arch Linux Windows (its not fully explored yet)
Programming Languages C++ Python LISP Java(alpha release) lua
Why ROS resides in Ubuntu..? “Linux is for people who want to know why it works. Mac is for people who don't want to know why it works. DOS is for people who want to know why it does not work. Windows is for people who don't want to know why it does not work."
Effective Implementation of a Computer application involves two parts: 1. Computational Algorithm: Algorithms are the Pseudo-tasks which we want the computer to complete. Algorithms specially in the field of robotics can be visual processing , recognition and path planning 2. Code Implementation: Coding the way the data is read, stored , transferred and managing the file system. This becomes even more prominent when we are running a big software that has tens of sub-systems running and communicating with each other, or a system across multiple machines connected as a network.
Road Map to ROS Development Community Level
• ROS Distributions • ROS Repositories
Computational • Peer2Peer Network • Message passing between Nodes Level
File System Level
• ROS Tools for managing source code, build instructions, and message definitions
File System Level The file system level concepts are ROS resources that we encounter on disk, such as: • Packages: Packages are the main unit for organizing software in ROS. • Manifests: Manifests provide metadata about a package (manifest.xml) ; • Stacks: Stacks are collections of packages that provide aggregate functionality. • Stack Manifests: Stack manifests provide data about a stack – (stack.xml); • Message types: Message descriptions that define the data structures for messages sent in ROS - (msg) • Service types: Service descriptions that define the request and response data structures for services in ROS – (srv).
Computational Level The computational elements of the ROS system which facilitae various functionalities are: • Nodes: Nodes are processes that perform computation. • Master: The ROS Master provides name registration and lookup to the rest of the Computation Graph. • Messages: Nodes communicate with each other by passing messages. • Topics: Messages are routed via a transport system with publish / subscribe semantics. • Services: The publish / subscribe communication paradigm which are often required in a distributed system. • Bags: Bags are a format for saving and playing back ROS message data.
Community Level The ROS Community Level concepts are ROS resources that enable separate communities to exchange software and knowledge. These resources include: • Distributions: ROS Distributions are collections of versioned stacks that you can install. Distributions play a similar role to Linux distributions. • Repositories: ROS relies on a federated network of code repositories, where different institutions can develop and release their own robot software components. • The ROS Wiki: The ROS community Wiki is the main forum for documenting information about ROS. Anyone can sign up for an account and contribute their own documentation, provide corrections or updates, write tutorials, and more. • Blog: The Willow Garage Blog provides regular updates, including photos and videos.
Components of ROS ROS
Middleware
Simulators
Visualizers
Debuggers
Package Management
Messaging
Stage
Nav_view
OpenRAVE
Libraries
Gazebo
rviz
OpenCV
Compilers
PCL
Software Management
Gmapping
Middleware Messaging: • Inter-process communication API
Libraries and Compilation: • Integration of C/C++, Python, Octave, Java, Lisp
Software Management : • Standardized packaging and build environment
Visualization Tools ‘rviz’ is the 3D visulizer tool ,it actually visualizes: • • • • •
Sensor Data Robot Joint States Coordinate Frames Maps being built Debugging 3D Markers
• It is a 3D visualizer - not a simulator • It is capable of displaying all 'visualizable' messages without extra coding • It can can change reference frame of visualization • It supports 'visualization markers', user created shapes to represent 'unvisualizable' data - great for debugging • Most vital ROS related tool available. • 'nav_view' is a 2D version of rviz
Simulation Tools • Open source 3D simulator Gazebo is used. It uses ODE library for ridged body dynamics and supports multiple robots • It is good for experiments that include motion planning, control & perception of ground vehicles.world and objects in world are described in an XML '.world' file. • It offers full integrated into ROS and provides fake localization & fake sensors fully integrated into ROS.
Package Management Willow Garage created 'ROS' as well as ~600 ros-packages that are available for our use. Each is a folder that contains our code, build files, launch files, etc. • • • • • • •
Robot Control (Player/Stage) Motion planning (mobile robots and manipulators) Localization and Mapping (Gmapping, EKF and AMCL) Computer Vision (OpenCV) Processing 3D information from lasers, stereo, etc... 3D Data Processing (Point Cloud Library (PCL) ) Motion Planning (OpenRAVE )
Hardware Abstraction • Hardware abstractions are sets of routines in software that emulate some platform-specific details, giving programs direct access to the hardware resources. • They often allow programmers to write device-independent, high performance applications by providing standard Operating System (OS) calls to hardware. • Hardware abstraction layers are of an even lower level in computer languages than application programming interfaces (API) because they interact directly with hardware instead of a system kernel, therefore HALs require less processing time than APIs. HA LAYER : • This layer resides between the physical hardware of a computer and the software that runs on that computer. Its function is to hide differences in hardware from most of the operating system kernel
ROS Communication ROS Communication Protocols helps in Connecting nodes over the network. These capabilities are currently built entirely on two highlevel communication APIs: ROS Topics • • • • •
Asynchronous “stream-like” communication TCP/IP or UDP Transport Strongly-typed (ROS .msg spec) Can have one or more publishers Can have one or more subscribers
ROS Services • • • • •
Synchronous “function-call-like” communication TCP/IP or UDP Transport Strongly-typed (ROS .srv spec) Can have only one server Can have one or more clients
Programming ROS Many processes (nodes) communicate via specified message types: • Images • Point Clouds • Laser scans • User specified Synchronization using one of 3 specified methods: • Topics (asynchronous publish/subscribe) • Services (synchronous) • Actions (asynchronous with feedback monitoring)
ROS Application Specific Implications • • • • • • • • • • • • •
Perception Object Identification Segmentation and recognition Face recognition Gesture recognition Motion tracking Motion understanding Structure from motion (SFM) Stereo vision: Depth perception via two cameras Motion Mobile robotics Planning & Control Grasping
ROS Distributions
DISTRIBUTIONS
RELEASE DATE
ROS C Turtle
August 2, 2010
ROS Diamondback
March 2, 2011
ROS Electric Emys
August 30, 2011
ROS Fuerte Turtle
April 23, 2012
ROS Groovy Galapagos December, 2012 ROS Hydro Medusa expected 2013
ROS Ported Hardware • PR2 personal robot being developed at Willow Garage. • PR1 personal robot developed in Ken Salisbury's lab at Stanford. • HERB developed at CMU in Intel's personal robotics program. • STAIR I and II robots developed in Andrew Ng's lab at Stanford. • Nao humanoid University of Freiburg's Humanoid Robots Lab developed a ROS integration for it. • Husky A200 robot developed (and integrated into ROS) by Clearpath Robotics
Implements Till now • RoboEarth - to develop a “WWW for robots” • ASORO’s Cloud Computing Infrastructure • Google’s initiative with Android • Nao Humanoid Robots • Google’s street View Robot • DAviCi framework • Project Phondox • Turtlebot from google
The Future…..!