context based robotic systems n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Context-based Robotic Systems PowerPoint Presentation
Download Presentation
Context-based Robotic Systems

Loading in 2 Seconds...

play fullscreen
1 / 47

Context-based Robotic Systems - PowerPoint PPT Presentation


  • 95 Views
  • Uploaded on

Context-based Robotic Systems. Dipartimento di Informatica e Sistemistica Sistemi Intelligenti per l’Emergenza e la Difesa Civile sied.dis.uniroma1.it. Daniele Nardi, Carlo Matteo Scalzo. Meanings of context. Cognitive science :

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Context-based Robotic Systems' - tanuja


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
context based robotic systems

Context-based Robotic Systems

Dipartimento di Informatica e Sistemistica

Sistemi Intelligenti per l’Emergenza e la Difesa Civile

sied.dis.uniroma1.it

Daniele Nardi,

Carlo Matteo Scalzo

meanings of context
Meanings of context

Cognitive science:

Human uses of contextual information (Context-07 Conference in Roskilde)

Artificial Intelligence:

View of a given representation (Mc Carthy) Hypothetical Reasoning

Robotics:

Turner 1998 …

OpenRDK Workshop, Rome, March 2009

context
Context

“A context is any identifiable configuration of environmental, mission-related and agent-related features that has predictive power for behaviour”

[Turner 1998]

Used for behaviour selection

OpenRDK Workshop, Rome, March 2009

motivation related work
Motivation/related work

How can the knowledge that robot is in a specific rescue scenario be used to improve performance?

  • Terrain classification for specialized behaviours [Dornege and Kleiner 2008]
  • Tuning localization and mapping based on environmental knowledge [Several authors]
  • Multi-Objective exploration [Calisi et. al 2007]
  • Driving object/people perception tracking [Several authors]

OpenRDK Workshop, Rome, March 2009

architecture multi hyper graph
Architecture (multi hyper graph)

OpenRDK Workshop, Rome, March 2009

practical rdk architecture

Contextual

representation

Behaviour

Percept

SLAM

Nav+

Expl

Blackboard (Repository)

Practical (RDK) Architecture

Context building

Contextual reasoning

OpenRDK Workshop, Rome, March 2009

architecture in detail
Architecture in detail

OpenRDK Workshop, Rome, March 2009

current implementation in openrdk
Current implementation in OpenRDK*
  • 100 variables
    • Input data
    • Input parameters
  • Knowledge based system to
    • Build single context (using all possible sources)
    • Reason about context to determine suitable values for module parameters implemented in PROLOG
    • IF THEN parameter = value

A modular framework for Robotic Software Development

http://openrdk.sf.net

OpenRDK Workshop, Rome, March 2009

experimental validation
Experimental validation
  • Against whom ?

Our rescue system with/without context

  • Which testbed ?

USARSim

Real Robots

  • Which tasks ?

Localization and Mapping

Mapping and Navigation

Exploration and victim detection

  • Which performance metric?

OpenRDK Workshop, Rome, March 2009

our experimental system spqr rescue
Our experimental system:SPQR-rescue

Experiments with and without context

OpenRDK Workshop, Rome, March 2009

qualitative example navigation and mapping
Qualitative example: Navigation and Mapping

OpenRDK Workshop, Rome, March 2009

navigation and mapping cnt d
Navigation and mapping (cnt’d)

OpenRDK Workshop, Rome, March 2009

localization and mapping with rfids
Localization and Mapping with RFIDs

OpenRDK Workshop, Rome, March 2009

mapping navigation and exploration
Mapping, Navigation and Exploration

OpenRDK Workshop, Rome, March 2009

context setting
Context setting

OpenRDK Workshop, Rome, March 2009

experiment results
Experiment results

OpenRDK Workshop, Rome, March 2009

victim search and exploration in usarsim
Victim search and exploration in USARSim
  • S&R mission
  • Measures of performance:
    • amount of environment explored
    • number victims
  • Modules (with parameters):
    • navigation (planner, speed, jog)
    • mapping (on, scanmatch, elevation)
    • exploration (on, mobility, victims, distance, frontier)
    • victim perception (multi, snapshot, snap_distance)
  • Mission knowledge always available (with and without context)

OpenRDK Workshop, Rome, March 2009

experimental setting usarsim
Experimental Setting: USARSIM

Environment

Indoor map used at German Open 2008

  • Rescue robot
  • Pioneer 2AT
  • SICK LRF
  • HOKUYO (inclined)
  • Victim sensor

OpenRDK Workshop, Rome, March 2009

contextual rules
Contextual rules

OpenRDK Workshop, Rome, March 2009

experimental evaluation qualitative
Experimental evaluation: qualitative

Repeated several times:

  • reduced stalls
  • larger explored area
  • more victims found
  • better reports generated

Examples

OpenRDK Workshop, Rome, March 2009

results of the exploration and victim detection
Results of the exploration and victim detection

OpenRDK Workshop, Rome, March 2009

conclusion
Conclusion

Contextualization as a design pattern can be

very effective in improving the performance of robots

Single representation of context:

  • improved acquisition of contextual information
  • reasoning about context for
    • tuning performance
    • fault diagnosis and recovery

Contextual knowledge is a requirement

for rescue systems

OpenRDK Workshop, Rome, March 2009

future work
Future Work
  • Context acquisition
  • Push modularization
  • Mixed initiative high level control
  • Contextual exploration with multiple robots

OpenRDK Workshop, Rome, March 2009

implementation openrdk
Implementation: OpenRDK

Behaviour

Nav

+

Expl

Context-based controller

Percept

SLAM

Blackboard (Repository)

OpenRDK Workshop, Rome, March 2009

implementation openrdk1

Behaviour

Nav

+

Expl

Context-based controller

Percept

SLAM

Blackboard (Repository)

Implementation: OpenRDK

OpenRDK Workshop, Rome, March 2009

programming languages
Programming languages

C++ / Prolog interface

Prolog

Prolog / C++ interface

OpenRDK Workshop, Rome, March 2009

context based controller
Context-based controller
  • The context-based controller is a single (standard) OpenRDK module
  • A Prolog engine is embedded (as a C++ library) in the context-based controller
  • ECLiPSe Prolog was chosen as the Prolog engine because it can be easily embedded in a C++ system

OpenRDK Workshop, Rome, March 2009

context based controller1
Context-based controller

Context-based controller

SLAM

Percept

...

ECLiPSe Prolog

Blackboard (Repository)

OpenRDK Workshop, Rome, March 2009

control loop 1 2
Control loop [1/2]

Context-based controller

...

Percept

SLAM

ECLiPSe Prolog

Blackboard (Repository)

OpenRDK Workshop, Rome, March 2009

control loop 2 2
Control loop [2/2]

Context-based controller

...

Percept

SLAM

ECLiPSe Prolog

Blackboard (Repository)

OpenRDK Workshop, Rome, March 2009

context based controller in openrdk init
Context-based controller in OpenRDK : init()
  • The Prolog engine must be initialized in the init() function of the module
    • ec-init() starts the ECLiPSe Prolog engine
  • The knowledge base (one or more Prolog source files) must be compiled after the initialization of the Prolog engine
    • posting the goal compile(prologSource) compiles the kb

OpenRDK Workshop, Rome, March 2009

init 1 2
init() [1/2]

bool ContextPrologModule::init()

{

SESSION_TRY_START(session)

// Start Eclipse Prolog engine

char* eclipsedir = const_cast< char* > ((session->getString(PROPERTY_ECLIPSE_DIR)).c_str());

string prologsource = session->getString(PROPERTY_PROLOG_SOURCE);

ec_set_option_ptr(EC_OPTION_ECLIPSEDIR, eclipsedir);

if(ec_init() < 0) {

RDK_ERROR_PRINTF("%s: could not initialize ECLiPSe\n",getModuleName().c_str()) ;

return false ;

}

OpenRDK Workshop, Rome, March 2009

init 2 2
init() [2/2]

// Compile Prolog source file

string cmd = "compile('" + prologsource + "')";

char* compile = const_cast< char* > (cmd.c_str());

post_goal(compile);

if(EC_resume() < 0)

RDK_ERROR_PRINTF("%s: could not load Prolog source\n",getModuleName().c_str());

session->listenToTimer(500.);

SESSION_END(session)

return true;

SESSION_CATCH_TERMINATE(session)

return false;

}

OpenRDK Workshop, Rome, March 2009

a real example of control loop
A real example of control loop
  • Controller inputs:
    • 2D map (received from the SLAM module)
    • 2.5D map (received from the height-map module)
  • Controller outputs:
    • max speed value (sent to the motion planning module)
    • motion planner to use (sent to the motion planning module)

OpenRDK Workshop, Rome, March 2009

a real example of control loop1
A real example of control loop
  • Step 1: extracting contextual knowledge from controller’s inputs

If clutterness-measure(2D-Map) > 0.5

Thenclutterness = high

Elseclutterness = low

If roughness-measure(2.5D-Map) > 0.5

Thenroughness = high

Elseroughness = low

C++ / Prolog interface

OpenRDK Workshop, Rome, March 2009

c prolog interface
C++ / Prolog interface
  • ECLiPSe Prolog terms can be created from C++ Strings using the EC_atom class

String clutterness;

if (clutternessMeasure(2dmap) > 0.5)

then

clutterness = “high”;

else

clutterness = “low”;

EC_atom prologClutterness(const_cast< char* > (clutterness.c_str()));

OpenRDK Workshop, Rome, March 2009

a real example of control loop2
A real example of control loop
  • Step 2: reasoning

IF (clutterness = high OR roughness = high)

THEN max-speed = low

ELSE max-speed = high

IF (clutterness = high)

THEN motion-planner = rkt

ELSE motion-planner = dwa

OpenRDK Workshop, Rome, March 2009

reasoning in prolog
Reasoning in Prolog
  • The knowledge base contains all the rules used by the reasoning process

% maxSpeedRule( Clutterness , Roughness , MaxSpeed )

maxSpeedRule( high , _ , low ) :- !.

maxSpeedRule( _ , high , low) :- !.

maxSpeedRule( _ , _ , high ):- !.

OpenRDK Workshop, Rome, March 2009

a real example of control loop3
A real example of control loop
  • Step 3: translating contextual knowledge in parameters for other modules

If (maxSpeed = high)

Then maxSpeedValue = 1 m / s

If (maxSpeed = low)

Then maxSpeedValue = 0.2 m / s

If (motionPlanner = rkt)

Then motionPlanningMode = 0

If (motionPlanner = dwa)

Then motionPlanningMode = 1

Prolog / C++ interface

OpenRDK Workshop, Rome, March 2009

prolog c interface
Prolog / C++ interface

% maxSpeedValue ( maxSpeed , maxSpeedValue )

maxSpeedValue ( high , 1 ) :- !.

maxSpeedValue ( low , 0.2) :- !.

  • ECLiPSe Prolog terms can be translated into C++ doubles using the is_double() function
    • double maxSpeedValue;
    • ((EC_word) maxSpeed).is_double(&maxSpeedValue);

OpenRDK Workshop, Rome, March 2009

performance issues
Performance issues
  • The ECLiPSe Prolog engine is a C++ library: calling a predicate is almost as fast as calling a C++ function
  • The reasoning process is implemented as a Prolog program with no backtracking and no dynamic clause database management (i.e., no assert / retract)
  • The context-based controller OpenRDK module do not slow down the entire system

OpenRDK Workshop, Rome, March 2009

declarative programming and fast prototyping
Declarative Programming and Fast Prototyping
  • Why should we use Prolog to implement reasoning ?
  • Couldn’t we use C++ ?

OpenRDK Workshop, Rome, March 2009

reasoning c implementation
Reasoning: C++ implementation
  • Reasoning rules hardwired in the code (rules are specified using C++ if-then-else)
  • Pros:
    • No configuration is needed (OpenRDK is implemented in C++)
  • Cons:
    • To change the rules (or parts thereof) one has to modify the source code of the module
    • Writing complex rules using if-then-else constructs makes the code hard to read and mantain

OpenRDK Workshop, Rome, March 2009

reasoning prolog implementation
Reasoning: Prolog implementation
  • Reasoning rules are specified in a knowledge base (one or more Prolog source files), which is compiled when the module is initialized
  • Pros:
    • Rapid Prototyping: reasoning rules can be modified in the Prolog source file, no change to the source code of the module is needed
    • Complex rules can be easily expressed and managed
    • More advanced features: negation as failure, constraint programming
  • Cons:
    • To embed ECLiPSe Prolog in C++, a configuration phase is needed

OpenRDK Workshop, Rome, March 2009

how to create an openrdk module embedding a prolog engine
How to create an OpenRDK module embedding a Prolog engine
  • Configuration of the Prolog engine (i.e., linking it as a C++ library)
  • The module is a standard OpenRDK module: it reads its inputs from the blackboard and writes its outputs to the blackboard
  • The module is initialized by starting the Prolog engine and compiling the Prolog source files
  • Internally, C++ data can be easily translated into Prolog terms (and vice-versa) using specific C++ functions
  • The Prolog engine can be queried using specific C++ functions, thus obtaining the results of the reasoning phase

OpenRDK Workshop, Rome, March 2009

any questions
Any Questions ?

OpenRDK Workshop, Rome, March 2009

contacts nardi@dis uniroma1 it cmscalzo@gmail com
Contactsnardi@dis.uniroma1.itcmscalzo@gmail.com

OpenRDK Workshop, Rome, March 2009