Presentation is loading. Please wait.

Presentation is loading. Please wait.

OpenRDK: a modular framework for robotic software development D. Calisi, A. Censi, L. Iocchi, D. Nardi.

Similar presentations


Presentation on theme: "OpenRDK: a modular framework for robotic software development D. Calisi, A. Censi, L. Iocchi, D. Nardi."— Presentation transcript:

1 OpenRDK: a modular framework for robotic software development D. Calisi, A. Censi, L. Iocchi, D. Nardi

2 OpenRDK: a modular framework for robotic software development (IROS'08) 2 Software frameworks for robotics Software frameworks are useful  Promote standard design techniques  Aim at code reusability (components)  Provide ready-to-use design choices Software frameworks for robotics  OROCOS (EURON project)  CLARAty (NASA)  OpenRTM-aist (Japanese project)  Orca, Player/Stage, MARIE, MOAST, ROS, etc.

3 OpenRDK: a modular framework for robotic software development (IROS'08) 3 Process Software frameworks for robotics Concurrency model  Call-backs  Processes  Threads Information sharing model  Data ports  Blackboard Module // a callback is called by a scheduler void callback() { // do your work quickly // and return the control // to the scheduler } Process Blackboard

4 OpenRDK: a modular framework for robotic software development (IROS'08) 4 OpenRDK main features and concepts RAgent (Process) Module Repository (Blackboard)‏ Properties: rdk://agent2/localizer/odometry (pose) rdk://agent2/localizer/laserScan (scan) rdk://agent2/localizer/estimatedPose (pose) rdk://agent2/navigator/maxSpeed (double) rdk://agent2/mapper/map (map) rdk://agent2/navigator/userInfo (string) … Repository (Blackboard) Implemented in C++ for UNIX-like systems

5 OpenRDK: a modular framework for robotic software development (IROS'08) 5 An example hwInterface agent1 localizer agent2 mappernavigator repository speed laserScan odometry laserScan odometry estimatedPose robotPose laserScan map robotPose map targetPose speed

6 OpenRDK: a modular framework for robotic software development (IROS'08) 6 Queues as object dispatchers Producer/consumer problem; FIFO Addressed like other properties (URL) Features  multiple consumers (concurrently)‏  no object duplication  automatic garbage collection  filters  passive Can be used for  localization (e.g., laser)  logging Module Queue Module Queue

7 OpenRDK: a modular framework for robotic software development (IROS'08) 7 Configuration and object persistence Specify the initial configuration of each agent: the configuration file  Contains the list of modules to be instantiated  Contains property (initial) values  Contains connections among modules Can be used to  Load initial module parameters  Save and load module states  Load static inputs (e.g., pre-built maps)

8 OpenRDK: a modular framework for robotic software development (IROS'08) 8 Property links Connect modules Suggested policy  A module reads from and writes to its own properties 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://agent2/localizer/odometry rdk://agent2/localizer/laserScan rdk://agent2/localizer/estimatedPose rdk://agent2/mapper/robotPose rdk://agent2/mapper/laserScan rdk://agent2/mapper/map rdk://agent2/navigator/map rdk://agent2/navigator/robotPose rdk://agent2/navigator/targetPose rdk://agent2/navigator/speed rdk://agent1/hwInterface/laserScan rdk://agent1/hwInterface/odometry

9 OpenRDK: a modular framework for robotic software development (IROS'08) 9 Property sharing A module, through links, can access remote properties Repository actions:  Requests properties  Publishes them locally Options:  When to send updates  Network protocol Data reconstruction layer  E.g. maps, images, etc. rdk://agent1/hwInterface/laserScan rdk://agent1/hwInterface/odometry rdk://agent2/localizer/odometry rdk://agent2/localizer/laserScan rdk://agent2/localizer/estimatedPose rdk://agent1/hwInterface/laserScan rdk://agent1/hwInterface/odometry Property sharing ON_CHANGE/PERIODIC TCP/UDP …

10 OpenRDK: a modular framework for robotic software development (IROS'08) 10 Tools and other utilities Modules for logging and replaying Profiling (work in progress) Modules to connect to simulators  Stage and Gazebo (through Player)  USARSim  Webots (work in progress)

11 OpenRDK: a modular framework for robotic software development (IROS'08) 11 Tools: RConsole RConsole implementation  Is itself an RAgent  Uses property sharing Can be used for  Remote inspection  Debugging  Parameter tuning  Preliminary GUI building for specific applications

12 OpenRDK: a modular framework for robotic software development (IROS'08) 12 Case study: concurrent engineering Example: developing the localizer, mapper and navigator modules Three students are assigned one module each Hardware and simulator interface modules are already available First step: interface design (inputs/outputs) hwInterface/speed (in) hwInterface/laserScan (out, queue) hwInterface/odometry (out, queue) localizer/odometry (in, queue) localizer/laserScan (in, queue) localizer/estimatedPose (out, queue) mapper/robotPose (in, queue) mapper/laserScan (in, queue) mapper/map (out) navigator/robotPose (in) navigator/targetPose (in) navigator/map (in) navigator/speed (out)

13 OpenRDK: a modular framework for robotic software development (IROS'08) 13 Case study: the localizer module Using logging/replaying during development  Save a log of a single run and then replay it  Use well-known logs databases (e.g., RAWSEEDS) localizer/odometry (in, queue) localizer/laserScan (in, queue) localizer/estimatedPose (out, queue) hwInterface/speed (in) hwInterface/laserScan (out, queue) hwInterface/odometry (out, queue) logWriter/odometry (in, queue) logWriter/laserScan (in, queue) logWriter/fileName (param) logReader/fileName (param) logReader/odometry (out, queue) logReader/laserScan (out, queue) LOG RESULT LOG

14 OpenRDK: a modular framework for robotic software development (IROS'08) 14 usarsimClient/speed (in) usarsimClient/laserScan (out, queue) usarsimClient/odometry (out, queue) Case study: the mapper module Using odometry instead of estimated pose Using simulator (e.g., Stage, USARSim, etc.) hwInterface/speed (in) hwInterface/laserScan (out, queue) hwInterface/odometry (out, queue) localizer/odometry (in, queue) localizer/laserScan (in, queue) localizer/estimatedPose (out, queue) mapper/robotPose (in, queue) mapper/laserScan (in, queue) mapper/map (out)

15 OpenRDK: a modular framework for robotic software development (IROS'08) 15 Case study: the navigator module As before  Use odometry, simulator clients Pre-built map from configuration file RConsole for target poses input hwInterface/speed (in) hwInterface/laserScan (out, queue) hwInterface/odometry (out, queue) localizer/odometry (in, queue) localizer/laserScan (in, queue) localizer/estimatedPose (out, queue) mapper/robotPose (in, queue) mapper/laserScan (in, queue) mapper/map (out) navigator/robotPose (in) navigator/targetPose (in) navigator/map (in) navigator/speed (out) MAP (configuration file) usarsimClient/speed (in) usarsimClient/laserScan (out, queue) usarsimClient/odometry (out, queue)

16 OpenRDK: a modular framework for robotic software development (IROS'08) 16 OpenRDK current applications Rescue wheeled robots (real robots, USARSim)‏ RoboCare project (assistive robots for the elders) Quadrotor, tarantula (real robots, USARSim)‏ RoboCup Standard Platform League (“Nao league”) HRI experiments (robot side)

17 OpenRDK: a modular framework for robotic software development (IROS'08) 17 Summary OpenRDK features  Modularity and concurrent engineering  Full multi-thread support  Blackboard-style communication (properties can be shared among different processes)  Tools (Logging/replaying, RConsole, etc.)  Open source (GPL license) Extend the property sharing mechanism  More network QoS (e.g., from DDS: latency budget) On-line fault detection system Configuration file editing and analysis tools  Detect possible deadlocks  Verify constraints on schedule Design a better logo! On-going and future work

18 OpenRDK: a modular framework for robotic software development (IROS'08) 18 Questions Questions? We are on SourceForge http://openrdk.sourceforge.net

19 OpenRDK: a modular framework for robotic software development (IROS'08) 19 Code: module template //... session->createInt(“intName”, “description”, 2); session->createDouble(“myDouble”, “description”, RDouble::RAD_SEC, 0.3); session->createDouble(“result”, “description”, RDouble::RAD_SEC); //... Declare properties: Initialization: //... mySocket.connectTo(“127.0.0.1”, 9999); session->listenToTimer(0.5); // or you can session->listen(“intName”); //... Execution: while (session->wait(), !exiting) { int i = session->getInt(“intName”); double d = session->getDouble(“myDouble”); // do some computation session->setDouble(“result”, d * i); }

20 OpenRDK: a modular framework for robotic software development (IROS'08) 20 Code: queue usage RDK2::ROdometry* odom = new RDK2::ROdometry(/*... */); session->queuePush("odometry", odom); session->subscribeQueue("odometry"); // "odometry" is linked to "rdk://agent1/hwInterface/odometry“ // in the configuration file while (session->wait(), !exiting) { vector v = session->queueFreezeAs (ODOMETRY_URL); for (size_t i = 0; i < v.size(); i++) { const ROdometry* odom = v[i];... // process odometry data in the queue } PRODUCER: CONSUMER:

21 OpenRDK: a modular framework for robotic software development (IROS'08) 21 Code: complex object usage Execution: while (session->wait(), !exiting) { session->lock(“myImage”); RImage* img = session->getObjectAs (“myImage”); unsigned char** pixels = img->getPixels(); // do something with the image session->unlock(“myImage”); session->valueChanged(“myImage”); }

22 OpenRDK: a modular framework for robotic software development (IROS'08) 22 Connection to RT systems RT-Process

23 OpenRDK: a modular framework for robotic software development (IROS'08) 23 A real-world configuration example

24 OpenRDK: a modular framework for robotic software development (IROS'08) 24 Contextual controller experiments

25 OpenRDK: a modular framework for robotic software development (IROS'08) 25 Repository, properties and URLs URL  Globally unique Published property roles  Input/Output  Parameters  Debug information, etc. Types  Integers, strings, floating- point numbers, etc.  Images, maps  User defined types rdk://agent1/hwInterface/speed rdk://agent1/hwInterface/odometryPose rdk://agent1/hwInterface/robotSerialPort rdk://agent1/hwInterface/currentSpeed … rdk://agent2/localizer/laserScan rdk://agent2/localizer/estimatedPose rdk://agent2/mapper/map rdk://agent2/navigator/maxSpeed rdk://agent2/navigator/speed …

26 OpenRDK: a modular framework for robotic software development (IROS'08) 26 Property links Connect modules Suggested policy  A module reads from and writes to its own properties 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://agent2/localizer/odometry rdk://agent2/localizer/laserScan rdk://agent2/localizer/estimatedPose rdk://agent2/mapper/robotPose rdk://agent2/mapper/laserScan rdk://agent2/mapper/map rdk://agent2/navigator/map rdk://agent2/navigator/robotPose rdk://agent2/navigator/targetPose rdk://agent2/navigator/speed rdk://agent1/hwInterface/laserScan rdk://agent1/hwInterface/odometry


Download ppt "OpenRDK: a modular framework for robotic software development D. Calisi, A. Censi, L. Iocchi, D. Nardi."

Similar presentations


Ads by Google