## 3 Offline Optimization and Adaptation Under Nonlinear Task Constraints
### Optimization and Adaptation Procedure
#### 3.3.2 Adaptation Procedure
The experimental results demonstrate that our method can ensure a high success rate while meeting real-time requirements. The strategy is general and can be applied to other redundant robotic arms. Concerning the potential scalability of the proposed strategy to other frameworks that do not necessarily use ProMPs, in this paper, we first generalize a large set of collision-free trajectories through via-point generalization from a single human demonstration. To denote different ways of completing the task, we can use other probabilistic frameworks to encode the distribution. We decouple ProMPs into Gaussian distributions at each timestep, optimizing Gaussians for those time steps violating task constraints, and then obtain the optimized ProMPs separately. This approach can be extended to other probabilistic methods, such as using the GMM to model the overall Gaussian distributions and obtain the mean and standard deviation for each timestep with GMR. By applying our task-constrained optimization methods, the Gaussian distributions for each timestep can be optimized with new probability distributions derived by the characteristics of other probabilistic methods. For real-time movement adaptation, we integrate the optimized trajectory for end-effector dynamic modulation. This process can also be used with other MPs to generalize real-time trajectories. Meanwhile, we incorporate Joint ProMPs into the null space velocity control formulation. For other probabilistic methods, the formulation will integrate their probabilistic nature so that during real-time movement adaptation, the robot can preserve the offline-optimized distributions. Future work will focus on enabling robotic arms to perform more complex tasks in extremely confined spaces, such as opening doors or manipulation of deformable objects, while avoiding obstacles in real-time. Conceptualization, G.D., X.Z. (Xizhe Zang) and X.Z. (Xuehe Zhang); Methodology, G.D.; Software, X.Z. (Xizhe Zang) and X.Z. (Xuehe Zhang); Validation, G.D.; Formal analysis, G.D.; Investigation, G.D.; Resources, X.Z. (Xizhe Zang), X.Z. (Xuehe Zhang), C.L. and J.Z. ; Data curation, G.D.; Writing--original draft, G.D.; Writing--review & editing, G.D.; Visualization, G.D. and C.L. ; Supervision, X.Z. ([PERSON]), X.Z. ([PERSON]), C.L. and Y.Z. ; Project administration, Y.Z. and J.Z. ; Funding acquisition, Y.Z. and J.Z. All authors have read and agreed to the published version of the manuscript. **Funding:** This research was founded by the Advanced Technology Marine Vessel Research Project (CBZ02N23-05), the National Outstanding Youth Science Fund Project of National Natural Science Foundation of China (52025054), and the Major Research Plan of the National Natural Science Foundation of China (92048301). **Institutional Review Board Statement:** Not applicable. **Informed Consent Statement:** Not applicable. **Data Availability Statement:** The raw data supporting the conclusions of this article will be made available by the authors on request. **Conflicts of Interest:** The authors declare no conflicts of interest. ## References

* [PERSON] et al. (2022) [PERSON]; [PERSON]; [PERSON]; [PERSON] A survey of robot learning strategies for human-robot collaboration in industrial settings. _Robot. Comput.-Integr. Manuf._**2022**, _73_, 102231. [CrossRef]
* [PERSON] et al. (2009) [PERSON]; [PERSON]; [PERSON]; [PERSON] A survey of robot learning from demonstration. _Robot. Auton. Syst._**2009**, _57_, 469-483. [CrossRef]
* [PERSON] (2018) [PERSON]; [PERSON] Robot learning from demonstration in robotic assembly: A survey. _Robotics_**2018**, \(7\), 17. [CrossRef]
* [PERSON] (2018) [PERSON] Learning from demonstration (programming by demonstration). _Encycl. Robot._**2018**, 1-8. [CrossRef]
* [PERSON] (2024) [PERSON]; [PERSON] A survey of demonstration learning. _Robot. Auton. Syst._**2024**, _182_, 104812. [CrossRef]
* [PERSON] et al. (2022) [PERSON]; [PERSON]; [PERSON]; [PERSON] A survey of imitation learning: Algorithms, recent developments, and challenges. _IEEE Trans.