Abstract
Safe human-to-humanoid motion imitation is crucial for shared environments, where direct motion retargeting may induce self-collision or human–humanoid collision due to embodiment mismatch, kinematic limits, perception uncertainty, and human proximity. This paper presents an online vision-aided safe human-to-humanoid motion imitation framework that integrates skeleton-based upper-body pose estimation, joint-space retargeting, and capsule-based Control Barrier Function Quadratic Program (CBF-QP) safety filtering. Human skeletal observations are mapped to a reduced eight-degree-of-freedom (8-DoF) humanoid upper-body command, while the CBF-QP layer computes a safety-corrected target that minimally modifies the nominal imitation command subject to robot self-collision and human–humanoid collision constraints. The framework is evaluated via simulation and hardware experiments under representative self-collision and human–humanoid interaction episodes, complemented by a comparative benchmark against velocity damping and potential field baselines. Furthermore, this work introduces an evaluation protocol combining geometric safety, command deviation, and local-link similarity metrics to systematically characterize the safety–imitation trade-off governed by CBF parameters. The results demonstrate that, within the tested moderate-speed regime, the proposed framework substantially reduces geometric collision violations while balancing imitation fidelity with online computational feasibility, thereby providing a viable foundation for safe human-guided humanoid motion deployment.
1. Introduction
Humanoid robots are increasingly expected to operate in environments originally designed for humans, including domestic assistance, healthcare support, industrial collaboration, disaster response, and service robotics. Their anthropomorphic morphology allows them to use human-oriented tools, move through human workspaces, and interact with people in a physically intuitive manner [1]. However, programming humanoid robots for diverse real-world tasks remains challenging because of their high-dimensional kinematics, complex dynamics, and strong dependence on task context [2,3]. Human-to-humanoid imitation and teleoperation provide a practical route for transferring human motion intent to humanoid platforms, enabling intuitive command generation without requiring task-specific low-level programming [4,5]. This direction is also closely related to broader developments in human–robot interaction and safe deployment in human-centered environments [6,7].
A substantial body of work has investigated how human motion can be mapped to humanoid robots. Geometric and kinematic retargeting methods typically construct correspondences between human body segments and robot links, and then solve inverse kinematics, quadratic programming, or optimization problems to generate feasible robot references [8,9,10]. More recent vision-based approaches have explored monocular, RGB-D, and skeleton-based perception for human motion retargeting, where estimated human motion is converted into humanoid joint commands for real-time teleoperation [11,12]. In parallel, learning-based imitation and teleoperation methods have improved the expressiveness and robustness of humanoid motion generation by combining large-scale motion data, retargeting, reinforcement learning (RL), behavior cloning, and sim-to-real transfer [13,14,15,16]. These studies have significantly advanced human-to-humanoid motion transfer, but they primarily focus on motion feasibility, tracking quality, naturalness, and teleoperation performance.
Despite these advances, accurate imitation alone is not sufficient for deploying humanoid robots in shared environments. Human motions may be natural for the demonstrator but unsafe for the robot because of embodiment mismatch, different limb proportions, joint limits, actuator constraints, perception latency, and the presence of nearby humans [17]. For example, crossing arms, reaching across the torso, or moving close to another person can induce robot self-collision or human–humanoid collision after retargeting. These risks are particularly relevant in physical human–robot interaction and collaborative workspaces, where safety is not only a control requirement but also a prerequisite for practical deployment [18,19]. Existing safety studies in human–robot collaboration emphasize collision modeling, separation monitoring, speed limitation, and verification of safe interaction conditions. However, most human-to-humanoid imitation studies do not explicitly address the safety risks induced by the imitation process itself.
Control barrier functions (CBFs) provide a principled framework for enforcing safety constraints in real time. The CBF-QP formulation introduced by Ames et al. unifies safety conditions, expressed as forward-invariant sets, with performance objectives through quadratic programming [20]. A key advantage of CBF-QP methods is that they can minimally modify a nominal control input while enforcing state-dependent safety constraints [21,22]. This property is well suited to imitation control: the nominal retargeted command represents the desired human-like motion, while the CBF constraints provide a systematic mechanism for preventing unsafe configurations. Thus, the safety layer can be interpreted as an online filter that preserves imitation as much as possible, subject to formally specified safety inequalities.
Recent advances in safety-control methods have extended CBF-based and other related approaches to collision avoidance and interaction safety constraints in robotic systems [23,24,25,26,27]. To position the present work within the broader literature, Table 1 summarizes representative works in terms of their task focus, platform, imitation capability, self-collision safety, human–robot safety, and safety mechanism. These studies provide important foundations, but they primarily focus on their respective task settings, such as humanoid teleoperation, robot-internal safety control, human–robot separation, general collision avoidance, or contact-safe robot behavior, rather than on safety filtering within a real-time human-to-humanoid imitation pipeline. Moreover, the trade-off between safety enforcement and imitation fidelity introduced by such filtering has received limited systematic attention.
Table 1.
A brief comparison of representative related works (not comprehensive).
This paper addresses the above gap by developing a safety-aware online human-to-humanoid upper-body imitation framework, as shown in Figure 1. The framework maps camera-observed human skeletal motion to an eight-degree-of-freedom (8-DoF) humanoid upper-body representation, generates nominal robot joint commands through retargeting, and applies a capsule-based CBF-QP safety filter before execution. By placing the safety layer between nominal retargeting and robot execution, the framework explicitly separates the nominal imitation command from the CBF-corrected command, making it possible to analyze how geometric safety enforcement affects imitation behavior. The evaluation therefore combines geometric safety metrics, including minimum clearance, violation time, and collision count, with imitation metrics based on joint-space deviation and local-link direction similarity after temporal alignment. These metrics are used to assess how effectively the framework reduces self-collision and human–humanoid proximity violations while preserving the structure of the demonstrated motion. They also provide a common basis for comparing the proposed CBF-QP with alternative safety filters (velocity-damping and potential-field baselines), and for analyzing how CBF margins and gains shape different safety–imitation operating regimes.
Figure 1.
Overview of the proposed safe human-to-humanoid motion imitation framework.
The main contributions of this paper are summarized as follows:
- A complete online safe-imitation problem formulation is presented for vision-based human-to-humanoid motion imitation. Unlike studies that treat retargeting, self-collision avoidance, and human–humanoid separation separately, this work considers them within a single modular pipeline, from camera-observed human motion to safe humanoid execution. This modular structure also provides a baseline framework that can be extended to richer perception modules or higher-DoF humanoid platforms.
- A task-specific safety layer is developed for human-to-humanoid imitation by adapting capsule-based CBF-QP filtering to nominal retargeted joint commands. The safety layer enables the humanoid robot to avoid both self-collision and human–humanoid collision while preserving the qualitative structure of the imitated human motion.
- The proposed pipeline is evaluated through matched simulation and online hardware experiments in representative self-collision and human–humanoid interaction episodes. The results show that the CBF-QP safety layer substantially reduces unsafe behavior and enables safety-aware imitation in both simulation and real robot execution. A supplementary simulation comparison against alternative safety-filter baselines is also included to contextualize the CBF-QP behavior.
- A systematic safety–imitation evaluation protocol is introduced for CBF parameter analysis. By comparing nominal and CBF-filtered commands through complementary safety, imitation, and feasibility metrics, this protocol quantifies the safety–imitation trade-off and provides empirical guidance for selecting CBF margins and gains in safe imitation tasks.
The remainder of this paper is organized as follows. Section 2 presents the proposed safety-aware human-to-humanoid imitation framework. Specifically, Section 2.1 describes the vision-based upper-body motion representation and retargeting pipeline, Section 2.2 formulates the CBF-QP safety filter, and Section 2.3 defines the safety and imitation metrics used for quantitative evaluation. The simulation and hardware results are reported in Section 3, together with a safety–imitation trade-off analysis under different CBF parameters. Section 4 discusses the implications and limitations of the proposed framework, and finally, we conclude this work in Section 5.
2. Materials and Methods
2.1. Human-to-Humanoid Motion Retargeting
2.1.1. Vision-Based Pose Angle Estimation
This work estimates a reduced set of human upper-body joint variables from vision-based skeleton observations. Rather than solving a full inverse kinematics problem from noisy 3D keypoints, we directly extract an 8-DoF upper-body representation from camera-estimated 3D body-skeleton keypoints. The reduced representation captures the dominant torso and arm motions required for humanoid upper-body retargeting while remaining compact, interpretable, and structurally less sensitive to coordinate fluctuations.
Let denote the reduced human upper-body pose. The first two components, , describe torso inclination, while the remaining six components describe shoulder and elbow motion for the left and right arms, , with . This representation separates global upper-body orientation from local arm articulation and provides the input variables used by the subsequent robot-side retargeting map.
Human keypoints are represented in the camera global frame , which is used as the working world frame of the perception system. A local torso frame is then constructed online from the pelvis and bilateral shoulder keypoints. This body-centered frame is used to express upper-arm motion relative to the human trunk. The torso frame is constructed from three skeleton landmarks: pelvis, left shoulder, and right shoulder. Its origin is placed at the pelvis. The upward axis is defined from the pelvis to the shoulder center, the lateral axis is obtained from the shoulder line after orthogonalization with respect to the upward axis, and the remaining axis is computed by a right-handed cross product. This construction yields an orthonormal local frame that adapts to the current trunk orientation. The torso roll and pitch angles are computed from the orientation of the torso frame relative to the global vertical direction. The shoulder angles are computed from the upper-arm vectors expressed in , so that arm motion is measured relative to the trunk rather than the external world. The elbow-pitch angles are computed from the angle between the corresponding upper-arm and forearm segments. Accordingly, the full 8-DoF representation is estimated directly from the seven keypoints . Note that before retargeting, several preprocessing and filtering steps are applied to reduce the effect of noisy or invalid keypoint observations, including confidence-based rejection, validity checks, temporal smoothing, and rate limiting. A compact sensitivity analysis is provided in Appendix A.4.
The final quantities used in this work are the following:
where is the global upward unit vector; , , and are the torso-frame axes expressed in ; and , , , and denote the left/right upper-arm and forearm vectors expressed in . The terms , , , , , and are the components of the left/right upper-arm vectors expressed in . This reduced pose vector is used as the input to the human-to-humanoid retargeting module. Detailed coordinate-frame definitions and implementation details are provided in Appendix A.
2.1.2. Joint-Space Retargeting
The humanoid upper-body imitation space is defined as
where and denote waist roll and pitch, respectively, and , , and denote the left/right shoulder-pitch, shoulder-roll, and elbow-pitch joints. Let denote the calibrated neutral human pose and denote the robot home configuration. The nominal retargeting map is defined as
where is an element-wise retargeting vector accounting for both joint-axis alignment and range scaling. Its entries have unit magnitude, with signs selected to match the robot and human coordinate conventions. The offset vector is set to zero, and the home configuration is chosen as the neutral upper-body posture used by the controller to provide a repeatable robot-side baseline. At system startup, the user-specific neutral pose is automatically established by averaging the measured human joint angles over a brief initialization window while the operator holds a relaxed posture. Consequently, the online retargeting mapping relies on the relative displacement , reducing sensitivity to variations in the absolute standing posture across operators. The resulting is the nominal imitation command before safety filtering and is forwarded to the CBF module as the unfiltered upper-body joint command.
2.2. CBF-QP Safety Control
2.2.1. Capsule-Based Collision Model
To obtain a compact differentiable collision representation, the active CBF collision model represents both the robot and the human using seven main capsules: . Each capsule is parameterized by two endpoints and a radius, as detailed in Table 2. All capsule endpoints are expressed in the robot reference frame before distance evaluation. Robot endpoints are updated via forward kinematics, whereas human capsule lengths vary with the observed user skeleton keypoints. The capsule radii are fixed, with the configurable parameters chosen slightly conservatively in this study to provide a robust safety buffer across various user statures. Additional human primitives, such as the shins and a head sphere, are maintained for geometric completeness but are excluded from the active CBF pair list because they are not involved in the targeted upper-body interaction episodes. The monitored human–humanoid pairs focus on the dominant safety-critical proximities in this study, including robot arm–human arm, robot arm–human torso, robot torso–human arm, robot arm–human thigh, and torso–torso proximity. This targeted pair selection keeps the online QP compact while covering the collision modes evaluated in the experiments.
Table 2.
Geometric parameters of the collision capsules.
2.2.2. Collision-Avoidance CBF Constraints
Consider a capsule pair A and B, with radii and , endpoints and , and closest points and . The closest-point distance is defined as , where collects the capsule endpoint positions. The corresponding capsule pair barrier function is defined as
where is the prescribed safety-distance margin. Therefore, indicates that the capsule pair satisfies the prescribed safety boundary, corresponds to the boundary, and indicates violation of the safety-distance margin.
The first-order CBF condition is imposed as
where is the CBF gain. In this work, the pair-type parameters and are used for robot–robot self-collision pairs and human–humanoid pairs, respectively. The CBF condition constrains the evolution of : it permits approach when the pair remains safely separated, restricts further decrease near the safety boundary, and induces recovery when the prescribed margin is violated. For velocity-level safety filtering, Equation (5) is written as a constraint on the robot joint velocity . By the chain rule, the barrier derivative is
where the endpoint velocity is determined by the capsule pair type, as detailed in the following two cases.
(1) Robot self-collision. For a robot–robot pair, both capsules are attached to the robot; hence, all capsule endpoint velocities are induced by the robot joint velocity . The endpoint velocity vector is defined as
where the stacked endpoint Jacobian is . Substituting Equation (7) into Equation (6) yields
where . Thus, robot self-collision constraints take the velocity-level CBF form, with the barrier derivative linear in .
(2) Human–humanoid collision. For a human–humanoid pair, the same barrier function is used, but only the robot capsule is controlled by . Let R denote the robot capsule and H denote the human capsule, and define . The robot endpoint velocities are induced by , whereas the human endpoint velocities and are estimated from consecutive observed capsule endpoints. The endpoint velocity vector is therefore written as
Substituting Equation (9) into Equation (6) gives
where the robot-controlled term is defined as , and the observed-human-motion term is defined as
The term represents the instantaneous change in the barrier value caused by the observed motion of the human capsule. This term shifts the admissible robot velocity set according to the measured human motion, thereby accounting for moving human obstacles without introducing human joint variables or increasing the QP decision dimension.
Combining the two cases, each active CBF constraint can be written as
where i indexes the active constraints constructed from the monitored capsule pair set, and
Thus, robot self-collision constraints correspond to , whereas human–humanoid constraints include the measured human endpoint-velocity contribution. Both cases remain linear in the robot joint velocity and can therefore be incorporated directly into the CBF-QP safety filter.
2.2.3. CBF-QP Safety Filter
The retargeting module provides a nominal joint-position command . The safety filter maintains an internal safe target , which is updated at the velocity level. At each update, a nominal reference velocity is generated as
where is a proportional gain. This velocity drives the safe target toward the nominal retargeted command in the absence of active safety constraints.
To improve feasibility under constraint conflicts—such as during sudden human movements or when perception yields noisy skeleton estimates—the safe joint velocity is obtained by solving a soft-constrained CBF-QP as follows:
where weights deviation from the nominal reference velocity, is the number of active CBF constraints, and , are joint-velocity limits. The non-negative slack variables are heavily penalized by and are used only when the hard CBF inequalities conflict with the joint-velocity bounds, allowing the QP to return a penalized least-violating command. As a system-level safeguard against severe anomalies (e.g., total perception loss or solver timeout), the controller rejects the new command and holds the previous safe target (). Additionally, the skeleton endpoint velocities in are low-pass filtered to suppress measurement jitter in practical deployment. Nevertheless, it is worth noting that the proposed CBF-QP layer should be interpreted as a geometric separation filter rather than a complete physical safety certification, as it does not directly model impact dynamics, torque saturation, actuator power limits, or whole-body balance.
The internal safe target is then integrated as
and is sent to the downstream position controller. Notably, for all experiments reported in this paper, the hard CBF constraints were feasible across all evaluated windows; thus, holds throughout, meaning that no constraint relaxation was required for the reported trajectories.
2.3. Evaluation Metrics for Safety and Imitation
To quantitatively evaluate the proposed safety filter, we define two groups of metrics. The safety metrics quantify the collision-avoidance performance of the generated motion with respect to all monitored capsule pairs, whereas the imitation metrics characterize the similarity between the generated robot motion and the intended imitation behavior. Let T denote the number of sampled time steps and let denote the set of monitored capsule pairs. We distinguish the safety-distance margins used in the CBF controller from the geometric quantity used for offline evaluation. The CBF-QP uses and as control-side safety-distance margins to enforce conservative separation. In contrast, the offline safety metrics are computed with respect to the physical collision boundary. For each monitored capsule pair , we define the collision clearance margin as
where is the closest-point distance between the two capsule centerlines, and and are the corresponding capsule radii. Thus, indicates positive surface clearance, indicates contact, and indicates geometric collision.
2.3.1. Safety Metrics
Three complementary safety metrics are used: minimum collision clearance margin, collision-time ratio, and collision count.
(1) Minimum collision clearance margin. The minimum collision clearance margin is defined as the global minimum of the collision clearance margin over all monitored pairs and all time steps:
This metric captures the worst-case geometric separation along the trajectory. A larger indicates greater clearance from physical contact, whereas indicates that at least one monitored capsule pair entered geometric collision.
(2) Collision-time ratio. The collision indicator at time t is defined as . The collision-time ratio is then calculated as
This metric measures the fraction of the trajectory during which at least one monitored capsule pair is in geometric collision. Therefore, smaller values indicate safer behavior.
(3) Collision count. A collision event is counted when the trajectory enters a collision episode from a previously collision-free state. The collision count is defined as
This metric measures how many separate collision episodes occur over the trajectory. It complements the collision-time ratio by distinguishing repeated short collisions from one continuous collision interval. Smaller values indicate fewer collision occurrences.
To support quantitative comparison across evaluated runs, the raw safety metrics are first converted into direction-consistent normalized scores. Let denote the set of evaluated runs in a given comparison, and let be a small constant used to avoid division by zero. For a metric value from run , the min–max normalization over is defined as
Since larger values of indicate safer behavior, its normalized safety contribution is . For the collision-time ratio and collision count , smaller values indicate safer behavior. Their normalized safety contributions are therefore obtained by reversing the min–max normalization: and . The composite safety score is then a normalized, higher-is-better metric defined as
2.3.2. Imitation Metrics
Two complementary imitation metrics are used to evaluate different aspects of motion similarity. The first metric is a zero-lag joint-space measure that quantifies how much the CBF-QP modifies the nominal retargeted command at the command level. This metric directly reflects the intervention magnitude of the safety layer. The second metric is a local-link direction metric with temporal alignment. It evaluates whether the resulting upper-body motion remains geometrically similar to the human motion after allowing for time-warping effects caused by velocity-level safety filtering. These two metrics therefore answer different questions: measures how much the safety layer changes the nominal robot command, whereas measures how similar the local upper-limb geometry remains to the human motion after temporal misalignment is accounted for.
(1) Joint-space RMSE. Let denote the nominal retargeted joint command before safety filtering, and let denote the safe joint target generated by the CBF-QP. The joint-space RMSE is defined as
where is the dimension of the upper-body joint space. This metric quantifies the direct command-level correction introduced by the safety layer at the same time instant. It intentionally does not compensate for temporal misalignment. A larger value therefore indicates that the CBF-QP had to deviate more strongly from the nominal imitation command to satisfy the safety constraints.
(2) Local-link direction nDTW. This metric follows the idea that imitation quality should not be evaluated only by global pose error or joint-space deviation. In human-to-robot motion imitation, local limb relationships are often more informative because the human and robot have different morphologies and limb lengths. Local-link-focused similarity measures have been used to compare human and humanoid motions at the body segment level [40]. In addition, dynamic time warping has been widely used to compare motion trajectories with nonuniform temporal alignment, including human–humanoid imitation evaluation [41,42]. We therefore combine these two ideas by applying DTW to trajectories of local upper-limb direction vectors. This produces a morphology-aware and timing-tolerant measure of geometric imitation quality.
For the human motion, four unit link-direction vectors are constructed at each frame: , corresponding to the left upper arm, left forearm, right upper arm, and right forearm. For the robot motion, the corresponding unit link directions are obtained from forward kinematics: . Using unit direction vectors makes the comparison focus on local limb orientation rather than absolute link length, which is important because the human and humanoid have different body proportions. The frame-to-frame local geometric cost between human frame i and robot frame j is computed as
where the clipping operation is used for numerical robustness. The cost is the sum of angular discrepancies between corresponding local upper-limb directions. Thus, it is small when the human and robot upper arms and forearms point in similar directions in their respective local body frames. The DTW-link distance is , where is a valid monotonic DTW alignment path. The normalized local-link DTW metric is then defined as
where is the optimal DTW path. A smaller value indicates better time-aligned local geometric similarity.
Since both and are smaller-is-better imitation-error metrics, their normalized error scores are and . The composite imitation score is then a normalized, higher-is-better metric defined as
3. Results
The proposed framework is evaluated from two complementary perspectives: first, verifying the ability of the CBF-QP layer to prevent unsafe motions in representative self-collision and human–humanoid interaction scenarios; and second, quantifying how CBF parameters govern the safety–imitation trade-off via the metrics defined in Section 2.3. Throughout this evaluation, denotes the nominal retargeted joint command before safety filtering, and represents the safe target produced by the CBF-QP layer. Both evaluation scenarios were initially recorded during live hardware executions of the complete pipeline, where the camera streamed human skeleton observations in real time to feed the online retargeting, CBF-QP filtering, and robot-command layers.
The resulting camera-captured skeleton sequences and their original timestamps were subsequently utilized as replay inputs for simulation experiments (including baseline comparisons) and extensive CBF parameter sweeps. This protocol preserves the exact human-motion profile observed during live experiments, thereby enabling strictly matched simulation analysis and repeatable parameter investigations under identical input conditions; as such, the replay mechanism is employed solely for controlled evaluation, while the hardware episodes themselves stem from genuine live online executions (see Video S1 and Video S2 in the Supplementary Materials). For technical reproducibility, the source code and experimental data are publicly available as specified in the Data Availability Statement, while supplementary computational benchmarks validating the capsule-based modeling choice are provided in Appendix B.
3.1. Safety in Motion Imitation
3.1.1. Simulation Studies
We first evaluated the proposed safety layer in simulation using the recorded skeleton streams from the two live hardware episodes described above. The snapshots in Figure 2 and Figure 3 show representative moments within these episodes and the yellow segments indicate selected active capsule pairs through their closest-point connections.
Figure 2.
Simulation self-collision avoidance with and without CBF-QP. (a) Representative moments from the self-collision episode, including a nominal cross-arm motion that produces unsafe robot self-contact. The ghost robot visualizes the nominal retargeted command, whereas the colored robot shows the CBF-filtered target. Yellow segments indicate selected monitored CBF constraint pairs. (b) Representative target joint trajectories and global minimum collision clearance margin. The CBF-QP strongly reduces the duration and number of self-collision episodes while preserving the main retargeted motion pattern.
Figure 3.
Simulation of human–humanoid collision avoidance with and without CBF-QP. (a) Representative moments from the human–humanoid interaction episode, including human-obstructed arm-raising and arm-crossing configurations. Yellow segments indicate selected monitored human–humanoid CBF constraint pairs. (b) Representative target joint trajectories and global minimum collision clearance margin. The CBF-QP reduces both the collision-time ratio and the number of collision episodes while retaining the main imitation behavior.
In the self-collision episode, the nominal retargeted command drives the humanoid arms across the torso and produces repeated violations of the physical collision boundary. As shown in Figure 2, the nominal global minimum clearance reaches , with a collision-time ratio of and eight collision episodes. After CBF-QP filtering, the minimum clearance is improved to approximately , the collision-time ratio is reduced to , and the collision count decreases to one. This indicates that the CBF-QP substantially suppresses persistent self-collision while preserving the qualitative structure of the retargeted arm motion. The corresponding imitation metrics show the expected cost of safety filtering: the joint-space error is , and the time-aligned local-link error increases from for the nominal motion to for the CBF-filtered motion.
The human–humanoid interaction episode exhibits a different type of safety risk. Here, the nominal robot motion is kinematically plausible for imitation, but it intersects the nearby human capsule model during the arm-raising and -crossing portions of the episode. As shown in Figure 3, the nominal command reaches , with and six collision episodes. With the CBF-QP enabled, the minimum clearance improves to , while the collision-time ratio decreases to and the collision count decreases to one. Thus, the CBF-QP does not merely reduce the worst-case penetration; it also substantially shortens the duration over which any monitored pair remains in collision. The filtered trajectory introduces an of , and changes from to , reflecting the safety-induced geometric deformation of the imitated arm motion.
These simulation results demonstrate two important properties of the proposed formulation. First, the same capsule-based CBF-QP structure can handle both robot self-collision and human–humanoid collision constraints. Second, the safety layer acts as a local deformation of the nominal imitation command rather than as a complete replacement of the retargeted motion. This motivates the hardware experiments and parameter analysis below, where the same command-level comparison between and is used to quantify safety and imitation.
3.1.2. Hardware Experiments
Hardware experiments were conducted as live online executions of the complete perception–retargeting–CBF pipeline on the humanoid robot. During these runs, the camera streamed human skeleton observations in real time, and the proposed framework generated upper-body commands online. The robot lower body was controlled using the manufacturer-provided balance controller, while the proposed framework commanded the upper-body joints. The CBF parameters used in the hardware experiments were selected beforehand as a reasonable operating point based on prior tuning experience and preliminary observations, so that the experiments could provide a representative comparison between nominal imitation and CBF-filtered execution. The camera-captured skeleton sequences and command logs from these runs were recorded for the matched simulation and parameter-sweep analyses, as described at the beginning of this section.
Figure 4 shows the real-robot self-collision episode. The sequence includes standing, arm-lifting, arm-crossing, and recovery phases. Figure 5 reports the corresponding target joint trajectories, global minimum clearance, and runtime statistics. With and , the CBF-QP successfully modifies the nominal self-collision-prone target so that the CBF-filtered target remains close to the physical contact boundary without producing the long collision intervals observed in the nominal command. Over the evaluation window, the CBF node runs at , the QP solve time is for median/p95, and the QP success rate is . These results indicate that the optimization layer itself remains reliable on hardware for the monitored self-collision constraints.
Figure 4.
Hardware self-collision avoidance episode. The numbered snapshots show the temporal progression of the live online upper-body motion on the real robot: (1) neutral standing, with the robot maintaining a slightly abducted arm posture to avoid thigh contact; (2) bilateral arm abduction; (3, 4) arm motions; (5, 6) right and left torso-leaning motions, during which the robot tracks the demonstrated posture while maintaining arm–body separation; and (7, 8) arm-crossing motions, where the CBF-QP prevents robot self-collision between the upper limbs.
Figure 5.
Hardware self-collision avoidance result. The left table summarizes controller settings and CBF runtime statistics over the evaluation window. The right plot shows target joint trajectories and the global minimum collision clearance margin for the nominal and CBF-filtered commands.
Figure 6 shows the hardware human–humanoid interaction episode. For qualitative illustration, the snapshots are taken from the complete safety configuration with both robot self-collision and human–humanoid collision constraints enabled. To isolate the effect of the human–humanoid CBF component, Figure 7 reports the corresponding hardware result with only the human–humanoid CBF constraints enabled. In this experiment, the human–humanoid CBF constraints are enabled to modify the upper-body target when the human body obstructs the nominal arm motion. The setting and yields stable operation with a CBF rate of , QP median/p95 solve time of , and QP success. Compared with the nominal command, the filtered target maintains greater separation from the human capsule model while preserving the main raising and crossing structure of the demonstrated motion. This confirms that the dynamic human CBF term in Equation (11) can be deployed in the real perception loop without increasing the QP decision dimension.
Figure 6.
Hardware human–humanoid interaction episode with both robot–robot and human–robot CBF constraints enabled. The numbered snapshots show the temporal progression of the live online shared-space interaction: (1) close standing configuration; (2–4) the human raises the right arm near the robot, and the robot laterally leans away while tracking the motion to maintain separation; (5) recovery to nominal following; (6, 7) the human raises the left arm while standing close to the robot, causing the robot to initially limit its arm elevation and then (8, 9) resume a larger arm raise as the human moves away; and (10–14) close human–robot arm interaction, where the robot follows the demonstrated motion while avoiding contact with the human.
Figure 7.
Hardware human–humanoid collision avoidance result with human–robot CBF constraints enabled. The left table summarizes the controller settings and CBF runtime statistics. The right plot shows the target joint trajectories and the global minimum human–humanoid clearance margin for the nominal and CBF-filtered commands.
Finally, Figure 8 evaluates the complete safety configuration with both robot self-collision and human–humanoid collision constraints enabled. Because both constraint families are active, the number of monitored active constraints increases to a median/max of . While the full tick time increases to for median/p95 (effective rate of ), the core QP solve time remains low at with a success rate. This contrast indicates that the primary runtime cost stems from the perception, capsule generation, constraint construction, and callback pipeline rather than from the optimization itself. This integration latency introduces a delay-induced margin, where the p95 full tick time () would incur an additional buffer of at and at . Thus, while effective for the tested moderate-speed interactions, scaling to fast motions necessitates larger safety margins, higher-rate sensing, and predictive human-capsule construction.
Figure 8.
Hardware complete safety experiment with both robot–robot and human–humanoid CBF constraints enabled. The left table summarizes the controller settings and runtime statistics. The right plot shows target joint trajectories and the merged global minimum collision clearance margin over all monitored self-collision and human–humanoid pairs.
3.1.3. Quantitative Summary and Baseline Comparison
Table 3 summarizes the key quantitative metrics across all evaluated simulation and hardware scenarios, providing a centralized comparison between the nominal and CBF-filtered trajectories. As demonstrated, the CBF filter substantially reduces the collision-time ratio and collision count while increasing the minimum clearance toward the safe bounds. This safety enhancement incurs an expected decrease in imitation fidelity, reflected by the increased and values. Furthermore, the hardware logs show a median QP solve time below and a success rate. While the complete tick time currently limits deployment under high-speed interactions, these results validate the core efficacy and online feasibility of the safety filter within the tested moderate-speed regime.
Table 3.
Summary results for nominal and CBF-filtered trajectories in simulation and hardware.
To further contextualize the CBF-QP filter against representative non-CBF safety filters, we implement two classical reactive safety mechanisms for a benchmarking comparison: critical-pair velocity damping and repulsive potential fields. Crucially, both baselines are evaluated using the same recorded skeleton streams, capsule models, and evaluation metrics as the proposed CBF-QP method. The comparison is performed in replay-based simulation rather than on hardware, because these reactive baselines may generate non-smooth or insufficiently safe commands without extensive hardware tuning. The replay setting provides a controlled comparison under identical human motion, timing, and perception-noise conditions. Let denote the baseline rollout state and the nominal tracking velocity. For capsule pair j, the surface clearance is , with gradient . The velocity-damping baseline projects onto the half-space defined by the currently closest pair , using a distance-dependent lower bound on the allowed approach velocity. The potential-field baseline instead adds a saturated sum of repulsive velocity corrections from all capsule pairs within the influence region. Both baselines use final joint-velocity clipping and the same safety threshold and influence distance for the corresponding capsule pairs.
As shown in Table 4, the reactive baselines improve some safety metrics but do not provide the same consistency as the CBF-QP filter under the tested multi-capsule constraints. The critical-pair velocity damper is effective in the human–humanoid episode, reducing from to , but still leaves negative clearance and five collision episodes. In the self-collision episode, because it only reacts to the current closest pair, switching among competing capsule pairs leads to repeated short boundary crossings and increases the collision count to 59; this metric should therefore be interpreted together with collision-time ratio and minimum clearance. The potential-field baseline preserves imitation more closely than CBF-QP, but its safety improvement is limited, especially in the self-collision episode, where remains . In contrast, the CBF-QP achieves the strongest and most consistent geometric safety improvement among the tested filters, reducing to for self-collision and for human–humanoid collision, with only one fleeting collision episode in each case. This improvement comes at the cost of larger imitation errors, so the comparison does not imply universal superiority over all possible safety filters or parameterizations. Nevertheless, under the same motion inputs, capsule model, and metrics, the results show that the CBF-QP formulation provides a clear advantage for safety-critical imitation: it coordinates multiple simultaneous geometric constraints within one optimization problem while yielding the feasible velocity closest to the nominal command.
Table 4.
Simulation comparison with alternative non-CBF safety filters.
3.2. Safety–Imitation Trade-Off Analysis
The preceding experiments show that the CBF-QP layer can suppress unsafe nominal imitation commands, but this safety improvement is achieved by modifying , so different CBF parameters may lead to different levels of imitation degradation. To characterize this safety–imitation trade-off, we performed hardware replay sweeps using the human–humanoid interaction episode with both robot self-collision and human–humanoid CBF constraints enabled. Each parameter setting was repeated three times, and each heatmap cell reports the mean over the repeated runs. Two sweeps are considered: the margin sweep varies and while fixing and , whereas the gain sweep varies and while fixing and .
3.2.1. Effects of Safety-Distance Margins
The safety-distance margins directly shift the CBF safety boundary in Equation (5). Larger margins cause the safety filter to intervene earlier with respect to the physical collision boundary. Figure 9 reports the parameter-sweep results for different pairs of safety-distance margins . In each heatmap, the color gradient encodes the corresponding metric value, and the number in each cell gives the averaged value over repeated trials. The figure shows that the human–humanoid margin is the dominant factor in this interaction episode. When , the minimum clearance remains negative across all tested values, and the collision-time ratio remains approximately –. Increasing to produces a clear transition: the minimum clearance becomes positive for all tested , and the collision-time ratio is reduced to zero in the repeated trials. Further increasing to does not produce an equivalent improvement in all safety metrics because the merged metric is already near the collision-free regime. Instead, the main effect becomes an increase in imitation error. Both and increase with larger , indicating stronger deformation of the nominal command. For example, the local-link nDTW error increases from approximately – at the smallest human–humanoid margins to approximately – at the largest margins. The joint-space RMSE follows the same trend, increasing from approximately – to approximately –. This pattern confirms that larger safety margins improve collision robustness primarily by sacrificing imitation fidelity.
Figure 9.
Effect of the safety-distance margins and on safety and imitation metrics in the complete hardware configuration. Both robot–robot and human–robot CBF constraints are enabled. Each cell reports the mean over three repeated replay trials with and . Across all configurations, the trial variability remains bounded, with maximum standard deviations of for clearance, for collision ratio, for RMSE, and for nDTW-link. The color gradient represents the value of the corresponding metric, and the numerical value is shown in each cell. The diamond marks the operating point used in the hardware experiments, whereas the star marks the preferred margin setting identified from the sweep results.
The effect of is weaker than that of in this episode. This is expected because the replayed motion is a human–humanoid interaction episode in which the dominant unsafe behavior is induced by human proximity. Nevertheless, remains relevant in the complete system: at very small robot–robot margins, short residual collision episodes can still occur even when the human–humanoid margin is large enough. This illustrates why the complete safety metric must consider both self-collision and human–humanoid collision pairs jointly. The hardware operating point , marked by the diamond, lies immediately after the observed safety transition, achieving a zero collision-time ratio without the larger imitation degradation seen at .
3.2.2. Effects of CBF Gains
The CBF gains and regulate the barrier-value dynamics in Equation (5). Figure 10 reports the parameter-sweep results for different pairs of CBF gains with the safety-distance margins fixed at the selected values. In each heatmap, the color gradient encodes the corresponding metric value, and the number in each cell gives the averaged value over repeated trials. This figure shows substantially weaker variation in safety than the margin sweep. Most parameter settings achieve a zero collision-time ratio, and the only remaining nonzero value is below . This indicates that and already define a sufficiently safe operating region for the evaluated episode, so the gains mainly affect how the safe target recovers toward the nominal command.
Figure 10.
Effect of the CBF gains and on safety and imitation metrics in the complete hardware configuration. Both robot–robot and human–robot CBF constraints are enabled. Each cell reports the mean over three repeated replay trials with and . Across all configurations, the trial variability remains bounded, with maximum standard deviations of for clearance, for collision ratio, for RMSE, and for nDTW-link. The color gradient represents the value of the corresponding metric, and the numerical value is shown in each cell. The diamond marks the operating point used in the hardware experiments, whereas the star marks the preferred gain setting identified from the sweep results.
The imitation metrics reveal a clearer dependence on . Very small robot–robot gains, especially , produce the largest joint-space and local-link errors. As increases to , , and , both and decrease. This behavior is consistent with the velocity-level formulation in Equations (14)–(16): a small gain enforces slower recovery of the barrier dynamics and can keep farther from for longer periods, whereas moderate gains allow the safe target to follow the nominal command more closely when the motion remains safe. The influence of is comparatively weaker in this fixed-margin setting, suggesting that the human–humanoid safety boundary is already sufficiently conservative and that the gain mainly fine-tunes the recovery behavior.
Together, the margin and gain sweeps show that determines the primary transition from unsafe to safe behavior in the evaluated human–humanoid interaction episode, whereas and mainly tune the deformation and recovery characteristics once the safety margins are adequate. This separation of roles is useful for parameter selection: margins should first be chosen to eliminate collision episodes, and gains can then be adjusted to improve imitation fidelity without reintroducing significant collision time.
3.2.3. Safety–Imitation Trade-Off
To summarize the overall effect of the four CBF parameters, Figure 11 plots the composite safety score against the composite imitation score . Each point represents one complete parameter setting , and the plotted location corresponds to the mean over repeated replay trials. The color encodes the human–humanoid safety-distance margin , while the marker size encodes the robot–robot CBF gain . The empirical Pareto front is obtained from the non-dominated settings in the plane, where larger values are preferred for both scores. Specifically, these composite scores are computed using weights for and for , reflecting the physical significance of each underlying metric. While these scores provide a relative ranking within this specific sweep campaign, a sensitivity check across six alternative weighting perturbations confirms that the top parameter selections remain unchanged, ensuring the robustness of the observed Pareto trends.
Figure 11.
Composite safety–imitation trade-off under CBF parameter variation. Each point represents one complete parameter setting and shows the mean over three repeated replay trials. Across all samples, the trial variability remains bounded, with maximum standard deviations of for and for . The color encodes the human–humanoid safety-distance margin , and the marker size encodes the robot–robot CBF gain . The dashed curve connects the empirical Pareto-efficient settings, and the solid curve provides a visual trend of the Pareto front. The diamond denotes the selected operating point used in the hardware experiments, the star denotes the Pareto knee point closest to the utopia point , and the circled marker denotes an intentionally selected failure-regime point . Composite scores are computed using for , , and , and for and .
The resulting distribution reveals a clear trade-off structure. Settings with small human–humanoid margins tend to preserve imitation better but yield lower safety scores, consistent with the residual collision-time ratios observed in the margin sweep. Conversely, larger values move the operating point toward higher safety scores, but excessive margins also reduce imitation fidelity because the CBF-QP must deform the nominal target more strongly. This trend is consistent with Figure 9, where increasing beyond the safety transition improves or maintains clearance but increases both and . The marker size variation further shows that the gain parameters mainly refine the recovery behavior within the feasible region, rather than producing the dominant unsafe-to-safe transition.
The diamond marks the selected operating point used in the main hardware experiments. It is not claimed to be globally optimal; rather, it lies in a high-safety and high-imitation region and provides a conservative operating choice for real-robot execution. The star marks the Pareto knee point , defined as the Pareto-efficient setting with the smallest Euclidean distance to the utopia point , and therefore represents the strongest empirical compromise within the sampled parameter set. The circled marker denotes an intentionally selected failure-regime point , illustrating that poorly balanced or extreme parameter combinations can degrade both objectives simultaneously, producing neither reliable safety nor faithful imitation. It helps identify unsuitable regions of the parameter space but does not affect the empirical Pareto front. Overall, the Pareto analysis provides a descriptive summary consistent with the heatmap trends: the safety margins should first be chosen to mitigate collision episodes, especially through , and the CBF gains can then be adjusted to improve imitation fidelity without incurring substantial collision time.
To make the Pareto analysis directly actionable, Table 5 reports three representative operating regimes selected from the sampled parameter space: an imitation-prioritized setting, a balanced setting near the Pareto knee, and a safety-prioritized setting. The imitation-prioritized regime preserves the nominal motion most closely, as reflected by the lowest and , but retains a negative minimum clearance and a nonzero collision-time ratio. In contrast, the safety-prioritized regime achieves the largest minimum clearance and eliminates collision episodes, but at the cost of substantially increased imitation error. The balanced/Pareto-knee regime removes collision episodes while maintaining moderate imitation error, providing the strongest compromise among the three reported operating levels. Taken together, Table 5 shows that the composite scores are consistent with the raw geometric safety metrics: increasing safety improves clearance and removes collision episodes, while progressively increasing joint-space and local-link imitation errors. This supports the balanced/Pareto-knee setting as a practical operating choice when both collision avoidance and motion fidelity are required.
Table 5.
Representative operating regimes selected from the CBF parameter sweep. Safety metrics are evaluated over combined robot–robot and human–robot pairs.
4. Discussion
The results show that, in the evaluated episodes, safety-aware human-to-humanoid imitation can be achieved without replacing the nominal retargeting pipeline by a monolithic controller. Instead, the proposed framework separates perception, retargeting, and safety filtering into interpretable modules. This modularity is important because it allows the nominal command and the CBF-filtered target to be compared directly, making the effect of safety enforcement measurable rather than only visually observable. In both simulation and hardware experiments, the CBF-QP layer substantially reduces persistent unsafe behaviors during self-collision and human–humanoid proximity episodes. In the simulation self-collision scenario, the collision-time ratio decreases from 77.6% to 0.4%, while in the human–humanoid interaction case, it decreases from 17.3% to 0.2%. Hardware experiments further demonstrate that the same formulation is computationally feasible to operate within an online perception–control loop, achieving a 100% QP success rate across all evaluated intervals. Finally, the simulation comparison with velocity damping and potential-field baselines reveals that the CBF-QP filter provides more consistent multi-constraint safety improvements. The two motion episodes used in the experiments were recorded from complete online hardware runs and reused as replay inputs for simulation reproduction and CBF parameter sweeps. This replay procedure serves as a standardization protocol for fair comparison, rather than a replacement for online execution. By using identical recorded input motions, the effects of different CBF parameters can be isolated without introducing trial-to-trial variations in human demonstration timing or posture. Within these representative scenarios, these findings suggest that CBF-QP filtering is a practical mechanism for adding explicit collision-avoidance behavior to vision-aided humanoid imitation while preserving the qualitative structure of the demonstrated motion. It is worth noting that although this study evaluates the method on an 8-DoF upper-body humanoid, the method is compatible with higher-DoF platforms. Extending it to such platforms would mainly require richer perception, retargeting of the additional joint motions, and a higher-dimensional CBF-QP with the corresponding safety constraints.
The safety–imitation analysis also clarifies the role of the CBF parameters. The safety-distance margins and determine when the safety layer begins to intervene relative to the physical collision boundary, whereas the gains and mainly shape the recovery dynamics once the safety boundary is active. In the hardware parameter sweeps, the human–humanoid margin was the dominant factor for the evaluated interaction episode: increasing it to approximately produced the transition to a zero collision-time ratio across repeated trials, while larger values mainly increased imitation error. This behavior is consistent with the composite Pareto analysis and the representative operating regimes in Table 5. The imitation-prioritized setting preserved the nominal motion most closely but retained residual collision, whereas the safety-prioritized setting maximized clearance at the cost of a larger and . The balanced/Pareto-knee setting removed collision episodes while maintaining moderate imitation error, indicating that the proposed metrics can support practical parameter selection rather than only post hoc performance reporting.
Several limitations remain. First, the current framework focuses on 8-DoF upper-body imitation. The robot lower body is handled by the manufacturer-provided balance controller, while the upper-body command generation uses only a simple waist-balance compensation strategy. Therefore, the system does not yet address full-body locomotion, coordinated whole-body balance, high-speed dynamic motions, or contact-rich task execution. These extensions would require tighter integration between upper-body imitation, lower-limb coordination, and balance recovery. Second, the current quantitative evaluation is limited to two representative skeleton-motion episodes recorded from a single human subject. Although these sequences were specifically selected as representative stress tests to cover core safety-critical scenarios, they do not constitute an exhaustive validation over different users, motion classes, approach distances, motion speeds, or environmental conditions. Extending the evaluation to these broader operational scenarios remains an important direction, primarily requiring richer multi-object perception, careful calibration, and scalable real-time optimization. Third, the present quantitative evaluation primarily isolates the behavior of the CBF-QP geometric safety-filtering layer by comparing and . This choice is appropriate for analyzing the geometric safety–imitation trade-off introduced by the CBF parameters, but it does not fully characterize downstream physical safety factors such as actuator tracking error, low-level controller dynamics, communication delay, torque or force limits, contact dynamics, or hardware compliance. In particular, a target trajectory that is safe in the capsule-distance model may still require additional execution-level verification when the robot operates at higher speed, under larger payload variation, or in more dynamic human–humanoid interaction. A further limitation is that the present imitation space does not include detailed hand and finger motion. This simplification is appropriate for evaluating upper-body safety filtering, but hands are important in human–humanoid interaction, especially for manipulation, handover, and gestural communication. Extending the framework to hand motion would require more robust fine-scale perception and retargeting, as well as finer collision models beyond the current capsule-level upper-body representation.
Future work will extend the framework in three directions. The first direction is to move from upper-body imitation to learning-enhanced whole-body safe imitation in order to better support high-speed and dynamically coupled motions. Ongoing work comprises upgrading the system to a multi-camera perception setup processed on a high-performance computing node to reduce skeleton-estimation latency and improve tracking continuity. For faster interaction, the safety layer should also use predictive human capsules or Kalman/model-based predictors, so that CBF constraints are evaluated against anticipated human positions rather than only the current measured skeleton. On the control side, RL policies are being developed for lower-body balance control and learning-based upper-body tracking with improved gravity compensation and dynamic response. These components are expected to help coordinate the torso, waist, and lower body with arm imitation, thereby integrating safety filtering with whole-body stability. The second direction is to close the gap between target-level geometric safety filtering and execution-level physical behavior. This includes incorporating actuator tracking models, latency compensation, measured joint feedback, and possibly force or contact sensing into the evaluation and control loop. These additions would allow the safety layer to account for physical hardware behavior more explicitly, rather than relying only on geometric clearance at the command level. The third direction is to extend the imitation representation to include hand motion and task-level interaction primitives. Learning-based perception and retargeting methods may be particularly useful for this extension, since hand motion involves fine-scale articulation, frequent occlusion, and strong task dependence. In such settings, the proposed safety–imitation metrics could be used not only for offline analysis but also for adaptive parameter tuning, where , , , and are adjusted online according to the current task, human proximity, and desired imitation fidelity.
5. Conclusions
This paper presented a vision-aided safe human-to-humanoid motion imitation framework that couples skeleton-based retargeting with a capsule-based CBF-QP safety filter. By inserting an interpretable optimization layer between nominal imitation and execution, the proposed formulation enforces robot self-collision and human–humanoid proximity constraints while preserving the qualitative structure of the demonstrated motion. Within the evaluated episodes, simulation and hardware results, along with the baseline comparison with alternative safety filters, demonstrate that the framework effectively reduces geometric collision violations and validates the feasibility of online operation within the perception–control loop. Furthermore, the parameter-sweep analysis formalizes the underlying safety–fidelity trade-off, making it quantitatively tunable via safety-distance margins and CBF gains to enable systematic selection of desired operating regimes.
While demonstrating the viability of modular and interpretable safety filtering, the current implementation operates within certain practical boundaries. The control framework is currently focused on upper-body kinematics and geometric proximity constraints rather than full physical safety certification, and its real-time performance remains bounded by end-to-end processing latency and the quality of vision-based skeleton tracking. Moreover, while the live hardware interactions support real-world feasibility, the evaluation remains a representative proof-of-concept restricted to a limited number of users and motion sequences, rather than an exhaustive validation across diverse statures, speeds, and environmental conditions. Rather than diminishing the core methodology, these limitations outline direct pathways for future research. This perspective provides a scalable foundation for extending the framework toward learning-enhanced whole-body dynamic balancing, multi-object perception under sensor noise, and high-rate, hand-aware human–humanoid interaction integrated with execution-level safety verification.
Supplementary Materials
The following supporting information can be downloaded at https://www.mdpi.com/article/10.3390/bdcc10080246/s1, Video S1: online imitation without CBF; Video S2: online imitation with CBF (self-collision and human-humanoid collision).
Author Contributions
Conceptualization, W.C. and A.T.; methodology, W.C., J.A., N.E. and A.T.; software, W.C. and J.A.; validation, W.C. and J.A.; formal analysis, W.C., J.A., N.E. and A.T.; investigation, W.C. and J.A.; resources, A.T.; data curation, W.C. and J.A.; writing—original draft preparation, W.C.; writing—review and editing, W.C., J.A., N.E. and A.T.; visualization, W.C.; supervision, A.T.; project administration, A.T.; funding acquisition, A.T. All authors have read and agreed to the published version of the manuscript.
Funding
This work was supported in part by the NYUAD Center for AI and Robotics, funded by Tamkeen under the NYUAD Research Institute Award CG010.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
The person shown in Figure 4 and Figure 6 is one of the authors of this paper. This individual is not involved as a human subject in the study. The figures are included for illustrative purposes to demonstrate the practical use of the proposed system and its interaction scenario. She was fully aware of the purpose of the images and has given consent for their publication in this academic paper.
Data Availability Statement
The source code developed for the proposed vision-aided safe human-to-humanoid motion imitation framework is publicly available at https://github.com/RISC-NYUAD/Safe_Human_Humanoid_Motion_Imitation (accessed on 21 July 2026). The experimental data supporting the simulation, hardware, and parameter-sweep results reported in this study are archived on Zenodo: https://zenodo.org/records/20322803 (accessed on 21 July 2026); DOI: 10.5281/zenodo.20322802.
Acknowledgments
The authors acknowledge the Kinesis Core Technology Platforms (Kinesis CTP) at New York University Abu Dhabi (NYUAD) for providing access to the experimental robotic platform used in this study, including the Unitree G1 humanoid robot. During the preparation of this manuscript, the authors partially used ChatGPT-5.5 solely for minor language refinement and grammar checking. The authors have reviewed and edited the output and take full responsibility for the content of this publication.
Conflicts of Interest
The authors declare no conflicts of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.
Abbreviations
The following abbreviations are used in this manuscript:
| DoF | Degree of freedom |
| CBF | Control barrier function |
| QP | Quadratic program |
| DTW | Dynamic time warping |
| FK | Forward kinematics |
| HRC | Human–robot collaboration |
| HRI | Human–robot interaction |
| MPC | Model predictive control |
| ISO | International Organization for Standardization |
| RL | Reinforcement learning |
Appendix A. Supplementary Details on Human Pose Angle Estimation
This appendix provides supplementary details on the coordinate frames, skeleton keypoints, and implementation steps used to compute the reduced human upper-body angles from the ZED-camera [43] skeleton observations. The notation denotes the position of keypoint A expressed in the ZED global frame , and a leading superscript indicates the coordinate frame in which a vector is represented.
Appendix A.1. Coordinate Frames and Keypoints
The ZED global frame is configured as a right-handed frame with forward, left, and upward. A human torso frame is constructed online from the pelvis and shoulder keypoints and is used to express arm motion relative to the trunk. The seven skeleton keypoints are , corresponding to the pelvis, left/right shoulders, left/right elbows, and left/right wrists. The shoulder center and limb vectors are defined as
Appendix A.2. Torso Frame Construction
The torso frame is constructed from the pelvis and shoulder keypoints. Its origin is placed at the pelvis, and its vertical axis follows the pelvis–shoulder-center direction:
The lateral axis is computed from the shoulder line after removing its component along the vertical axis:
The third axis completes the right-handed frame, , yielding
Thus, any vector is expressed in the torso frame by .
Appendix A.3. Angle Computation Details
The reduced human upper-body angle vector and its analytical definitions are provided in Section 2.1.1. This subsection records the additional vector transformations and numerical treatments used for the angle computation. The upper-arm vectors used for shoulder-angle estimation are first expressed in the torso frame as and . The components of these vectors are denoted by
These torso-frame components are used in the shoulder-pitch and shoulder-roll definitions in Section 2.1.1. The elbow-pitch angles are computed from the inter-segment angles between the corresponding upper-arm and forearm vectors. For numerical robustness, all direction vectors are normalized before angular computations, and the arccos(·) arguments are clipped to . Frames with missing keypoints or degenerate vectors with near-zero norms are excluded from offline metric computation or replaced by the latest valid estimate during online execution.
Appendix A.4. Perception-Side Sensitivity Analysis
A compact sensitivity analysis is conducted by perturbing the recorded skeleton streams before pose angle extraction. As summarized in Table A1, the implemented filtering, rate-limiting, and neutral-pose calibration reduce the effects of moderate keypoint noise, jitter, and calibration offsets, while invalid occlusion frames are conservatively rejected.
Table A1.
Perception-side sensitivity analysis under representative perturbations.
Appendix B. CBF Geometry Benchmarks
To motivate the use of capsule collision geometry, the performance is compared with other commonly used models, including spheres and bounding boxes, in the human–humanoid simulation environment. Table A2 shows the performance results of various collider geometries. For sphere decomposition, the center-to-center squared distance is used, implemented via [44]. For capsules, the signed distance between sphere-swept volumes method is used and implemented via [45]. For boxes, the convex polytope proximity method is used, implemented via [46]. These methods all provide differential proximity measurements that CBF can utilize. Benchmarks are performed on a computer with an Intel Core Ultra 9 275HX CPU and an NVIDIA RTX 5080 Laptop GPU. A visualization of these collision models is shown in Figure A1.
Figure A1.
Benchmarked collision geometry. From left to right: Sphere decomposition with no subsampling, sphere decomposition with one subsampling, bounding box decomposition, capsule decomposition. Lines represent CBF constraints.
The computational performance of different implementation backends is also benchmarked. As shown in Table A2, utilizing the GPU results in significant performance uplift due to the number of parallel constraints. Differentiable kinematics are implemented in the CPU via Pinocchio [47], while the GPU methods utilize JAX [48]. The best overall performance was demonstrated by capsule geometry on the GPU, demonstrating both low solve time and minimal constraint blow-up.
Table A2.
CBF benchmark statistics for various collision geometries.
References
- Sheng, Q.; Zhou, Z.; Li, J.; Mi, X.; Xiang, P.; Chen, Z.; Xu, H.; Jia, S.; Wu, X.; Cui, Y.; et al. A comprehensive review of humanoid robots. SmartBot 2025, 1, e12008. [Google Scholar] [CrossRef] [Scilit]
- Sugihara, T.; Morisawa, M. A survey: Dynamics of humanoid robots. Adv. Robot. 2020, 34, 1338–1352. [Google Scholar] [CrossRef] [Scilit]
- Cai, W.; Vamvoudakis, K.G.; Gros, S.; Tzes, A. Cost-Matching Model Predictive Control for Efficient Reinforcement Learning in Humanoid Locomotion. arXiv 2026, arXiv:2603.28243. [Google Scholar]
- Darvish, K.; Penco, L.; Ramos, J.; Cisneros, R.; Pratt, J.; Yoshida, E.; Ivaldi, S.; Pucci, D. Teleoperation of humanoid robots: A survey. IEEE Trans. Robot. 2023, 39, 1706–1727. [Google Scholar] [CrossRef] [Scilit]
- Vianello, L.; Penco, L.; Gomes, W.; You, Y.; Anzalone, S.M.; Maurice, P.; Thomas, V.; Ivaldi, S. Human-humanoid interaction and cooperation: A review. Curr. Robot. Rep. 2021, 2, 441–454. [Google Scholar] [CrossRef] [Scilit]
- Ajoudani, A.; Zanchettin, A.M.; Ivaldi, S.; Albu-Schäffer, A.; Kosuge, K.; Khatib, O. Progress and prospects of the human–robot collaboration. Auton. Robot. 2018, 42, 957–975. [Google Scholar]
- Cai, W.; Abanes, J.; Evangeliou, N.; Tzes, A. Safe Human-to-Humanoid Motion Imitation Using Control Barrier Functions. arXiv 2026, arXiv:2604.11447. [Google Scholar]
- Montecillo-Puente, F.J.; Narsipura Sreenivasa, M.; Laumond, J.P. On real-time whole-body human to humanoid motion transfer. In Proceedings of the 7th International Conference on Informatics in Control, Automation and Robotics; SciTePress: Setúbal, Portugal, 2010; pp. 22–31. [Google Scholar]
- Otani, K.; Bouyarmane, K. Adaptive whole-body manipulation in human-to-humanoid multi-contact motion retargeting. In Proceedings of the 2017 IEEE-RAS 17th International Conference on Humanoid Robotics (Humanoids); IEEE: Piscataway, NJ, USA, 2017; pp. 446–453. [Google Scholar]
- Darvish, K.; Tirupachuri, Y.; Romualdi, G.; Rapetti, L.; Ferigo, D.; Chavez, F.J.A.; Pucci, D. Whole-body geometric retargeting for humanoid robots. In Proceedings of the 2019 IEEE-RAS 19th International Conference on Humanoid Robots (Humanoids); IEEE: Piscataway, NJ, USA, 2019; pp. 679–686. [Google Scholar]
- Baek, S.; Kim, A.; Choi, J.Y.; Ha, E.; Kim, J.W. Human motion retargeting to a full-scale humanoid robot using a monocular camera and human pose estimation. Int. J. Control Autom. Syst. 2024, 22, 2860–2870. [Google Scholar] [CrossRef] [Scilit]
- Jiang, X.; Wu, B.; Li, S.; Zhu, Y.; Liang, G.; Yuan, Y.; Li, Q.; Zhang, J. Multi-Humanoid Robot Arm Motion Imitation and Collaboration Based on Improved Retargeting. Biomimetics 2025, 10, 190. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- He, T.; Luo, Z.; Xiao, W.; Zhang, C.; Kitani, K.; Liu, C.; Shi, G. Learning human-to-humanoid real-time whole-body teleoperation. In Proceedings of the 2024 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS); IEEE: Piscataway, NJ, USA, 2024; pp. 8944–8951. [Google Scholar]
- He, T.; Luo, Z.; He, X.; Xiao, W.; Zhang, C.; Zhang, W.; Kitani, K.; Liu, C.; Shi, G. Omnih2o: Universal and dexterous human-to-humanoid whole-body teleoperation and learning. arXiv 2024, arXiv:2406.08858. [Google Scholar]
- Li, J.; Yang, L.; Ames, A.D. MIRROR: Visual Motion Imitation via Real-time Retargeting and Teleoperation with Parallel Differential Inverse Kinematics. arXiv 2026, arXiv:2603.23995. [Google Scholar]
- Ze, Y.; Chen, Z.; Araújo, J.P.; Cao, Z.a.; Peng, X.B.; Wu, J.; Liu, C.K. Twist: Teleoperated whole-body imitation system. arXiv 2025, arXiv:2505.02833. [Google Scholar]
- Lasota, P.A.; Fong, T.; Shah, J.A. A survey of methods for safe human-robot interaction. Found. Trends® Robot. 2017, 5, 261–349. [Google Scholar] [CrossRef] [Scilit]
- Villani, V.; Pini, F.; Leali, F.; Secchi, C. Survey on human–robot collaboration in industrial settings: Safety, intuitive interfaces and applications. Mechatronics 2018, 55, 248–266. [Google Scholar] [CrossRef] [Scilit]
- Zanella, R.; Califano, F.; Stramigioli, S. Physical Human-Robot Interaction: A Critical Review of Safety Constraints. arXiv 2026, arXiv:2601.19462. [Google Scholar]
- Ames, A.D.; Xu, X.; Grizzle, J.W.; Tabuada, P. Control barrier function based quadratic programs for safety critical systems. IEEE Trans. Autom. Control 2016, 62, 3861–3876. [Google Scholar] [CrossRef] [Scilit]
- Xiao, W.; Cassandras, C.G.; Belta, C. Safe Autonomy with Control Barrier Functions: Theory and Applications; Springer: Cham, Switzerland, 2023. [Google Scholar]
- Ames, A.D.; Coogan, S.; Egerstedt, M.; Notomista, G.; Sreenath, K.; Tabuada, P. Control barrier functions: Theory and applications. In Proceedings of the 2019 18th European control conference (ECC); IEEE: Piscataway, NJ, USA, 2019; pp. 3420–3431. [Google Scholar]
- Ferraguti, F.; Landi, C.T.; Singletary, A.; Lin, H.C.; Ames, A.; Secchi, C.; Bonfe, M. Safety and efficiency in robotics: The control barrier functions approach. IEEE Robot. Autom. Mag. 2022, 29, 139–151. [Google Scholar] [CrossRef] [Scilit]
- Gonçalves, V.; Giakoumidis, N.; Moore, M.; Tzes, A. Leader-Follower Human-Cobot Improvised Dance Using Motion Capture Systems. In Proceedings of the International Conference on ArtsIT, Interactivity and Game Creation; Springer: Berlin/Heidelberg, Germany, 2024; pp. 125–137. [Google Scholar]
- Chaikalis, D.; Unlu, H.U.; Tzes, A.; Khorrami, F. Vision-aided Leader-Follower Collaborative Mobile Manipulation with Control Barrier Functions. J. Intell. Robot. Syst. 2026, 112, 24. [Google Scholar] [CrossRef] [Scilit]
- Luo, R.; Jakobsen, J.M.; Roozing, W.; Califano, F.; Fang, C. Control Barrier Functions Solved with Hierarchical Quadratic Programming for Safe Physical Human-Robot Interaction. arXiv 2026, arXiv:2604.23039. [Google Scholar]
- Maithani, P.; Arab, A.; Khorrami, F.; Krishnamurthy, P. Proactive hierarchical control barrier function-based constraint prioritization to enhance safety in human-robot interaction. Control Eng. Pract. 2026, 166, 106624. [Google Scholar] [CrossRef] [Scilit]
- Khazoom, C.; Gonzalez-Diaz, D.; Ding, Y.; Kim, S. Humanoid self-collision avoidance using whole-body control with control barrier functions. In Proceedings of the 2022 IEEE-RAS 21st International Conference on Humanoid Robots (Humanoids); IEEE: Piscataway, NJ, USA, 2022; pp. 558–565. [Google Scholar]
- Marew, D.; Lvovsky, M.; Yu, S.; Sessions, S.; Kim, D. Integration of Riemannian motion policy with whole-body control for collision-free legged locomotion. In Proceedings of the 2023 IEEE-RAS 22nd International Conference on Humanoid Robots (Humanoids); IEEE: Piscataway, NJ, USA, 2023; pp. 1–8. [Google Scholar]
- Khazoom, C.; Hong, S.; Chignoli, M.; Stanger-Jones, E.; Kim, S. Tailoring solution accuracy for fast whole-body model predictive control of legged robots. IEEE Robot. Autom. Lett. 2024, 9, 11074–11081. [Google Scholar] [CrossRef] [Scilit]
- Ferraguti, F.; Landi, C.T.; Costi, S.; Bonfè, M.; Farsoni, S.; Secchi, C.; Fantuzzi, C. Safety barrier functions and multi-camera tracking for human–robot shared environment. Robot. Auton. Syst. 2020, 124, 103388. [Google Scholar] [CrossRef] [Scilit]
- Parma, F.; Tonola, C.; Pedrocchi, N.; Beschi, M. Embedding ISO 10218 Safety Compliance in Robots via Control Barrier Functions for Human-Robot Collaboration. arXiv 2026, arXiv:2606.13203. [Google Scholar]
- Shi, K.; Hu, G. Safety-guaranteed and task-consistent human-robot interaction using high-order time-varying control barrier functions and quadratic programs. IEEE Robot. Autom. Lett. 2023, 9, 547–554. [Google Scholar]
- Liu, R.; Chen, R.; Liu, C. Safe interactive industrial robots using jerk-based safe set algorithm. In Proceedings of the International Symposium on Flexible Automation 2022 International Symposium on Flexible Automation; The Institute of Systems, Control and Information Engineers: Kyoto, Japan, 2022; pp. 196–203. [Google Scholar]
- Xie, Z.; Dames, P. Drl-vo: Learning to navigate through crowded dynamic scenes using velocity obstacles. IEEE Trans. Robot. 2023, 39, 2700–2719. [Google Scholar] [CrossRef] [Scilit]
- Marcucci, T.; Petersen, M.; Von Wrangel, D.; Tedrake, R. Motion planning around obstacles with convex optimization. Sci. Robot. 2023, 8, eadf7843. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Haffemayer, A.; Jordana, A.; De Matteïs, L.; Wojciechowski, K.; Righetti, L.; Lamiraux, F.; Mansard, N. Collision avoidance in model predictive control using velocity damper. In Proceedings of the 2025 IEEE International Conference on Robotics and Automation (ICRA); IEEE: Piscataway, NJ, USA, 2025; pp. 16140–16146. [Google Scholar]
- Dickson, A.K.; Garcia, J.C.P.; Anderson, M.L.; Jing, R.; Alizadeh-Shabdiz, S.; Wang, A.X.; DeLorey, C.; Patterson, Z.J.; Sabelhaus, A.P. Safe autonomous environmental contact for soft robots using control barrier functions. IEEE Robot. Autom. Lett. 2025, 10, 11283–11290. [Google Scholar] [CrossRef] [Scilit]
- Wong, K.; Stölzle, M.; Xiao, W.; Della Santina, C.; Rus, D.; Zardini, G. Contact-aware safety in soft robots using high-order control barrier and lyapunov functions. IEEE Robot. Autom. Lett. 2025, 10, 12485–12492. [Google Scholar] [CrossRef] [Scilit]
- Zhang, Z.; Niu, Y.; Yan, Z.; Lin, S. Real-time whole-body imitation by humanoid robots and task-oriented teleoperation using an analytical mapping method and quantitative evaluation. Appl. Sci. 2018, 8, 2005. [Google Scholar] [CrossRef] [Scilit]
- Gong, L.; Chen, B.; Xu, W.; Liu, C.; Li, X.; Zhao, Z.; Zhao, L. Motion similarity evaluation between human and a tri-co robot during real-time imitation with a trajectory dynamic time warping model. Sensors 2022, 22, 1968. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Deriso, D.; Boyd, S. A general optimization framework for dynamic time warping. Optim. Eng. 2023, 24, 1411–1432. [Google Scholar]
- Stereolabs. ZED X Stereo Camera. 2026. Available online: https://www.stereolabs.com/en-si/store/products/zed-x-stereo-camera (accessed on 21 July 2026).
- Morton, D.; Pavone, M. Safe, task-consistent manipulation with operational space control barrier functions. In Proceedings of the 2025 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS); IEEE: Piscataway, NJ, USA, 2025; pp. 187–194. [Google Scholar]
- Tracy, K.; Howell, T.A.; Manchester, Z. Diffpills: Differentiable collision detection for capsules and padded polygons. arXiv 2022, arXiv:2207.00202. [Google Scholar]
- Tracy, K.; Howell, T.A.; Manchester, Z. Differentiable collision detection for a set of convex primitives. In Proceedings of the 2023 IEEE International Conference on Robotics and Automation (ICRA); IEEE: Piscataway, NJ, USA, 2023; pp. 3663–3670. [Google Scholar]
- Carpentier, J.; Saurel, G.; Buondonno, G.; Mirabel, J.; Lamiraux, F.; Stasse, O.; Mansard, N. The Pinocchio C++ library—A fast and flexible implementation of rigid body dynamics algorithms and their analytical derivatives. In Proceedings of the IEEE International Symposium on System Integrations (SII); IEEE: Piscataway, NJ, USA, 2019. [Google Scholar]
- Bradbury, J.; Frostig, R.; Hawkins, P.; Johnson, M.J.; Katariya, Y.; Leary, C.; Maclaurin, D.; Necula, G.; Paszke, A.; VanderPlas, J.; et al. JAX: Composable Transformations of Python+NumPy Programs. Version 0.3.13. 2018. Available online: http://github.com/jax-ml/jax (accessed on 21 July 2026).
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.











