View
215
Download
0
Category
Tags:
Preview:
Citation preview
OpenRDK: a modular framework OpenRDK: a modular framework for robotic software developmentfor robotic software development
D. Calisi, A. Censi, L. Iocchi, D. Nardi
OpenRDK: a modular framework for robotic software development (IROS'08) 2
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 choices
Software frameworks for robotics OROCOS (EURON project) CLARAty (NASA) OpenRTM-aist (Japanese project) Orca, Player/Stage, MARIE, MOAST, ROS, etc.
OpenRDK: a modular framework for robotic software development (IROS'08) 3
Process
Software frameworks for roboticsSoftware frameworks for robotics
Concurrency model Call-backs Processes Threads
Information sharing model Data ports Blackboard
Module Module Module
// a callback is called by a schedulervoid callback() { // do your work quickly // and return the control // to the scheduler}
Process
Blackboard
OpenRDK: a modular framework for robotic software development (IROS'08) 4
OpenRDK main features and conceptsOpenRDK main features and concepts
RAgent (Process)
Module ModuleModule 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
OpenRDK: a modular framework for robotic software development (IROS'08) 5
An exampleAn example
hwInterface
agent1
localizer
agent2
mapper navigator
repositoryrepository
speed
laserScanodometry
laserScanodometry
estimatedPose
robotPoselaserScan
map
robotPosemap
targetPose
speed
OpenRDK: a modular framework for robotic software development (IROS'08) 6
Queues as object dispatchersQueues 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
ModuleModule
QueueQueue
OpenRDK: a modular framework for robotic software development (IROS'08) 7
Configuration and object persistenceConfiguration 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)
OpenRDK: a modular framework for robotic software development (IROS'08) 8
Property linksProperty 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/laserScanrdk://agent2/localizer/estimatedPose
rdk://agent2/mapper/robotPoserdk://agent2/mapper/laserScanrdk://agent2/mapper/map
rdk://agent2/navigator/maprdk://agent2/navigator/robotPoserdk://agent2/navigator/targetPoserdk://agent2/navigator/speed
rdk://agent1/hwInterface/laserScanrdk://agent1/hwInterface/odometry
OpenRDK: a modular framework for robotic software development (IROS'08) 9
Property sharingProperty 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/laserScanrdk://agent1/hwInterface/odometry
rdk://agent2/localizer/odometry rdk://agent2/localizer/laserScanrdk://agent2/localizer/estimatedPose
rdk://agent1/hwInterface/laserScanrdk://agent1/hwInterface/odometry
Property sharing
Property sharing
ON_CHANGE/PERIODICTCP/UDP
…
OpenRDK: a modular framework for robotic software development (IROS'08) 10
Tools and other utilitiesTools 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)
OpenRDK: a modular framework for robotic software development (IROS'08) 11
Tools: RConsoleTools: 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
OpenRDK: a modular framework for robotic software development (IROS'08) 12
Case study: concurrent engineeringCase 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)
OpenRDK: a modular framework for robotic software development (IROS'08) 13
Case study: the localizer moduleCase 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
RESULTLOG
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 moduleCase 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)
OpenRDK: a modular framework for robotic software development (IROS'08) 15
Case study: the navigator moduleCase 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)
OpenRDK: a modular framework for robotic software development (IROS'08) 16
OpenRDK current applicationsOpenRDK 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)
OpenRDK: a modular framework for robotic software development (IROS'08) 17
SummarySummary 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 workOn-going and future work
OpenRDK: a modular framework for robotic software development (IROS'08) 18
QuestionsQuestions
Questions?
We are on SourceForge
http://openrdk.sourceforge.net
OpenRDK: a modular framework for robotic software development (IROS'08) 19
Code: module templateCode: 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 computationsession->setDouble(“result”, d * i);
}
OpenRDK: a modular framework for robotic software development (IROS'08) 20
Code: queue usageCode: 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<const RDK2::ROdometry*> v =
session->queueFreezeAs<ROdometry>(ODOMETRY_URL);for (size_t i = 0; i < v.size(); i++) {const ROdometry* odom = v[i];... // process odometry data in the queue
}}
PRODUCER:
CONSUMER:
OpenRDK: a modular framework for robotic software development (IROS'08) 21
Code: complex object usageCode: complex object usage
Execution:while (session->wait(), !exiting) {
session->lock(“myImage”);RImage* img =
session->getObjectAs<RImage>(“myImage”);unsigned char** pixels = img->getPixels();// do something with the imagesession->unlock(“myImage”);session->valueChanged(“myImage”);
}
OpenRDK: a modular framework for robotic software development (IROS'08) 22
Connection to RT systemsConnection to RT systems
RT-Process
OpenRDK: a modular framework for robotic software development (IROS'08) 23
A real-world configuration exampleA real-world configuration example
OpenRDK: a modular framework for robotic software development (IROS'08) 24
Contextual controller experimentsContextual controller experiments
Recommended