# Contingent Task and Motion Planning under Uncertainty for Human-Robot Interactions
## 4 Relaxed Geometric Reasoning for Mobile Manipulators  
Relaxed geometric reasoning is the evaluation of geometric conditions of actions with no call to motion planning. It indicates that a feasible motion is likely to be obtained for the selected actions if certain task constraints are satisfied. Therefore, the relaxed geometric reasoning process contains three modules: _reachability reasoning, spatial reasoning_, and _manipulation reasoning_. This set of reasoning extends our previous relaxed geometric reasoning process [19] to consider reasoning on mobile manipulation along human actions. _Reachability reasoning (\(\mathcal{R}_{\text{rch}}\))_: This reasoning is applied for only _transit_ action. To transit the robot to a target position, a feasible arm configuration and robot base pose must be first obtained. A set  
Figure 1: The proposed system overview of contingent task and motion planning using the extended version of _Contingent-FF_. of robot poses is considered in the workspace of the robot. From each pose, an _Inverse Kinematic (IK)_ solver is called for each candidate grasping pose, and moreover the result of _IK_ is determined whether it is collision-free or not. The first collision-free _IK_ solution along the corresponding grasping pose is reported if possible. Otherwise, failure is reported if there is neither _IK_ solution nor collision-free configuration among a set of robot poses. Accordingly, the reasoner returns the collisionable objects. _Spatial reasoning (\(\mathcal{R}_{sp}\))_: This reasoning is applied for the _transfer_, _push_, _open_, _humanOpen_, and _humanTransfer_ actions. This is considered to find a valid placement for an object within a given region with no consideration of the robot. A pose is sampled, i.e., an object lies in the target region and the initial stable posture is maintained. The feasibility of the sampled pose is also determined through a collision-checking procedure to verify whether there are any collisions with other objects in the robot environment or not. If it is valid, the sampled pose is stored in the geometry details of the action which transfers the object. Otherwise, another sample will be attempted. In the case that all tried samples are not valid, failure occurs and the collisionable objects are reported. Moreover, some constraints are taken into consideration while the sample placement is accomplished. For example, in the case of the _push_ action, the sample is considered in the direction in which the object is being pushed. In the case of _humanOpen_ and _Open_, the valid object placement is extracted from the object feature (the box cap is assumed to have a single full-open position). _Manipulation reasoning (\(\mathcal{R}_{mnp}\))_: This reasoning is considered to evaluate the compatibility of the grasp poses to move an object from the initial position to the final one (using \(\mathcal{R}_{sp}\)). The process applies \(\mathcal{R}_{rch}\) reasoning to return on of the feasible ways to transfer an object from initial to final position in terms of collision-free _IK_ solution. In the case that there is no possible solution meeting these conditions because of collisions, then the collisionable objects are returned. In this way, it can obtain the valid robot pose and grasping configuration when the robot manipulates an object. Algorithm 1 describes the relaxed geometric function when applying the actions. Algorithm is detailed below:  
* Reasoning about the robot actions [lines 5-15]: The _transit_ action calls the reachability reasoning by the function \(\mathcal{R}_{rch}\) [line 6]. The _transfer_, _push_ and _open_ actions call the spatial reasoning by the function \(\mathcal{R}_{sp}\) [line 11], and then call the function \(\mathcal{R}_{mnp}\) [line 13]. If the reasoning processes are successfully done, the corresponding response is set to feasible and geometric details are appended to the evaluated action [line 8] and [line 15].