## 4 Approach
### Iterative Sampling in the Neighborhood  
It is extremely difficult, if not impossible, to obtain a feasible path in a complex high-dimensional space relying only on random sampling. Therefore, we proposed a method that iteratively generates a feasible path by continuously sampling in the neighborhood, starting from the searched collision-free goal configuration of the mobile manipulator. In order to improve efficiency, we use a collision-free path of the end-effector as a reference to guide the iterative generation. As shown in Algorithm 3, CALEESTARTANDGOAL() first calculates the start and goal positions of the end-effector, and then a traditional RRT algorithm [14] is used to generate a path, as shown in Figure 6a. A cutting method that is the same as in [33] is used here, which is PRUNE() in Algorithm 3, to optimize the path generated by the RRT, and the result is shown in Figure 6b. Sometimes, there are different paths, such as shown in Figure 6c, and so it is necessary to check whether the path is suitable with the goal configuration of the mobile manipulator. If the configuration of the mobile manipulator is as shown in Figure 6d, it is better to use the path in Figure 6b as the reference path rather than the path in Figure 6c. This is checked with CALCOSTPATH() in Algorithm 3. Here, we propose a keypoint-based approach to represent the proximity of the mobile manipulator configuration to the end-effector path. ```
1 Input:\(q_{e}^{\text{max}}\), \(q_{e}^{\text{max}}\)
2 Output:\(\Pi^{\text{\emph{\tiny\emph{\tiny\emph



as shown in Figure 7b. If the cost is less than the set threshold, the mobile manipulator configuration is considered to match the end-effector path. The cost can be expressed as

\[cost_{path}(q^{mm})=\sum\text{distance}(K_{i},\Pi^{ee}). \tag{3}\]

After determining the reference path, we propose an iterative sampling-based method to generate the mobile manipulator path, which samples in the neighborhood of the last configuration, causing the mobile manipulator to move along the reference path (as shown in Algorithm 4). Given \(q^{mm}_{now}\) as an initial value, SAMPLEQ) in Algorithm 4 is used to sample a configuration \(q^{mm}_{sample}\) so that each element \(q^{sample}_{i}\) of \(q^{mm}_{sample}\) satisfies

\[q^{sample}_{i}\in\dot{U}(q^{now}_{i}\,\ \delta_{i}), \tag{4}\]

\[\dot{U}(\ q^{now}_{i},\ \delta_{i})=\{x|\ 0\ \langle\ |\ x-q^{now}_{i}\ |<\delta_{i}\}\, \tag{5}\]

where \(\delta_{i}\) is the stepsize of \(i\)th element in the configuration, and \(q^{now}_{i}\) is the element of \(q^{mm}_{now}\). Choosing the appropriate stepsize ensures that if both the initial value configuration and the sampled configuration are collision-free, then the motion between the two configurations can also be considered collision-free. Since both the mobile base and the manipulator are sampled during the iterative sampling process, the generated motions are simultaneous, which facilitates the manipulation flexibility of the mobile manipulator. Here, we first sample a certain number of collision-free configurations as alternatives, and then select an optimal configuration to add to the path of the mobile manipulator. When selecting the optimal configuration, there are two main issues to consider: how well the configuration fits the reference path of the end-effector, and whether it is moving towards the target. As shown in Figure 7c, the reference path actually represents a collision-free tunnel, and trying to move the manipulator along the tunnel (as shown in Figure 7d) is more likely to find a feasible collision-free path, thus avoiding the time wasted caused by random sampling. Thus, the cost used to evaluate the configuration consists of two parts, \(cost_{path}\), which represents the degree of fit to the reference path, and \(cost_{target}\), which represents the movement towards the target. The first part, \(cost_{path}\), was defined in Equation (3).