software development in robotics: frameworks, tools and the openrdk d. calisi

12
Software development in Software development in robotics: frameworks, tools and robotics: frameworks, tools and the OpenRDK the OpenRDK D. Calisi

Post on 19-Dec-2015

218 views

Category:

Documents


2 download

TRANSCRIPT

Software development in robotics: Software development in robotics: frameworks, tools and the OpenRDKframeworks, tools and the OpenRDK

D. Calisi

Software development in robotics - OpenRDK Workshop - March 2009 2

Complexity of robotic software development (1)Complexity of robotic software development (1)

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

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

Many problems are not resolved yet Trial and error Method/algorithm tuning Fast prototyping

Software development in robotics - OpenRDK Workshop - March 2009 3

Complexity of robotic software development (2)Complexity of robotic software development (2)

A lot of work to make simple things e.g. visualizing sensor data requires to:

Connect to the sensor Understand and implement the protocol Build a GUI

Different hardware devices 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 - OpenRDK Workshop - March 2009 4

Software frameworksSoftware frameworks

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

Frameworks are similar to software libraries in that they are reuseable abstractions of code wrapped in a well-defined 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 - OpenRDK Workshop - March 2009 5

ModularityModularity

Divide-et-impera approach Common engineering method A complex problem can be often subdivided in simpler sub-

problems

Module-level tests and debugging Local search space for bugs

The same advantages of OO programming Abstraction and common interfaces Code reuse Encapsulation Decoupling

Software development in robotics - OpenRDK Workshop - March 2009 6

Common components in a robotic systemCommon components in a robotic system

Motion

World modeling

Mission/Task

Interface

Vision

1

2

3

Localization Mapping

Path/Trajectory Manipulation

Coordination

Planning

Software development in robotics - OpenRDK Workshop - March 2009 7

Software frameworks for roboticsSoftware frameworks for robotics Software frameworks are useful

Promote standard design techniques Aim at code reusability (components) Provide ready-to-use design techniques Provide for rapid prototyping Allows for concurrent engineering

Software frameworks for robotics OROCOS (EURON project) CLARAty (NASA) OpenRTM-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 - OpenRDK Workshop - March 2009 8

Process

Concurrency modelConcurrency model Call-backs Processes Threads

Call-backs features Provide for tight execution

control (real-time) Hard to write and maintain

Module Module Module

// a callback is called by a schedulervoid callback() { // do your work quickly // and return the control // to the scheduler}

Process

Processes features Very easy to write Max freedom of development Robust to single module crashes Information sharing is slow

Threads features Are easy to write Information sharing is fast Less robust than processes Need facilities for concurrent data

access

Frameworks thatuse call-backs:OROCOS,(OpenRTM)

Frameworks thatuse processes:Orca, MIRO,Player/Stage, …

Frameworks thatuse threads:OpenRDK,(OROCOS),(OpenRTM)

Software development in robotics - OpenRDK Workshop - March 2009 9

Information sharing modelInformation sharing model Data ports Blackboard

Services

Use of third-party middleware e.g., CORBA, ICE, OMG DDS Ready-to-use Different goals

Developing ad-hoc middleware It’s a complex task Allows for application-oriented tuning

Module Module Module

Blackboard

Frameworks thatuse data ports:OROCOS, OpenRTM, Orca, …

Frameworks thatuse a blackboard:OpenRDK,MIRO

Software development in robotics - OpenRDK Workshop - March 2009 10

Libraries and toolsLibraries and tools

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., OpenCV, libgsl, libxml, ImageMagick, etc.)

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 - OpenRDK Workshop - March 2009 11

A short history of OpenRDKA short history of OpenRDK

SPQR-RDK (first commit to the CVS repository) April, 2nd 2003

SPQR-RDK 2 September, 30th 2005

OpenRDK (SourceForge) Februrary, 25th 2008

Software development in robotics - OpenRDK Workshop - March 2009 12

QuestionsQuestions

Questions?

We are on SourceForge

http://openrdk.sourceforge.net