Extending Knowledge-Level Planning with Sensing for Robot Task Planning

We present a set of extensions to the knowledge-level PKS (Planning with Knowledge and Sensing) planner, aimed at improving its ability to generate plans in realworld robotics domains. These extensions include a facility for using externally-defined reasoning processes, an interval-based representation for modelling noisy sensors and effectors, and an application programming interface (API) to facilitate software integration. We demonstrate our techniques in three robot domains, which show their applicability to a broad range of robot planning applications involving incomplete knowledge, real-world geometry, and multiple robots and sensors. Introduction and Motivation A robot operating in a real-world domain often needs to do so with incomplete information about the state of the world. A robot with the ability to sense the world can also gather information to generate plans with contingencies, allowing it to reason about the outcome of sensed data at plan time. In this paper, we explore an application of planning with incomplete information and sensing actions to the problem of task planning in robotics domains. In particular, building models of realistic domains which can be used with generalpurpose planning systems often involves working with incomplete (or uncertain) perceptual information arising from real-world sensors. Furthermore, this task may be complicated by the difficulties of bridging the gap between geometric and symbolic representations: robot systems typically reason about joint angles, spatial coordinates, and continuous spaces, while many symbolic planners work with discrete representations in represented in logic-like languages. Our approach uses the PKS (Planning with Knowledge and Sensing) planner (Petrick and Bacchus 2002; 2004) as the high-level reasoning tool for task planning in robotics domains. PKS is a general-purpose contingent planner that operates at the knowledge level (Newell 1982), by reasoning about how its knowledge changes due to action. PKS can represent known and unknown information, and model sensing actions using concise but rich domain descriptions, making it well suited for structured, partially-known environments of the kind that arise in many robot scenarios. While PKS has previously been successfully used in robot domains (Petrick et al. 2009), it lacks certain features which Figure 1: In the FORCE SENSING scenario, a robot manipulator senses if containers are filled by lifting them to determine their weight. Objects must be held upright while moving to prevent spilling, unless they are empty or unopened. could improve its applicability to a wider range of robotics tasks. In this paper, we describe a set of extensions designed to improve PKS’s ability to generate plans in realworld robot scenarios, by focusing on three tasks: combining high-level symbolic planning with low-level motion planning, reasoning about noisy sensors and effectors, and facilitating planner-level software integration on robot platforms. PKS has also been integrated into the existing Knowledge of Volumes framework for robot task Planning (KVP) (Gaschler et al. 2013a), aimed at facilitating the use of planners on robot platforms (see Figures 1 and 5). This framework serves as the basis for the robot examples below. Planning with Knowledge and Sensing (PKS) PKS (Planning with Knowledge and Sensing) is a contingent planner that builds plans using incomplete information and sensing actions (Petrick and Bacchus 2002; 2004). PKS works at the knowledge level by reasoning about how the planner’s knowledge state changes due to action. PKS works with a restricted first-order logical language, and limited inference. Thus, unlike planners that reason with possible worlds or belief states, PKS works directly with formulae representing its knowledge state. This representation supports features like functions and variables; however, as a trade-off, some types of knowledge cannot be modelled. PKS is based on a generalisation of STRIPS. In PKS, the planner’s knowledge state, rather than the world state, is represented by a set of five databases, each of which models a particular type of knowledge. Each database’s contents have a formal interpretation in a modal logic of knowledge. Actions can modify the databases, which has the effect of updating the planner’s knowledge. To ensure efficient inference, PKS restricts the type of knowledge (especially disjunctions) the databases can represent: Kf : This database is like a STRIPS database except that both positive and negative facts are stored and the closed world assumption is not applied. Kf can include any ground literal `, where ` ∈ Kf means “the planner knows `. ” Kw: This database models the plan-time effects of sensing actions with binary outcomes. φ ∈ Kw means that at plan time the planner either “knows φ or knows ¬φ,” and that at execution time this disjunction will be resolved. In such cases we will also say that the planner “knows whether φ. ” Kv: This database stores function values that will become known at execution, such as the effects of sensing actions that return constants. Kv can contain any unnested function term f , where f ∈ Kv means that at plan time the planner “knows the value of f . ” At execution time, the planner will have definite information about f ’s value. Thus, Kv terms can act as run-time variables (Etzioni et al. 1992) in plans. Kx: This database models the planner’s exclusive-or knowledge. Entries in Kx have the form (`1|`2| . . . |`n), where each `i is a ground literal. Such formulae represent a particular type of disjunctive knowledge that arises in many planning scenarios, namely that “exactly one of the `i is true. ” LCW: This database stores local closed world information (Etzioni, Golden, and Weld 1994). The LCW database will not be used in this paper. PKS databases are inspected using primitive queries that ask simple questions about PKS’s knowledge. Basic knowledge assertions are tested with a queryK(φ) which asks: “is a formula φ true? ” A query Kw(φ) asks whether φ is known to be true or known to be false. A query Kv(t) asks “is the value of function t known? ” The negation of the above queries can also be used. An inference procedure evaluates queries by checking the contents of the databases, and the interaction between different types of knowledge. An action in PKS is modelled by its preconditions that query the agent’s knowledge state, and its effects that update the state. Action preconditions are simply a list of primitive queries. Action effects are described by a set of STRIPSstyle “add” and “delete” operations that modify individual databases. E.g., add(Kf , φ) adds φ to Kf , and del(Kw, φ) removes φ from Kw. Actions can also have ADL-style conditional effects (Pednault 1989), where the secondary preconditions of an effect are described by lists of primitive queries. Example PKS actions are shown in Figure 3. PKS constructs plans by forward-chaining: if an action’s preconditions are satisfied in a knowledge state, then the action’s effects can be applied to produce a new knowledge state. Planning then continues from this state. PKS can also build contingent plans with branches, by considering the possible outcomes of Kw and Kv knowledge. For instance, if φ ∈ Kw then PKS can construct two branches in a plan: along one branch (theK branch) φ is assumed to be known (φ is added to Kf ), while along the other branch (the K− branch), ¬φ is assumed to be known (¬φ is added to Kf ). A similar type of multi-way branching plan can be built for restricted Kv information. Planning continues along each branch until the goal—a list of primitive queries–is satisfied. A sample PKS plan with branches is shown in Figure 4. We now consider a set of extensions to PKS which we believe are particularly useful for robot task planning. Extensions to PKS for Robot Task Planning In this section we consider three recent extensions to PKS which we believe are useful for robot task planning. First, we describe a mechanism which allows externally-defined procedures (e.g., from support libraries) to be integrated with the internal reasoning mechanisms of the planner. Second, we present an extension of the PKS representation which allows a form of noisy numerical information to be modelled, for instance to represent the effects of error prone sensors. Finally, we describe a software-level application programming interface to PKS, which aids in the engineering task of integrating the planner with a robot system. Executing Externally-Defined Procedures The first extension we describe aims to leverage existing reasoning tools by providing a mechanism for PKS to invoke externally-defined procedures (e.g., special purpose libraries) during plan generation. While this idea is not new, and has been applied in other contexts (see the discussion section), this technique is a recent extension to PKS. In particular, PKS provides an external query mechanism: