The Open RDK framework a notsoshort tutorial Part
















- Slides: 16
The Open. RDK framework: a not-so-short tutorial Part 1: basic topics Daniele Calisi, Andrea Censi
Open. RDK summary n Goals ¨ Ease of development n n ¨ Ease of debugging n n ¨ n n (graphical) inspection tools common module structure Modularity n ¨ fast prototyping concurrent engineering code reuse loosely coupling Lightweightness and efficiency General information ¨ ¨ ¨ Written in C++, supports C++ modules Works on Linux, Mac. Os. X, Windows (Cygwin) It is Open Source ( http: //openrdk. sf. net ) The Open. RDK framework - tutorial part 1 - Open. RDK Workshop - March 2009 2
Open. RDK main features and concepts RAgent (Process) Repository (Blackboard) Module (Thread) Module Properties: (Thread) rdk: //agent 2/localizer/odometry (pose) Module (Thread) rdk: //agent 2/localizer/laser. Scan (scan) rdk: //agent 2/localizer/estimated. Pose (pose) rdk: //agent 2/navigator/max. Speed (double) rdk: //agent 2/mapper/map (map) rdk: //agent 2/navigator/user. Info (string) … Repository (Blackboard) The Open. RDK framework - tutorial part 1 - Open. RDK Workshop - March 2009 3
Repository, properties and URLs n n URL are globally unique Published property roles Input/Output ¨ Parameters ¨ Debug information, etc. ¨ n n Types Integers, strings, floatingpoint numbers, etc. ¨ Images, maps ¨ User defined types ¨ “Subdirectories” rdk: //agent 1/hw. Interface/speed rdk: //agent 1/hw. Interface/odometry. Pose rdk: //agent 1/hw. Interface/robot. Serial. Port rdk: //agent 1/hw. Interface/current. Speed … rdk: //agent 2/localizer/laser. Scan rdk: //agent 2/localizer/estimated. Pose rdk: //agent 2/mapper/map rdk: //agent 2/navigator/max. Speed rdk: //agent 2/navigator/speed … The Open. RDK framework - tutorial part 1 - Open. RDK Workshop - March 2009 4
Configuration and object persistence n Specify the initial configuration of each agent: the configuration file ¨ ¨ n Can be used to ¨ ¨ ¨ n XML format Contains the list of modules to be instantiated Contains property (initial) values Contains connections among modules Load initial module parameters Save and load module states Load static inputs (e. g. , pre-built maps) Currently it is created in two steps ¨ ¨ Add/remove modules using a console (i. e. non graphical) tool Set property values editing the file by hand The Open. RDK framework - tutorial part 1 - Open. RDK Workshop - March 2009 5
An example agent 2 agent 1 hw. Interface speed laser. Scan odometry repository localizer laser. Scan odometry mapper robot. Pose map target. Pose robot. Pose laser. Scan estimated. Pose navigator map speed repository The Open. RDK framework - tutorial part 1 - Open. RDK Workshop - March 2009 6
Property links n n Connect modules Suggested policy rdk: //agent 1/hw. Interface/laser. Scan rdk: //agent 1/hw. Interface/odometry A module creates its own properties during the initialization ¨ A module reads from and rdk: //agent 2/localizer/odometry writes to its own rdk: //agent 2/localizer/laser. Scan properties rdk: //agent 2/localizer/estimated. Pose ¨ n Property links Connect inputs and outputs of different modules ¨ Are stored in the configuration file ¨ Similar to UNIX symbolic links ¨ Can refer to remote repositories ¨ rdk: //agent 2/mapper/robot. Pose rdk: //agent 2/mapper/laser. Scan rdk: //agent 2/mapper/map rdk: //agent 2/navigator/robot. Pose rdk: //agent 2/navigator/target. Pose rdk: //agent 2/navigator/speed The Open. RDK framework - tutorial part 1 - Open. RDK Workshop - March 2009 7
Property sharing n n A module, through links, can access remote properties Repository actions: Requests properties ¨ Publishes them locally ¨ rdk: //agent 1/hw. Interface/laser. Scan rdk: //agent 1/hw. Interface/odometry Property sharing ON_CHANGE/PERIODIC TCP/UDP … Property sharing n Options: When to send updates ¨ Network protocol ¨ n Data reconstruction layer ¨ E. g. maps, images, etc. rdk: //agent 1/hw. Interface/laser. Scan rdk: //agent 1/hw. Interface/odometry rdk: //agent 2/localizer/laser. Scan rdk: //agent 2/localizer/estimated. Pose The Open. RDK framework - tutorial part 1 - Open. RDK Workshop - March 2009 8
The example revised agent 2 agent 1 hw. Interface speed laser. Scan odometry repository localizer laser. Scan odometry mapper robot. Pose map target. Pose robot. Pose laser. Scan estimated. Pose navigator map speed repository The Open. RDK framework - tutorial part 1 - Open. RDK Workshop - March 2009 9
The example revised agent 2 agent 1 target. Pose speed navigator hw. Interface robot. Pose map odometry estimated. Pose localizer robot. Pose mapper laser. Scan The Open. RDK framework - tutorial part 1 - Open. RDK Workshop - March 2009 10
Tools: RConsole n RConsole implementation ¨ Is itself an RAgent ¨ Uses property sharing n Can be used for ¨ Remote inspection ¨ Debugging ¨ Parameter tuning ¨ Preliminary GUI building for specific applications The Open. RDK framework - tutorial part 1 - Open. RDK Workshop - March 2009 11
Case study: concurrent engineering n Example: developing the localizer, mapper and navigator modules hw. Interface/speed (in) hw. Interface/laser. Scan (out, queue) hw. Interface/odometry (out, queue) n Three students are assigned one module each localizer/odometry (in, queue) localizer/laser. Scan (in, queue) localizer/estimated. Pose (out, queue) n Hardware and simulator interface modules are already available mapper/robot. Pose (in, queue) mapper/laser. Scan (in, queue) mapper/map (out) n First step: interface design (inputs/outputs) navigator/robot. Pose (in) navigator/target. Pose (in) navigator/map (in) navigator/speed (out) The Open. RDK framework - tutorial part 1 - Open. RDK Workshop - March 2009 12
Case study: the localizer module n Using logging/replaying during development ¨ Save a log of a single run and then replay it ¨ Use well-known logs databases (e. g. , RAWSEEDS) hw. Interface/speed log. Reader/file. Name(in) (param) hw. Interface/laser. Scan (out, queue) log. Reader/odometry (out, queue) hw. Interface/odometry (out, queue) log. Reader/laser. Scan (out, LOG localizer/odometry (in, queue) localizer/laser. Scan (in, queue) localizer/estimated. Pose (out, queue) log. Writer/odometry (in, queue) log. Writer/laser. Scan (in, queue) log. Writer/file. Name (param) The Open. RDK framework - tutorial part 1 - Open. RDK Workshop - March 2009 RESULT LOG 13
Case study: the mapper module n n Using odometry instead of estimated pose Using simulator (e. g. , Stage, USARSim, etc. ) hw. Interface/speed (in) usarsim. Client/laser. Scan hw. Interface/laser. Scan (out, queue) usarsim. Client/odometry hw. Interface/odometry (out, queue) localizer/odometry (in, queue) localizer/laser. Scan (in, queue) localizer/estimated. Pose (out, queue) mapper/robot. Pose (in, queue) mapper/laser. Scan (in, queue) mapper/map (out) The Open. RDK framework - tutorial part 1 - Open. RDK Workshop - March 2009 14
Case study: the navigator module n As before ¨ Use odometry, simulator clients n Pre-built map from configuration file n RConsole for target poses input MAP (configuration file) usarsim. Client/speed hw. Interface/speed (in) hw. Interface/laser. Scan (out, usarsim. Client/laser. Scan (out, queue) hw. Interface/odometry (out, usarsim. Client/odometry (out, queue) localizer/odometry (in, queue) localizer/laser. Scan (in, queue) localizer/estimated. Pose (out, queue) mapper/robot. Pose (in, queue) mapper/laser. Scan (in, queue) mapper/map (out) navigator/robot. Pose (in) navigator/target. Pose (in) navigator/map (in) navigator/speed (out) The Open. RDK framework - tutorial part 1 - Open. RDK Workshop - March 2009 15
Questions? We are on Source. Forge: http: //openrdk. sourceforge. net Credits: Calisi is the one to blame Prof. Daniele Nardi Developers: Daniele Calisi, Andrea Censi Early contributors: A. Farinelli, G. Grisetti, L. Iocchi Current contributors: F. Giannone, L. Iocchi, M. Leonetti, L. Marchetti, D. Nardi, P. de la Puente, G. Randelli, M. Sbarigia, A. Valero, R. Vicario The Open. RDK framework - tutorial part 1 - Open. RDK Workshop - March 2009 16