## 4 Approach
### Sampling-Based Configuration Generation Method  
In pick and place tasks, only the position and rotation constraints of the end-effector are given, the corresponding configuration for the mobile manipulator should be calculated first before path planning. In the traditional RRT-based algorithm, the configuration of the mobile base and the grasping pose of the end-effector are first selected according to some principles, and then the configuration of the mobile manipulator is calculated using inverse kinematics. This method is useful in open spaces without massive obstacles [33], but in confined spaces, it is not a simple task. The main problem is that it is difficult to determine a suitable configuration of the mobile base and a suitable configuration of the end-effector. The concept of inverse reachability map seems to be useful here, but an inverse reachability map is not suitable for narrow spaces [37; 38]. In order to ensure that the corresponding configuration is available and collision-free in the scenario, it is necessary to establish the inverse reachability map for the specific scenario. Therefore, we propose a method similar to the creation of an inverse reachability map to directly find a feasible mobile manipulator configuration corresponding to an end-effector pose. In confined spaces, it is difficult to establish a rule for determining the configuration of the mobile base, since it is almost impossible to know whether a corresponding collision-free configuration of the manipulator exists. Therefore, we adopt a sampling-based approach to find a feasible collision-free configuration of the manipulator by trying different mobile base configurations and end-effector configurations. The procedure is shown in Algorithm 2. ```
1 Input: \(X_{goal}\): = [\(R\), \(T\)]
2 Output: \(q_{x}^{\text{\tiny{m}}}\): = [ \(q_{x}^{\text{\tiny{m}}}\), \(q_{x}^{\text{\tiny{m}}}\)]
3\(X_{\text{\tiny{e}}}\) is the pose of the end-effector
4 while!SMMCONFIGVALID(\(q_{x}^{\text{\tiny{m}}}\))do
5 while!ISEECONFIGVALID(\(X_{\text{\tiny{e}}}\), \(X_{goal}\))do
6\(X_{\text{\tiny{m}}}\leftarrow\) SAMPLEECONFIG(\(X_{goal}\))
7 endwhile
8 while!ISMBCONFIGVALID(\(q_{x}^{\text{\tiny{m}}}\))do
9\(q_{x}^{\text{\tiny{m}}}\leftarrow\) SAMPLEEMBCONFIG()
10 endwhile
11\(q_{x}^{\text{\tiny{m}}}\leftarrow\) CALMANIPCONFIG(\(X_{\text{\tiny{e}}}\), \(q_{x}^{\text{\tiny{m}}}\))
12\(q_{x}^{\text{\tiny{m}}}\leftarrow\) [\(q_{x}^{\text{\tiny{m}}}\), \(q_{x}^{\text{\tiny{m}}}\)]
13 endwhile
```  
**Algorithm 2**SCG(\(X_{goal}\))  
First, a valid end-effector configuration \(X_{\text{\tiny{e}}}\) is sampled based on the given end-effector position and rotation constraints. The configuration \(X_{\text{\tiny{e}}}\) can be represented by a position matrix T and a rotation matrix \(R\). Usually the position matrix is fully given, but the rotation matrix is partially given with some constraints. The orientation of the end-effector affects the mobile manipulator configuration and is related to the ability to find collision-free mobile manipulator configurations. For example, the end-effector is constrained to be parallel to the ground, but the direction is not required. In this case, the direction of the end-effector, or the rotation matrix R, could be sampled in order to generate a valid collision-free configuration for the manipulator. Algorithm 2 SAMPLEECONFIG() is used to generate the end-effector configuration, and ISEECONFIGVALID() is used to check whether the configuration satisfies the constraints of \(X_{goal}\). The configuration of the mobile base \(q_{g}^{\text{\tiny{m}}}\) should then be sampled, as shown in Algorithm 2 SAMPLEMBCONFIG(). A simple way to perform this is to sample the mobile base configuration within a circle centered on the end-effector position and radiused from the workspace radius of the manipulator. In practice, however, the mobile base positions that allow the acquisition of viable mobile manipulator configurations are not uniformly distributed within the circle.