Software development in robotics frameworks tools and the

Software development in robotics: frameworks, tools and the Open. RDK D. Calisi

Complexity of robotic software development (1) n In robotics we can find the same problem of a complex distributed system Complex algorithms but limited computation and memory ¨ Requires data sharing mechanism (middleware) ¨ Concurrent execution of processes/threads ¨ Team of developers working in parallel ¨ n Moreover, the robot is “embodied” in the real world The world is uncertain: sensor readings, action outcomes, unexpected events, etc. ¨ Physics cannot be delayed: strict time constraints ¨ n Many problems are not resolved yet Trial and error ¨ Method/algorithm tuning ¨ Fast prototyping ¨ Software development in robotics - Open. RDK Workshop - March 2009 2

Complexity of robotic software development (2) n A lot of work to make simple things ¨ e. g. visualizing sensor data requires to: n n Different hardware devices ¨ n Connect to the sensor Understand implement the protocol Build a GUI Different protocols and interfaces A lot of time is spent in system engineering Socket and serial programming ¨ How to manage the execution of the program ¨ Debugging of common operations ¨ Software development in robotics - Open. RDK Workshop - March 2009 3

Software frameworks n A software framework is an abstraction in which common code providing generic functionality can be selectively overridden or specialized by user code providing specific functionality n Frameworks are similar to software libraries in that they are reuseable abstractions of code wrapped in a welldefined API. Unlike libraries, however, the overall program's flow of control is not dictated by the caller, but by the framework. This inversion of control is the distinguishing feature of software frameworks [Wikipedia] Software development in robotics - Open. RDK Workshop - March 2009 4

Modularity n Divide-et-impera approach Common engineering method ¨ A complex problem can be often subdivided in simpler subproblems ¨ n Module-level tests and debugging ¨ n Local search space for bugs The same advantages of OO programming Abstraction and common interfaces ¨ Code reuse ¨ Encapsulation ¨ Decoupling ¨ Software development in robotics - Open. RDK Workshop - March 2009 5

Common components in a robotic system Mission/Task Coordination World modeling Localization Mapping Vision 3 1 2 Interface Planning Motion Software development in robotics - Open. RDK Workshop - March 2009 Path/Trajectory 6 Manipulation

Software frameworks for robotics n Software frameworks are useful ¨ ¨ ¨ n Software frameworks for robotics ¨ ¨ n Promote standard design techniques Aim at code reusability (components) Provide ready-to-use design techniques Provide for rapid prototyping Allows for concurrent engineering OROCOS (EURON project) CLARAty (NASA) Open. RTM-aist (Japanese project) Orca, Player/Stage, MARIE, MOAST, ROS, etc. Main elements of a framework ¨ ¨ ¨ Concurrency model Information sharing model Libraries and tools Software development in robotics - Open. RDK Workshop - March 2009 7

Concurrency model n n n Call-backs Processes Threads nn n Threads features Processes features Call-backs features ¨ Very Are easy ¨ easy to to write ¨ Provide Information is fast ¨ for sharing tight execution ¨ Max freedom of development ¨ control Less robust thanmodule processes (real-time) ¨ Robust to single crashes ¨ Information Needto facilities for concurrent ¨ Hard write and maintain sharing is slow data access Process Module // a void // // // } Module callback is called by a scheduler callback() { do your work quickly and return the control to the scheduler Module Frameworks that Frameworksthat use threads: usecall-backs: processes: Open. RDK, OROCOS, Orca, MIRO, (OROCOS), (Open. RTM) Player/Stage, … (Open. RTM) Software development in robotics - Open. RDK Workshop - March 2009 8

Information sharing model n Data ports Blackboard n Services n n Use of third-party middleware ¨ ¨ ¨ n Developing ad-hoc middleware ¨ ¨ Module e. g. , CORBA, ICE, OMG DDS Ready-to-use Different goals It’s a complex task Allows for application-oriented tuning Module Blackboard Module Frameworksthat use usea data blackboard: ports: Open. RDK, OROCOS, MIRO Open. RTM, Orca, … Software development in robotics - Open. RDK Workshop - March 2009 9

Libraries and tools n Libraries reduce programming time ¨ Frameworks include libraries for geometrical computations, control, filesystem utilities, operations on maps, images, etc. ¨ Often external libraries are used (e. g. , Open. CV, libgsl, libxml, Image. Magick, etc. ) n Tools speed-up development and debugging phases ¨ Graphical tools for debugging and inspection ¨ Simulators or connection to simulators ¨ Logging and replaying ¨ Profiling Software development in robotics - Open. RDK Workshop - March 2009 10

A short history of Open. RDK n SPQR-RDK (first commit to the CVS repository) ¨ April, n 2 nd 2003 SPQR-RDK 2 ¨ September, n 30 th 2005 Open. RDK (Source. Forge) ¨ Februrary, 25 th 2008 Software development in robotics - Open. RDK Workshop - March 2009 11

Questions? We are on Source. Forge http: //openrdk. sourceforge. net Software development in robotics - Open. RDK Workshop - March 2009 12
- Slides: 12