**7. Manipulation Plan Execution using Sensing and Human Interaction**

When the manipulation conditional plan is achieved, it will be forwarded to for the execution module. Algorithm 4 outlines the process of actions execution performed by the robot or human, and calls to the sensing actions. The conditional plan is initialized from its root [line 1]. For each action of the plan, its type first identified whether it is execution or sensing one. In the case of execution action, if it has to be executed by human, the function executeByHuman asks a person to do the corresponding action [line 5] and an operator then sends a command to the robot that the action has been done successfully. Otherwise, the action is executed by the robot [line 7].

On the other hand, if the type of action becomes sensing, the function senseAct determines the binary value of the sensing action which is *True* or *False*. This is done using the perception module allocated for the robot. Depending on the type of uncertainty, the function may request to human or activate a sensing module to observe the action value. Regarding the *CheckCan* or *CheckOpen* sensing actions, human information is used, while a sensing module is used for the *SensePose* and *SenseColor* sensing actions.

**Algorithm 4:** Manipulation Plan Execution

**inputs :** *π* initializePlan(*π*) **foreach** *{HS* ∈ *π}* **do if** *HS* ∈ A **then if** *HS*.*name* = HumanTransfer Or HumanOpen **then** executeByHuman(*HS*) **<sup>6</sup> else** executeByRob(*HS*) **<sup>8</sup> else** *Res* = senseAct(*HS*) selectBranch(*π*, *HS*, *Res*)
