## 3 Offline Optimization and Adaptation Under Nonlinear Task Constraints
### Optimization and Adaptation Procedure
#### 3.3.2 Adaptation Procedure
For all methods, we set the same expected 3D positions at each timestep and test the robot non-end-effector modulation performance. We repeat 30 experiments with the results shown in Figure 11 and Table 4. The first row of Figure 11 shows that CHOMP may occasionally generate erratic and random joint configurations when collisions are detected. Additionally, unnecessary spaces are utilized to reach the desired positions, leading to redundant planning. The null space control method in the second row employs a fixed retreat velocity \(x_{w}^{0}\), leading to collisions when the velocity is insufficient to maneuver the robot non-end-effector away from the obstacles. In contrast, our method iteratively employs null space velocity control, gradually increasing \(x_{w}^{0}\) until collison-free to ensure safety, as shown in the last row. Quantitative results are presented in Table 4. For each experiment, we compute the average single-step modulation time and the total joint configuration iterations, namely, the intermediate joint configurations traversed to the expected 3D positions. Additionally, the Cartesian modulation path lengths for the end-effector are derived. We discover that CHOMP achieves a 93.33% success rate with a shorter average single-step modulation time. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **CHOMP** & **Null Space Control in [36]** & **Our Method** \\ \hline Success Rate & 93.33\% & 76.67\% & 96.67\% \\ Average Modulation Time (s) & 0.1434 \(\pm\) 0.0563 & 0.1654 \(\pm\) 0.0146 & 0.1757 \(\pm\) 0.0086 \\ Joint Configurations Iterations & 126 \(\pm\) 24 & 10 \(\pm\) 2 & 20 \(\pm\) 1 \\ Modulation Path (m) & 9.8829 \(\pm\) 1.2368 & 0.8204 \(\pm\) 0.0046 & 0.8232 \(\pm\) 0.0024 \\ Total Task Execution Time (s) & 232.8 \(\pm\)60.2 & 13.2 \(\pm\)0.6 & 13.8 \(\pm\) 0.4 \\ Collision Rate & 6.67\% & 23.33\% & 3.33\% \\ Final Position Error (mm) & 0.83 \(\pm\) 0.16 & 0.66 \(\pm\) 0.14 & 0.59 \(\pm\) 0.06 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Robot non-end-effector modulation comparision. Figure 11: Robot non-end-effector modulation comparison experiments. The first, middle, and last rows denote task execution snapshots of CHOMP, null space control [36], and our method, respectively. However, due to its stochastic nature, it generates a large number of random trajectories, leading to significantly longer modulation paths and higher variability. As a result, the total task execution time is longer. The null space control method yields a lower success rate, as the enforced velocity could not ensure collision-free joint configurations. However, since it only performs a single iteration, the overall execution time is relatively short. Compared to these methods, our approach iterates multiple times to ensure joint configuration safety. While this results in a slightly longer overall execution time, it remains within a reasonable range and meets real-time requirements. Additionally, our method exhibits a lower collision rate, as the iterative process effectively prevents unsafe configurations. The final position error reflects the precision of our approach in maintaining accuracy while successfully completing the obstacle avoidance task. The results indicate that our method enables real-time robot whole-body movement adaptation with a high success rate. When potential collisions for the robot non-end-effector occur, our method can obtain joint configurations through iterations in real-time with minor deviations for the modulated path. By integrating offline optimization and online dynamic modulation, our method can adapt to different robotic tasks by incrementally augmenting skills from human demonstrations offline and performing real-time movement adaptation during task execution. ## 6 Discussion

### Comparison to Previous Work

This paper proposes a human-robot skill transfer strategy including basic-level MPs learning, core-level MPs adaptation, and real-time robot whole-body adaptation.