120 likes | 255 Views
Software development in robotics: frameworks, tools and the OpenRDK. D. Calisi. 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
E N D
Software development in robotics: frameworks, tools and the OpenRDK D. Calisi
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
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
Software 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 controlis not dictated by the caller, but by the framework. This inversion of controlis the distinguishing feature of software frameworks [Wikipedia] Software development in robotics - OpenRDK Workshop - March 2009
Modularity • 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
Common components in a robotic system Mission/Task Coordination World modeling Vision Localization Mapping 3 1 2 Interface Planning Motion Software development in robotics - OpenRDK Workshop - March 2009 Path/Trajectory Manipulation
Software 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
Call-backs Processes Threads Call-backs features Provide for tight execution control (real-time) Hard to write and maintain Concurrency model • Threads features • Are easy to write • Information sharing is fast • Less robust than processes • Need facilities for concurrent data access • Processes features • Very easy to write • Max freedom of development • Robust to single module crashes • Information sharing is slow Process Process Module Module Module // a callback is called by a scheduler void callback() { // do your work quickly // and return the control // to the scheduler } Frameworks that use threads: OpenRDK, (OROCOS), (OpenRTM) Frameworks that use call-backs: OROCOS, (OpenRTM) Frameworks that use processes: Orca, MIRO, Player/Stage, … Software development in robotics - OpenRDK Workshop - March 2009
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 Information sharing model Module Module Module Frameworks that use a blackboard: OpenRDK, MIRO Frameworks that use data ports: OROCOS, OpenRTM, Orca, … Blackboard Software development in robotics - OpenRDK Workshop - March 2009
Libraries 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
A 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
Questions Questions? We are on SourceForge http://openrdk.sourceforge.net Software development in robotics - OpenRDK Workshop - March 2009