Robotics and Perception Robotics and Perception
Total Page:16
File Type:pdf, Size:1020Kb
ROBOTICS AND PERCEPTION ROBOTICS AND PERCEPTION ROBOTICS Combining Probabilities, Failures and Safety in Robot Control Alberto Finzi, Fiora Pirri DIS - Universita` degli Studi di Roma “La Sapienza” Via Salaria 113, 00198, Roma, Italy { finzi,pirri }@dis.uniroma1.it Abstract Situation Calculus with stochastic actions and events so that different possible runs, for a given sequence of actions, can We present a formal framework for treating both incom- be obtained. However we preserve the core ontology of the plete information in the initial database and possible fail- Situation Calculus in which actions are deterministic and the ures during an agent’s execution of a course of actions. whole dynamic of change is idealized. In fact, each run of These two aspects of uncertainty are formalized by two stochastic actions is obtained as an expansion of a fixed se- different notions of probability. We introduce also a con- quence of deterministic actions. An expansion is formed by cept of expected probability, which is obtained by com- considering both probability of success and failure for each bining the two previous notions. Expected probability ac- action, and exogenous events. We make a closed world hy- counts for the probability of a sentence on the hypothesis pothesis about exogenous events: the exogenous events are that the sequence of actions needed to make it true might all and only those fixed in the theory. Probability of events is have failed. Expected probability leads to the possibility empirical, it accounts for the relative frequency of properties of comparing courses of actions and verifying which is of events like the usual failures of an agent, due to its normal more safe. behavior or the circumstances under which it operates. The probability of a sentence depends only on the amount 1 Introduction of information available in the initial database, i.e. with state Uncertainty, both about the domain in which a robot has to descriptions. Probability of actions, on the other hand, de- operate and about the effective sequence of actions it is ex- pends on properties of events, like a robot behavior. With the ecuting, is one of the most crucial problem that cognitive notion of expected probability we combine the two former robotics has to face in robot control. In this paper we present notions (the logical and frequency ones) into a new proba- a formal framework for dealing with uncertainty both in the bility that can account for the probability of a sentence af- initial database and during the execution of a course of ac- ter the execution of a course of actions, in the hypothe- tions: actions can fail. The failure of an action can lead to ex- sis that this sequence can fail in several different ways and ogenous events, e.g. if the agent fails to pick up a block then exogenous actions can occur. This idea captures in some sense the dynamic execution under incomplete information the exogenous event that the block falls to the floor can take [ ] place. The complete framework is designed for autonomous ( 8 ). An example is the probability that the screwdriver manipulators endowed with perception. Perception, in fact, is on the floor, given that the action the robot has to exe- can be used to diagnose what really happened during a failed cute is to pick it up, and its goal is holding it in its hand. execution (a similar approach is taken in [9]). Here, leaving Expected probability, combining the two previous probabil- perception aside, we shall concentrate on the different aspects ities, gives a measure of safety of a sequence of actions concerning uncertainty: chosen to achieve a goal. Therefore it can be used to de- 1. Incomplete initial information. The most prominent log- termine whether a course of actions is more safe than an- ical approaches to probability are [14; 4] and [11; 1; 21; other one. The notion of safety can be suitably extended to ] [ treat decision theory in the Situation Calculus (see e.g. [19; 13; 7; 17 . We introduce in the Situation Calculus 15; ] 20] a formal theory, which turns out to be equivalent to 3 ). the possible world approach, under certain restrictions (e.g. [13]). Instead of possible worlds, we propose a suitable ax- 2 Preliminaries iomatization inducing possible state descriptions [4] therefore We consider the Situation Calculus (SC)([15; 20])asthe relying on a classical semantics. Probability of sentences is core of our logic and language, and we suitably extend it to entailed by the axiomatization. We do not provide nested include new sorts, new symbols for its alphabet and new ax- probabilities. ioms. We refer the interested reader to [18] for a full pre- 2. Incomplete information for a course of actions, and ex- sentation of the core logic and language and [9] for more ogenous events. A logical approach to failures has been details related to the extensions concerning probability on presented in [2]. In general, the problem of failures during events. The core consists of the three sorts: action, situa- the execution of plans is thoroughly treated in the planning tion and object = worldEntities ∪ genericObjects.Here community (see e.g. [16; 12]. To cope with the non deter- the sort genericObject is a catch-all that can include any ministic effect of actions during the execution of a plan, say, possible additional sorts needed in an application, like the we extend the classical language and axiomatization of the reals or sets. We have extended the core with three new ROBOTICS AND PERCEPTION 1331 sorts: outcome, stochasticAction, event. The sort event con- The initial database DS0 There are properties of the do- sists of two sub-sorts, event = condEvent ∪ seqEvent. main that the initial database has to represent. We list some Observe that the sorted domain D could be infinite or un- of them, where x is complement of x: countable even if some of its subsets is finite. For example 1 ¬ ( ) we are interested in imposing a finite domain for world en- . Receiver x, n, S0 2.Source(x, n, S0) →¬Source(x, n, S0) tities, while we would require probabilities to range over the 3. ∃n.(∀n .n ≤ n→∃ySource(y,n ,S0))∧ reals. We shall use the following alphabet, with subscripts and superscripts, to denote terms: a, for variables of sort ac- (∀x∀n .n >n→¬Source(x, n, S0)) tion; s, for variables of sort situation; sta, for variables of The first axiom says that no string of bits is at the Receiver sort stochastic action; e, for variables of sort event; w for in S0. The second says that at the source there is always one variables of the sub-sort seqEvent and u for variables of fixed bit in position n, the last specifies that the length of the sub-sort condEvent; p, for variables of sort object de- the string at the source is a priori fixed. Here for example we noting probabilities and x, y, z..., for variables of sort object can fix ∀x¬Source(x, 4,S0). The following constrains to the (these might be further distinguished, e.g for terms of sort strings in Source arealsoinDS . worldEntity). The family of terms over SC and the set 0 L C1.Ifabitb is in position n>2, b is either in position n − 1 of formulae SC over SC are inductively defined as usual. − 2 In particular a basic sentence is one formed only by fluents, or in position n : ∃ ∀ ( ( )→ ( )) e.g. x y P x, S0 Q x, y, S0 , in which fluents take as Source(x, n, S0) ∧ n>2 → argument only elements of sort worldEntities (we). A sen- Source(x, n − 1,S0) ∨ Source(x, n − 2,S0) tence uniform in σ is one in which no variable, free or quan- tified, of sort situation is mentioned. E.g. ∃sP (t, s) is not C2.Ifabitb is in position n =2, b is in position n =1: uniform and ∃x(P (t, do(transmit(x),S0))), is uniform in Source(x, n, S0) ∧ n =2→ Source(x, n − 1,S0) σ = do(transmit(x),S0). Omitted quantifiers are always universal quantifiers. For example: 011 is a legal string. 001 and 111 are not. Fi- nally some axioms will state that bits, which we denote by 3 The Basic Theory of Actions b are limited to 1 and 0, and positions, which we denote by n, constitute a finite set of natural number. Both the sets are The notions related to a basic theory of action with its set ordered and pairwise disjoint. of foundational axioms and domain description axioms, are presented in detail in [20] and in [18]. These axioms represent an agent’s prior knowledge about its domain of application, Successor State Axioms The successor state axiom for and its behavior, and are denoted by the following: Receiver is: Receiver(x, n, do(a, s)) ≡ DS ∪Dssa ∪Duna ∪Dap ∪ Σ. 0 (a = transmit(n) ∧ Source(x, n, S0))∨ D ( = ( ) ∧ ( 0)) Here, S0 is the initial database, describing what properties a distort n Source x, n, S hold initially about the objects in the domain. Dssa ∪Dap specify, respectively, the successor state axioms and the ac- 4 Incomplete initial information tion precondition axioms. Σ is the set of foundational axioms D If the initial database S0 is incomplete (see [20; 10]), we can for situations, and Duna ensures the uniqueness of each ac- D |= assign a probability to those statements ψ, s.t. S0 ψ. So, tion. We present in the following a simple example to illus- for example, if a goal G is given, we might be interested in trate the basic ontology.