1 Introduction

With the growing capabilities of robot hardware and software mobile robots are becoming more useful in real world environments. This makes reasoning about actions and their execution increasingly important if we want the robot to operate autonomously and to adapt to various situations. The presented dissertation [9] deals with the question of how planning algorithms can be used and adapted to the needs of robotic systems.

One important aspect of plan-based robot control is the need for hybrid planning. Robotic environments and the tasks can contain various forms of knowledge like temporal, causal, and spatial information and constraints. Consider the example of a robot waiter in a restaurant that is given tasks like serving a hot coffee with milk and sugar. This is the main demonstration scenario that has been used throughout the thesis and stems from the project RACE [4]. Figure 1 shows the robot PR2 grasping and placing a sugar pot in our toy-restaurant environment. To create plans for this kind of tasks the robot needs to consider the causal preconditions and effects of its actions: what must be fulfilled in order to execute an action, and which changes will occur by executing it. For example, in order to grasp an object, the robot’s gripper must first be empty, and afterwards it will be holding the object. This is the kind of knowledge that classical task planners employ. But the robot should also make sure that the coffee is served hot. This can be encoded with temporal information. Furthermore, resources are important as the robot has to move three objects but the PR2 has only two arms. In addition to that it may even consider information from other sources like estimates of the duration of how long it takes to drive to a given pose, which can be provided by the robot’s path planner. To act robustly in such environments the robot should consider all of these forms of knowledge. Since many of those requirements are in mutual dependency, this should be done in an integrated way. However, any approach to such hybrid planning faces a huge search space for constructing the plan. Therefore, the thesis presents a way to build on a general approach for hybrid planning and combine it with hierarchical planning. This way, the decomposition technique from hierarchical planning serves as a powerful heuristic to reduce the huge hybrid search space.

Fig. 1
figure 1

PR2 grasping (left) and placing a sugar pot

The remainder of the paper first describes the use of a hierarchical planner in a robot control architecture and how robustness can be improved by a closer coupling of planning and plan execution. Afterwards the idea of hierarchical planning and hybrid reasoning are combined in a new hybrid planner (Sect. 3) and Sect. 4 explains how this planner can directly be used for plan execution as well. The paper closes with a conclusion and outlook on possible future work.

2 Hierarchical Planning for Plan-Based Robot Control

To enable the robot to reason about the necessary actions it has to undertake to achieve complex tasks, hierarchical task network (HTN) planning [3] proved to be useful. In contrast to classical planning, with its flat representation of the possible actions, HTN planning distinguishes non-primitive and primitive tasks. Methods describe how non-primitive tasks can be decomposed into subtasks. The planner begins with the non-primitive goal task and applies methods to decompose those non-primitive tasks into subtasks until only primitive tasks are left that can be executed on the robot.

As a first step, the thesis presents how an off-the-shelf hierarchical planner can be integrated into the RACE architecture [4] and how those plans can be executed with a state machine-based approach [10]. The resulting plans are transformed into a state machine whose states correspond to the primitive tasks in the plan and call corresponding ROS [8] actions. This approach allows a quick and straightforward integration of an overall system but comes with the cost of low flexibility to adjust to the needs of changing environments. For example, in dynamic environments objects that the robot planned to use might have been moved between the time of planning and the time where the robot should grasp the object. Therefore, the thesis describes extensions how this can be integrated with a semantic execution monitoring approach and how concrete object instances can be abstracted away by means of smaller changes in the domain representation [5].

This approach showed that hierarchical planning is beneficial for mobile robots. The use of methods makes planning fast and gives the domain designer another way to provide additional expert knowledge and restrict the possible plans to those leading to a save robot behaviour. Those methods could also be learned; and the decompositions lead to plan hierarchies that are meaningful for humans.

3 Hierarchical Hybrid Planning

Due to the requirements that have been pointed out in Sect. 1 hybrid planning is another important aspect of plan-based robot control and an active research topic that is the subject of multiple other dissertations [1, 6, 12]. Compared to other current approaches to hybrid planning, meta-constraint reasoning [2] has the advantage that it addresses the different forms of knowledge in an integrated way instead of handling them separately. Mansouri [6] applied this to robotic applications by integrating temporal, spatial, causal, and resource requirements. However that approach lacked advanced causal planning capabilities and considering all of these different forms of knowledge leads to a huge search space. Based on our experiences from plan-based robot control with an HTN planner we aimed at combining the advantages of the two approaches. We extend the work by Mansouri by using the hierarchical task decomposition strategy as a powerful means to guide the search and reduce the hybrid search space to make it feasible for more complex robot plans. This combination resulted in the new planner CHIMP and is the main contribution of the presented thesis.

A meta-CSP is a high-level CSP that represents a hybrid problem in different levels of abstraction. Meta-constraints impose high-level requirements on a common constraint network. Their meta-variables are subsets of the constraint network that are in conflict with a high-level requirement, and meta-values are the possibilities to resolve such a conflict. Those resolvers are added as additional variables and constraints into the underlying common constraint network. A CSP-style backtracking search is used to find a solution in which the common constraint network is consistent and also adheres to the requirements represented by the meta-constraints. With this modular approach new requirements can be integrated as additional meta-constraints. Details can be found in [6] and in the presented thesis.

CHIMP employs such a meta-CSP approach and uses the hierarchical task-decomposition strategy to reduce the huge hybrid search space. It integrates hierarchical causal knowledge, temporal knowledge, resource and state variable scheduling as well as knowledge from external sources, like the estimated time the robot needs to drive between two poses. For this CHIMP combines symbolic and temporal constraints in its common constraint network, on which the HTN decomposition strategy, the scheduling and the calls to external reasoners are implemented as meta-constraints.

The HTN-meta-constraint implements the partial order forward decomposition strategy of SHOP2 [7]. It searches the common constraint network for tasks that have not been planned yet, and that have no unplanned predecessors. These are meta-variables that are resolved by applying methods or operators to the task and inserting the preconditions and subtasks or effects as additional constraints and variables into the common constraint network. After adding a meta-value, the common constraint network is checked for temporal and symbolic consistency. If it is inconsistent, backtracking is applied; otherwise the planner proceeds with checking meta-constraints. A plan has been found when all requirements represented by the meta-constraints are fulfilled and the common constraint network is temporally and symbolically consistent.

CHIMP’s hybrid planning capabilities can be used in different demonstration scenarios that the thesis discusses in detail. In our example restaurant domain, the robot was given the task to serve a hot coffee with milk and sugar. Figure 2 shows the floor layout of the environment and the initial situation. To make sure that the coffee is served hot and the deadline on the goal task is not violated, the planner has to choose the sugar pot from the adjacent table instead of the one on counter2. For this CHIMP estimated the required driving time with its dedicated meta-constraint. CHIMP can generate such a plan for moving those three objects in about 1.4 sec, which is low compared to the overall execution time in the order of minutes. Furthermore, it can use its scheduling capabilities for determining actions that can be executed concurrently, such as moving the robot’s torso and tucking the arms, which in turn decreases the execution time.

Fig. 2
figure 2

Layout of the demonstration environment

4 Plan Execution

Plan execution is a crucial part of plan-based robot control in dynamic environments. The planned actions need to be dispatched on the robot at the right time and the nominal behaviour should be monitored. A hybrid representation has many advantages for plan execution, too. The temporal requirements can explicitly be modelled with relations from Allen’s interval algebra with metric bounds. For example, for the grasp-action we can represent the effect that the robot should start holding the mug during grasping and that it should continue to hold it until the place-action is used later in the plan. This way, an execution failure where the mug has slipped trough the gripper can be detected early.

CHIMP can dispatch plans by directly using the constraint network that has been used for plan generation. For this it currently employs a time-line based approach that depends on temporal information and action results. The constraint network that represents the plan is permanently updated as time passes and actions are finished. An action is dispatched as soon its earliest start time is less than the current time.

This close connection of planning and plan execution that uses the same constraint network even allows to extend the plan during execution. CHIMP can include new goal tasks into an existing plan at execution time [11]. This has been shown in a scenario where the robot was initially given the task of moving coffee1 to the guest’s table. After CHIMP generated a plan and the robot started driving, another goal task to also bring milk1 to that table was given. Thanks to its partial-order planning capabilities CHIMP was able to merge a plan for the second task into the existing plan. The robot did not even need to be stopped but continued executing the plan. For this plan merging CHIMP uses a second strategy for planning non-primitive tasks: it tries to unify new (sub-)tasks with existing ones. In the new plan the robot moves both objects at the same time, but respects the resource constraints that it can only grasp one object at a time and schedules those two grasping tasks to execute them consecutively.

5 Conclusion and Outlook

The presented dissertation discusses how hybrid reasoning and hierarchical planning are combined in the new planner CHIMP that incorporates the advantages of both approaches for mobile robots. Its expressive domain representation language is useful for plan generation as well as plan execution. Currently, it can reason about causal, temporal and resource knowledge and make use of knowledge provided by external reasoners. As it is based on the more general meta-CSP reasoning approach, it can even be extended with other forms of knowledge, which is demonstrated in the thesis by examples of additional domain-specific meta-constraints. In future work it could also make sense to integrate spatial reasoning. This extensibility is an advantage CHIMP has over other hybrid planners like FAPE [1] that combines temporal and hierarchical planning and the hierarchical timeline-based planner EPSL [12]. Despite its hybrid search space, CHIMP’s hierarchical planning approach keeps planning time low so that it can be used online on the robot.

Another important aspect of plan-based robot control is the tight integration of planning and execution. The constraint network that represents the plan can be used for dispatching actions on the robot. This also allows to integrate and plan additional tasks into an existing plan without the robot having to stop. Furthermore, the thesis presents means for a close coupling of an off-the-shelf hierarchical planner and a semantic execution monitoring approach, which allows to create a more abstract plan that is refined at execution time. In future work we will investigate how such a tight coupling can be extended and integrated into CHIMP.