Previous Article in Journal
Design and Implementation of a Gesture-Controlled Robotic Platform for Applied Education in Human–Robot Interaction
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Dynamic Motion Planner for Trajectory Tracking in HRC

1
Chair of Production Systems, Ruhr University Bochum, Universitätsstr. 150, 44801 Bochum, Germany
2
PROTECH-Institute of Production Technology, University of Siegen, Paul-Bonatz-Straße 9-11, 57076 Siegen, Germany
*
Author to whom correspondence should be addressed.
Robotics 2026, 15(6), 113; https://doi.org/10.3390/robotics15060113
Submission received: 29 April 2026 / Revised: 30 May 2026 / Accepted: 5 June 2026 / Published: 7 June 2026

Abstract

In human-robot collaboration (HRC), robots operate alongside humans within a shared workspace. During collaborative handling tasks, human movements are often highly individual and variable. To ensure smooth collaboration, the robot must adapt its trajectory to align with the motion of the human co-worker. Therefore, this work proposes a dynamic motion planner that enables the robot to track a dynamically changing reference trajectory. The motion planner is evaluated based on its ability to track the trajectory while respecting joint velocity and acceleration limits and avoiding kinematic singularities. When these constraints are at risk of being violated, the robot temporarily assumes a dominant role and attempts to approximate the reference trajectory as closely as possible. An evaluation using a KUKA iiwa in a laboratory setup demonstrates that the proposed motion planner can effectively track dynamically changing, physically feasible reference trajectories. Assuming that the reference trajectory can be human motion, the motion planner can harmonize human and robot movements during collaborative handling tasks.

1. Introduction and Related Works

1.1. Motivation

Industrial manufacturing is experiencing a profound shift as collaborative robots take on a growing role in complementing human capabilities within assembly processes [1]. Human–robot collaboration (HRC) integrates the unique strengths of humans and robots to create production environments that are flexible, efficient, and centered on human well-being [2]. As production systems move toward higher levels of customization, HRC offers the potential to improve process speed, accuracy and operator ergonomics. Nevertheless, its implementation in real-world manufacturing remains limited due to persistent performance and safety challenges, particularly under high-speed operating conditions [3].
When a robot and a human are required to jointly manipulate an object, with the robot following the human’s lead, trajectory planning must be dynamic and adaptive. Since human motion inherently exhibits variability, the primary challenge in implementing HRC applications is to enable the robot to change its trajectory dynamically according to human behavior. In industrial settings, robot trajectory changes are typically restricted to conservative strategies, where path changes are mostly excluded. In high-level human–robot collaboration, where both partners work on the same object, the robot must adapt both its path and its speed. Without this capability, cooperative handling or accommodation of deviations in human motion is not feasible.
Human motion prediction in collaborative handling tasks, as demonstrated by Saeed et al. [4] and Ding et al. [5], provides dynamically changing reference trajectories. Consequently, robots should leverage these predictions directly by tracking dynamically changing trajectories. The aim of this work is to enable the robot to track a dynamically changing Cartesian reference trajectory in a HRC scenario. Therefore the robot must simultaneously avoid kinematic singularities and comply with joint velocity and acceleration constraints.

1.2. Related Works

Miro et al. [6] provide an overview of such trajectory adaptation methods. One example is speed and separation monitoring (SSM), where a speed-dependent safety distance must be maintained between human and robot [7,8]. Glogowski et al. [9] advanced this concept by computing the separation distance dynamically, enabling precise speed control to meet SSM requirements. Dsouza et al. [10] extend this line of work by introducing a collision-free trajectory planning approach based on artificial potential fields, which also embeds safety mechanisms comparable to those used in SSM. Another approach is power and force limiting (PFL), which permits low-energy contacts that remain within biomechanical limits by keeping robot motion slow [11]. Both strategies adjust the velocity but leave the preplanned path unchanged.
Haddadin et al. [12,13] proposed an impedance control framework for torque-sensor-equipped robots, enabling compliance through allowable path deviations under external forces. While this increases flexibility, it does not allow substantial trajectory changes in response to human movement. Faulwasser et al. [14,15] addressed path flexibility through a nonlinear model predictive path-following controller using torque inputs, enabling path tracking with or without speed constraints. Both of these methods are torque-based, whereas the control strategy presented in this work relies on position inputs. Other approaches, such as those by Villagrossi et al. [16] and Noohi et al. [17], employ interaction-force–based movement strategies for collaborative object manipulation. However, these methods only react to measured interaction forces and do not account for dynamically changing reference trajectories, limiting their ability to anticipate and adapt to highly dynamic human motion.
When adapting preplanned robot trajectories on the fly, several strategies can be employed. Liu et al. [18] provide an overview of dynamic motion planning methods. Some approaches rely on sampling-based techniques, such as the work of Covic et al. [19], who introduce the dynamic Rapidly-Exploring Generalized Bur Tree, ensuring safe motion in dynamic environments through a hard real-time scheduling framework and automatic velocity adjustment based on the minimum obstacle distance. Other approaches use optimization-based methods, including the work of Ansari et al. [20], who generate assistive forces to reduce human effort, as well as the method of Pupa et al. [21], who propose a trajectory optimization scheme that allows deviations within a tube around a reference path. Yet other methods, such as that of Chen et al. [22], employ deep reinforcement learning with a soft actor–critic architecture, which requires large amounts of training data that may not be available for highly dynamic behaviors. Although these strategies differ in design, they share the limitation that the robot only adapts its motion locally, which prevents them from tracking rapidly and continuously changing trajectories. Because human motion prediction in collaborative handling tasks, as demonstrated by Saeed et al. [4] and Ding et al. [5], provides dynamically changing reference trajectories, robots should leverage these predictions directly by tracking those trajectories.
Dani et al. [23] proposed a method for tracking a Cartesian reference motion obtained from human trajectory estimation. However, their approach leaves open how dynamically changing Cartesian reference trajectories can be transformed into joint-space while simultaneously avoiding singularities and respecting joint velocity and acceleration constraints.
Avoiding kinematic singularities is a central challenge when following a Cartesian reference trajectory. A criterion to determine how well a robot can move from certain postures is the manipulability index as defined by Yoshikawa [24]. Furthermore Zaplana et al. [25] propose a method that determines the distance from the current robot configuration to singular states. Several Cartesian Space (CS) planning algorithms make use of this manipulability measure. Approaches like Shi et al. [26] analyse the joint space for singularities and map them to CS in order to plan a trajectory that avoids those singularities. Liu et al. [27] avoids singularities in time-optimal trajectory planning by detecting singular regions through Jacobian decomposition and applying cyclic damping to adjust joint velocities, ensuring smooth motion within kinematic constraints. Beck et al. [28] propose a method for singularity avoidance in trajectory optimization by introducing potential functions that penalize low-manipulability configurations, thereby steering the robot away from singular regions while maximizing manipulability. All these approaches have in common that they are computationally expensive and that they are executed before a movement starts. The avoidance strategy proposed in this work is able to avoid singularities on the fly.
Another important aspect is ensuring compliance with joint velocity and acceleration limits while tracking a trajectory defined in Cartesian space. One approach to ensure compliance with these constraints is trajectory scaling. Zhang et al. [29] and Wolinski et al. [30] formulate the IK problem as a quadratic program and incorporate trajectory scaling to guarantee that joint velocity and acceleration limits are respected for a planned trajectory. The saturation in null space algorithm, as proposed by Flacco et al. [31], handles IK for redundant manipulators by enforcing joint limits and scaling tasks when necessary. In contrast, this work proposes a simple approach that just slows the robot down when a velocity violation is expected.

1.3. Research Questions

This paper intends to demonstrate how a robot can adapt to dynamically changing trajectories, such as those arising in HRC when jointly handling a rigid object. Specifically, it seeks to address the following questions:
1.
How can a robot track a dynamically changing reference trajectory for its TCP in soft real time?
2.
What tracking performance can be achieved when following dynamically changing Cartesian reference trajectories?
3.
Who is dominating the movement and when?
Those questions are part of the project “High-speed motion tracking and coupling for human-robot collaborative assembly tasks” (HiSMot). The goal of that project is to harmonize human and robot motion during cooperative handling of a rigid object.
The content of this research article is structured as follows. In Section 2, a motion planner is presented that enables the robot to track a dynamically changing TCP reference trajectory. There are also mechanisms integrated that let the robot avoid singularities on its path and adhere to joint velocity and acceleration constraints. In Section 3, this proposed planner is an laboratory environment. The above formulated research questions are discussed in Section 4 and this research article closes with a brief view on future research in Section 5.

2. Materials and Methods

2.1. Structure of the HiSMoT Controller

The controller proposed in the HiSMoT-project is shown in Figure 1. It comprises two main components: the Trajectory-based Latent Space (LS) controller, which generates the reference motion for the robot and has been presented in separate work [4], and the low-level motion planning of the robot, which is presented in this article. The LS-Controller generates human motion that serves as a reference for the dynamic motion planner. It is based on a data-driven model for synthesizing natural human motions proposed by Min et al. [32]. This model was later extended by Manns et al. [33,34], enabling the identification of clusters of natural motions in assembly contexts by mapping human motion data into a low-dimensional latent space (LS), where each point represents an entire body motion. By learning the distribution of these points the model can generate new motions that fit within the learned natural variation. This model was further specified by Saeed et al. [4] to generate human movements for handling a rigid body object during assembly tasks. In the scope of this paper, a movement where a human and a cobot collaboratively move a rod from location A to location B is investigated. The human motion generator model is not in the scope of this research article. It is assumed that the human and the robot have already grasped their respective sides of the rod. The movement to reach the rod is disregarded. It is assumed that the LS-Controller knows the current location where the human grasps the rod in location A and a desired goal location B. The LS-Controller now generates a set of natural movements for all joints of the human skeleton model. From that, the most probable motion is extracted [4].
To properly control the robot, only the movement of the hand, which is coupled to the rod, is extracted. Because the rod is a rigid body with a known length, and the human hand is assumed to be fixed to the rod, the trajectory of the TCP of the robot can be derived from that. Hereafter, this is referred to as the reference trajectory x ref ( t ) . Due to the individual character of each human movement, it is clear that the human motion will differ from the guessed reference trajectory at some point. As long as the movement continues, the more likely deviations from the proposed trajectory will occur. So the LS-Controller needs feedback from the human hand to update the guessed trajectory in real-time. From the known robot TCP position x act , the position of the human hand can be inferred. During motion, the LS-Controller continuously updates the probabilities of possible human movements and determines the most likely trajectory. Based on the observed motion history from location A to the current point, it then generates a human trajectory toward the desired goal. Once the new reference trajectory is generated, x ref ( t ) is changed. The new reference is then the input for the motion planner.
Since the LS-Controller updates the reference trajectory online, the robot needs a planning strategy capable of adapting to these real-time changes. The primary focus of this paper is the motion planning of the robot, aiming to track a reference trajectory that could be obtained from a human motion model. In the scope of this work, it is assumed that the output of such a motion model always represents physically possible motion, as it is intended to reflect natural human movement. Since the reference trajectory changes in real-time, the robot must support real-time control. Therefore the output of the motion planner are joint commands that are directly executed by the robot.
There are several reasons why a robot may not be able to track a Cartesian trajectory with a simple motion planner that only transforms Cartesian positions into joint state commands via IK. The first reason is that the reference can lead the robot into a singularity. If the robot gets too close to a singularity, the IK cannot find a solution for the joint states, or leads the robot into very fast joint movements. Therefore, singularities need to be avoided by the movement of the robot. The second reason is the violation of joint and acceleration limits in the joint space. Even slow movements in CS can lead to fast movements of the single joints of the robot. So the velocity of every joint of the robot is constrained. When constraining velocity and acceleration, a deviation from the reference trajectory will occur. Those two reasons are the leading causes for the robot not being able to track a given Cartesian reference trajectory. In those cases, the robot should assume a dominant role and try to move on a trajectory that minimizes the error between the reference motion and the robot motion.

2.2. Path Following

The proposed motion planner is presented in the following. The formulation begins with the task of tracking a Cartesian path that may change dynamically and is subsequently extended to trajectory tracking with singularity avoidance and compliance with joint velocity limits. To this end, a set of simplifying assumptions is introduced first and then gradually relaxed in later sections, thereby increasing the complexity of the motion planner:
1.
The path lies within the workspace of the robot and every point is reachable
2.
The path does not change
3.
The TCP velocity is assumed as constant
4.
There are no singularities on the path that the robot has to avoid
5.
There are no constraints on velocity and acceleration for the joints of the robot
The path is generated by the LS-Controller depicted in Figure 1, which gives a sequence of points
P : = p i i = 0 n with p i R 3 ,
that represent a natural human motion, where p 0 is the start location and p n is the destination. The points contain Cartesian coordinates where the orientation of the gripper is first assumed as fixed. A discrete series with varying distances between neighboring points is not suitable for directly controlling the robot. Therefore, the path P is approximated with a cubic-spline. To apply the spline approximation, the given points are parameterized over the Cartesian distance between neighboring points
t 0 = 0 , t i = k = 1 i p k p k 1 .
Those parameters are then normalized in the interval [ 0 , 1 ] with
t i = t i t n i = 1 , , n .
Now t i indicates the relative position and the relative arc length on the parameterized curve that connects the points of P with a linear approximation. When approximating the movement of the human this is not sufficient because the linear approximation is not smooth enough. To ensure a smooth transition between the waypoints, C 2 steadiness is applied, which means that the first and second derivative are continuous at the transition points and so the velocity and acceleration are steady in those points too.
Because the sequence of points P is assumed to represent realistic motion and the waypoints are sampled at an approximately uniform frequency of around 60 Hz, no significant changes in velocity or acceleration are expected between neighboring waypoints. Furthermore, because the original trajectory is unlikely to be highly curved due to the naturalness of human motion and because the distance between neighboring waypoints is small, the error between the linear approximation and a spline-based representation remains small. The difference between arc length and chord length is of second-order with respect to the waypoint spacing and is therefore negligible for the considered sampling rate.
To modulate such a function cubic splines
s i ( t ) = a i + b i ( t t i ) + c i ( t t i ) 2 + d i ( t t i ) 3 , t [ t i , t i + 1 ] , i = 0 , , n 1
with
s i ( t ) = x ( t ) y ( t ) z ( t ) T
are used. With linear algebra and the Thomas-Algorithm [35] the coefficients of the cubic spline are
a i = p i for i = 0 , , n 1 b i = p i + 1 p i t i + 1 t i 1 3 c i + 1 + 2 c i t i + 1 t i for i = 0 , , n 1 c i = 0 for i = 0 i = n 1 z i μ i c i + 1 for i = 1 , , n 2 d i = c i + 1 c i 3 t i + 1 t i for i = 0 , , n 1
where the coefficients c i are calculated recursively. The coefficients in c i are
z i = α i t i t i 1 z i 1 l i for i = 1 , , n 2 μ i = t i + 1 t i 1 l i for i = 1 , , n 2
with
l i = 2 t i + 1 t i 1 t i t i 1 μ i 1 for i = 1 , , n 2 α i = 3 p i + 1 p i t i + 1 t i 3 p i p i 1 t i t i 1 for i = 1 , , n 2
and the initial values of l 0 = l n 1 = 1 and μ 0 = z 0 = z n 1 . With these coefficients, the cubic splines Equation (4) can be calculated from the support points of the path Equation (1) and the parameterization of the curve Equation (3). The spline is now used as the reference path, which the robot’s TCP has to track.
To control a real or simulated robot using position control, discrete commands are required. Within the scope of this work, the 7-DoF KUKA LBR iiwa is used. The KUKA Fast Robot Interface (FRI) package [36] enables direct position control of the real robot in hard real time at a frequency of 200 Hz. The proposed motion planner operates in soft real time with a control frequency f of 20 Hz. Therefore, Section 2.7 introduces a buffering structure that transmits commands to the robot at the required control frequency of 200 Hz.
Now the goal is to derive the next position command x next . With known constant control frequency f of the robot and constant Cartesian TCP velocity v ¯ , the distance between the current position and next commanded position follows as
Δ s = v ¯ f .
Because x act ( t k ) and the distance Δ s are known x next ( t k + 1 ) can be calculated with Equation (4). Therefore it is assumed that for small deviations in t the curve s ( t ) is linear. The arc length between two values of t can be calculated with
t j t j + τ s ( t ) d t η = 1 N s ( t k + η δ t ) s ( t k + η 1 δ t ) f ( N ) = Δ s ,
where the integral is approximated using a numerical Riemann sum, which sums straight-line distances between sampled positions on the curve s ( t ) . To find a τ that satisfies this equation from above δ t is chosen very small and N is increased stepwise. It is obtained with
τ = δ t · arg min N f ( N ) Δ s .
With knowledge of the spline Equation (4) the next Cartesian joint command can be obtained with
x next ( t j + 1 ) = s ( t j + τ ) .
With the assumptions made in the beginning of this section, the robot can track a given path with constant velocity. Those equations are summarized by the Next Point Generator (NPG) as depicted in Figure 2. The inputs of the NPG are the current position of the robots TCP x act ( t j ) , the control frequency of the robot f, the desired constant TCP-velocity v ¯ and the given support points P. From that, first the spline s ( t ) is calculated with Equation (4) and after that x next ( t j + 1 ) with Equation (7).
A key characteristic of human movement is its high variability. When a robot works with a human, it can not be assumed that the human stays on an initially predicted path. So, the robot needs to be able to track a changing path. Therefore, Assumption 2 is modified such that the reference path is no longer considered fixed but can instead change dynamically during the robot’s motion. If the reference path is changing, two things are essential. On the one hand, the robot needs to be able to accept movement commands in real-time, which is guaranteed by the above mentioned position control. On the other hand the robot needs to move smoothly to the new path.
Therefore, the reference s ( t ) is discretized with Equation (6) and Δ s = l so that a sequence
W : = w j i = 0 e with w j R 3
of equidistant points w j on s ( t ) is obtained. One exception is the distance between w e 1 and the last point of the entire movement w e , which could be less than l because the length of the approximated curve is, with high probability, not a multiple of l. To reach the next target w j + 1 , the NPG is modified. The last target position w j is saved in a buffer. From there, the TCP should move in a straight line to w j + 1 . The NPG is modified so that
x next = x act + Δ s w j + 1 w j w j + 1 w j ,
where the fraction on the right hand side is the normalized direction from w j to w j + 1 . Now, when the reference spline s ( t ) changes to s ( t ) the sequence of equidistant points W changes to W accordingly. This has also consequences for x next , a transition to the new path W becomes necessary. The sketch in Figure 3 illustrates a reference spline s ( t ) , which is updated at the next time stamp to s ( t ) . The black crosses mark the sequences of support points P and P , which do not need to be equally spaced. In contrast, the red crosses indicate the sequences of equidistantly spaced points W and W along the reference spline.
Because the new path W has not necessarily the same length as W a metric is derived to avoid that the NPG gives points that are not in the direction of the target point and steer the TCP closer to the start. Imagine a scenario where the arc length of W is longer than that of W. The target of the NPG is w j + 1 . Now the question arises: which point in W one has to choose in order to avoid a movement backwards in the direction of the starting point. The first guess would be the target point w j + 1 corresponding to w j + 1 . When the arc length of W is longer than the arc w j + 1 most likely lies not in the direction of the end point. To measure this, the cosine similarity
σ = cos Θ = v c · v e v c v e
is used, with 
v c = w j + 1 + k x act v e = w e x act
where v c is called the candidate vector with an initial k = 0 and v e the vector that points in the direction of the target of the entire movement. Now σ is evaluated, if it is greater than zero it means that w j + 1 lies roughly in the same direction from x act as w e . This means that the target is viable and could be approached. If  σ is equal to or less than zero, it means that w j + 1 does not lie in the direction of w e . In that case, k is increased and σ is re-evaluated. This is repeated until σ has a positive value. Then w j + 1 + k is used as the next target of the NPG. If it happens that W is shorter than W it is possible that for w j + 1 no corresponding w j + 1 exist. In such a case, the NPG chooses w e as next target. So the next position command sent to the robot is
x next = x act + Δ s w j + k + 1 w j w j + k + 1 w j .
In summary, this method ensures that the NPG does not set a target that lies not in the direction of the end position of the movement. So no backwards movement is possible. This method is used for paths W that could be longer or shorter than W. Summarized the changes made to the NPG in Figure 2 are that the spline is now discretized and those discrete points are used as intermediate goals. The next position command x next is calculated based on a straight line from the current position to the next intermediate goal on the reference. It is also checked whether the path has changed, and the next intermediate goal is found based on the method explained above, which finds the next position command roughly in the direction of the target position of the entire movement. The TCP of the robot is now able to track a dynamically changing path under the assumptions named above.

2.3. Trajectory Tracking

Human movement is inherently variable, and it is highly unlikely that a person maintains a constant velocity during motion. Instead, velocity continuously fluctuates over the course of the movement. In the context of HRC, the robot must be capable of tracking a trajectory while dynamically adjusting the velocity of its TCP. Accordingly, the third assumption from Section 2.2 has been revised to account for a time-varying TCP velocity.
Therefore, the given set of points (see Equation (1)) is modified to a set of tuples
P v : = ( p i , v ˜ i ) i = 0 n with p i R 3 , v ˜ i R 0 +
which defines the position of the TCP and the velocity at the specified position. This implies that a trajectory, rather than only a path, is now specified. The path itself is still approximated using Equations (2)–(4). The resulting spline s ( t ) is then roughly parameterized by its arc length. After that, due to the small distances between the known points and the naturalness of the approximated curve, no sudden changes in velocity are expected. Therefore, the velocity along this path is approximated linearly using
v i ( t ) = 1 γ v ˜ i + γ v ˜ i + 1 , t [ t i , t i + 1 ] , i = 0 , , n 1
with
γ = t t i t i + 1 t i .
So the trajectory is defined by
ξ ( t ) : = s ( t ) , v ( t ) , t [ t 0 , t n ]
where the path and velocity are interpolated separately. Since the sequence in Equation (10) changes rapidly, interpolation methods such as Hermite splines [37], which compute the velocity as the derivative of the spline, are too computationally demanding to be executed at the robot’s control frequency. For the approximation, it is assumed that the path between two consecutive points is approximately linear and that the velocity changes linearly between those points, either increasing or decreasing. Now the trajectory is discretized into control points regarding its arc length
W v = ( w j , v j ) , with w j R 3 , v j R 0 +
where the points w j are discretized in the same way as in Section 2.2, and the velocity v j is obtained by evaluating v ( t j ) . To determine the corresponding step size Δ s for the next Cartesian joint command, the constant velocity v ¯ in Equation (5) is replaced with
Δ s = v next f
and must be evaluated in every sample. Since the current position x act , the previous control point ( w j , v j ) and the next control point ( w j + 1 , v j + 1 ) are known the velocity for the next position command can be calculated with
v next = v j + x act w j w j + 1 w j v j + 1 v j + v min e λ v j
which performs a linear approximation between the given control points. The last term was added to guarantee a minimum velocity v min at the start and before the stop of the movement. This ensures that the robot motion is properly initiated and that the final waypoint can be reached. The exponential decay form enables a smooth transition between the minimum velocity and the velocity profile generated by the trajectory approximation. The damping factor λ must be selected sufficiently large such that the last term vanishes for adequately high velocities v j , thereby having a negligible effect on the trajectory approximation outside the start and stop regions. With known Δ s , the next position command can be obtained from Equation (8).
If the reference trajectory changes at runtime, the same strategy as described in Section 2.2 is applied. For a new trajectory W v , the next target point w j + 1 and the corresponding v j are found as described and then used as the target control point. The new target is again approached linearly in position and velocity so that the step distance Δ s in Equation (9) with
x next = x act + Δ s w j + k + 1 w j w j + k + 1 w j .
is modified and becomes the dynamic step distance
Δ s f = v next = v j + x act w j w j + k + 1 w j v j + k + 1 v j + v min e λ v j .
Using Equation (14), the NPG can track a changing reference trajectory. Figure 4 illustrates an example of position commands for both increasing and decreasing velocity between w j and w j + 1 . For clarity, the example is shown in two-dimensional space. As can be seen, when the velocity increases, the distance between consecutive position commands becomes larger, whereas it decreases when the velocity is reduced. If the target changes due to a new reference trajectory, both the direction and the spacing of the position commands adapt accordingly. It should be noted that the NPG generates Cartesian position commands to track the given reference, without yet verifying whether the robot is capable of executing these commands.

2.4. Avoidance of Singularities

When sending position commands to a robot, it must be verified whether they can be executed. In this section, assumption 4. from Section 2.2 is relaxed, allowing for the possibility that the robot may be driven toward a singularity. Nonetheless, it is still ensured that the motion remains entirely within the robot’s workspace. For the purposes of this paper, the robot under consideration is a 7-DoF KUKA iiwa, as mentioned above, which can be controlled via position commands. The robot accepts joint commands q R N , with  N = 7 corresponding to the number of joints.
This section presents a strategy for avoiding singularities. The robot’s kinematics are briefly reviewed to introduce the manipulability measure employed in the approach. From given joint states the Cartesian position and orientation of the TCP of the robot can be calculated with
x = f ( q ) f : R M R N and x = x next x o with x next , x o R 3
where x next corresponds to the Cartesian position and x o to the orientation of the TCP, which together form a M = 6 DoF representation in CS. The function f is obtained from the known geometry of the robot and the Denavit–Hartenberg parameters [38]. It is expressed as a concatenation of transformation matrices, each parameterized by q . The NPG for trajectory generation provides the Cartesian position x next with fixed orientation, as the object to be handled should not change its orientation while moving in the collaboration investigated here. So the orientation x o is set to an angle where the gripper mounted on the robot is in a vertical position above the rod. This means every position has the same orientation. The joint states can be obtained with the Newton-Raphson method in an iterative manner
q k + 1 = q k + J + ( q k ) x f ( q k ) err
with appropriate initial values q k and the goal to minimize the error term err. The Moore-Penrose inverse [39]
J ( q ) + = J ( q ) J ( q ) J ( q ) 1
is used because the Jacobian
J ( q k ) = f ( q k ) q k
is of dimension N × M and thus cannot be inverted. In the following, the iterative process to retrieve the IK is denoted as
q = IK ( x ) IK : R M R N with f ( q ) x .
The robot accepts joint states that fulfill the condition
rank J ( q ) = M
which means the desirable motion can be executed. If the above-named condition is violated and
rank J ( q ) < M
then the manipulator is in a singular state. In a singular configuration, the IK may fail to produce an executable solution for q . When sending position commands to the robot in real time, it is therefore necessary to check at each time stamp whether the motion is approaching a singularity. For this purpose, the manipulability measure
w M ( q ) = det J ( q ) J T ( q )
introduced by Yoshikawa [24], is used. A small value of w M indicates close proximity to a singularity. The objective is to prevent the robot from executing movements that approach such configurations.
In the following, a singularity avoidance strategy is proposed that avoids singularities and brings the TCP back to the reference trajectory afterwards. For this purpose, the manipulability measure w M must not fall below a threshold w T . At each time stamp, the next target x next provided by the NPG is evaluated. If the manipulability measure is above the threshold w T , no action is necessary, as the robot is not close to a singularity. If the manipulability measure is below the threshold, corrective action is required to ensure proper movement. Between the points of the discretized trajectory, the robot moves linearly toward the next target w j + 1 . To avoid a singularity, the direction of the motion must be adjusted. Since the location of the singularity is unknown, it is not clear in which direction the robot should move to avoid it. Therefore, a set of candidate commands c ˜ 0 , , c ˜ N c 1 , illustrated in Figure 5, is provided.
To maintain the Cartesian TCP velocity it is required that the distance between each candidate and x act must be the same as the distance between x act and x next . To reach the next control point w j + 1 , it is also necessary that the candidates lie roughly in that direction. So a cone with its tip in x act and a height
h = v next f
is defined. The center of the cone should be aligned to the direction
d 0 = x act x next x act x next
of the desired movement in order to reach the next waypoint. The cone’s alignment and its slant height, which corresponds to Δ s , are fixed. The only adjustable parameter is the angle φ , which defines the cone’s aperture and must be less than 90 . This angle specifies the allowable deviation from the original direction and must be chosen such that the candidate directions deviate sufficiently from x next to avoid singular configurations. Within the scope of this work, the cone angle was set empirically to 60 , as this value provided a good compromise between effective direction adaptation and maintaining proximity to the original reference trajectory. The aim is to obtain a function that returns candidate points located on the edge of the cone’s base. The radius and the height of the cone are defined with
r = Δ s sin ( φ ) and h = Δ s cos ( φ ) .
The center of the base of the cone is computed with
c = x act + d 0 h .
Points on the edge of the cone’s base are described by the function
c ˜ ( φ ) = c + r cos ( φ ) g ^ 1 + sin ( φ ) g ^ 2
where g ^ 1 and g ^ 2 are the orthonormal basis vectors spanning the plane in which the candidate points lie. The first basis vector is defined as
g 1 = d 0 × u 1 ,
where u 1 is the first unit vector. If  d 0 is aligned with u 1 , the cross product yields the null vector. To avoid this case, the norm g 1 is checked; if it is less than 10 6 , the second unit vector u 2 is used instead. The second basis vector g 2 is orthogonal to both d 0 and g 1 and is computed as
g 2 = d 0 × g 1 .
Finally, to obtain the orthonormal basis required for Equation (19), g 1 and g 2 are normalized to g ^ 1 and g ^ 2 , respectively. With that equation the candidates
C = { c ˜ 0 , , c ˜ N c 1 } with c ˜ i = c ˜ ( φ i ) and φ i = 2 π i N c with i = 0 , , N c 1
can be obtained. Those candidates are equally spaced on the edge of the cone, which is aligned to the direction d 0 . Because the slant length of the cone is chosen with Δ s , it is also guaranteed that the velocity when moving to one candidate is the same as when moving to x next .
Now, the candidate with the best manipulability is searched. Therefore the fixed orientation x o is added to the position candidates to obtain a vector x i that describes the location of the robot as shown in Equation (16). Those candidate locations can be transformed with the IK (Equation (17)) into an amount of candidate joint states
Q = q 0 , , q N c 1 = IK ( x i ) | x i = c ˜ i x o , c ˜ i C .
Afterward, the manipulability measure from Equation (18) is evaluated for all candidate configurations, and the best one is selected according to
q next = arg max q i Q w M ( q i ) .
This configuration can then be used as the next joint state command, steering the robot away from a singularity while maintaining the desired Cartesian TCP velocity.
When applying this strategy at every time stamp, the robot’s trajectory is repelled from singular configurations. However, to both avoid singularities and track the given trajectory as closely as possible, the strategy requires refinement. Consider two neighboring control points, w j and w j + 1 , that are far apart, with a singularity lying between them. In this case, the robot would move away from the singularity until it could resume moving directly toward w j + 1 . In practice, the distance between neighboring control points is small, since W v is intended to approximate a spline smoothly. If a singularity is close to w j + 1 , the robot may be repelled from the target and the TCP ends up circling around it. To address this issue, the strategy is adapted as illustrated in Figure 6. For simplicity, the sketch is shown in two dimensions, though the same principle applies in three dimensions. Around each control point w j , an initial blending radius b r 0 of 2 cm is defined. If the robot’s TCP enters the sphere of this radius, w j + 1 is considered reached, and the next control point becomes the target. The modification is to increase the blending radius around w j + 1 whenever x next is adapted by the avoidance strategy. This ensures that the current goal is eventually considered as reached. Once the next control point is targeted, the blending radius is reset to its initial value and then increased again if further adaptations to x next are required.
An example of the strategy is shown in Figure 6. Each sketch indicates the current position x act , the next two control points w j + 1 and w j + 2 , the next position command x next generated by the NPG, possible candidate points, and the blending radius. In Figure 6a–d, x next (marked in red) lies in the direction of the target but has low manipulability. Two example candidates (marked in blue) are considered, and the one with the highest manipulability measure is selected. With each subsequent sketch, the blending radius increases, and in Figure 6d, the selected next command lies within this radius. At this point, w j + 1 is considered reached, j is incremented, and the next control point becomes the target. In the final sketch, Figure 6e, no adaptation of x next is necessary, as it already has good manipulability.
Algorithm 1 summarizes the avoidance strategy and is explained in the following. This algorithm describes the behavior of the modified NPG for singularity avoidance and is evaluated at every time stamp. Its inputs are the current discretized trajectory W v , the index j of the last reached control point, the constant initial blending radius b r 0 , the increment l by which the blending radius is increased whenever an adaptation of x next becomes necessary, and h the number of blending radius increments. In the scope of this work the increment is chosen with 1 mm , which means that b r increases by 2 cm per second when considering the constant control frequency of 20 Hz and ongoing violation of the manipulability threshold w T . The output is the next joint command q next . The integer h is initialized with zero at the begin of the movement, increased each time x next is adapted, and reset whenever a new target is set. First, x next is obtained from the NPG and transformed into a joint state command. If  x next lies within the blending radius of the target w j + 1 , the index j is incremented to set the next target. In that case, x next is computed again, now pointing toward the updated target. If  x next is not inside the blending radius, the manipulability measure of q next is evaluated. If it is below the threshold, movement candidates are generated, and the one with the highest manipulability measure is selected as q next . In this case, the integer h, which controls the growth of the blending radius, is also increased.
Algorithm 1 Singularity Avoidance
Require:  W v , j, b r 0 , l, h
Init:  d = 0
  1:
while  d < b r   do
  2:
      Obtain x next with Equations (8) and (12)
  3:
      Obtain q next with Equation (17)
  4:
      Adjust blending radius with b r = b r 0 + h l
  5:
      compute the distance to the next control point with d = x act w j + 1
  6:
      if  d < b r  then
  7:
           Increase the target j = j + 1
  8:
           Reset blending radius h = 0
  9:
      else
10:
           if  w M ( q next ) < w T  then
11:
                Find candidates C with Equation (20)
12:
                Obtain candidate joint States Q with Equation (21)
13:
                Choose q next with Equation (22)
14:
                Increase blending radius for the next time stamp h = h + 1
      return Next joint command q next

2.5. Compliance to Joint Velocity and Acceleration Limits

In the previous section, the robot’s joint velocity and acceleration limits were neglected. Therefore, assumption 5 from Section 2.2 is modified so that joint velocity and acceleration constraints must be respected when sending the next position command. Since the reference trajectory is defined in CS, it is not directly possible to determine the required joint velocities for accurate tracking. In the previously described control approach, the joint states obtained from IK would be transmitted to the robot without verifying compliance with its physical velocity and acceleration limits. The following section introduces a method that ensures adherence to these limits by modulating the robot’s motion speed, thereby maintaining compliance while preserving the reference path. It is assumed that the current joint states q act are known, and that the next joint command q next has already been adapted by the singularity avoidance strategy described in the previous section. For a discrete function with closely spaced values, the mean difference quotient can be used to estimate the derivative at a given point. Due to the high control frequency, and the resulting small distances between successive configurations in CS, as well as the assumption that q next remains sufficiently far from singular configurations, the difference between consecutive joint commands is expected to be small. This approximation introduces a discretization error that is proportional to the sampling interval and is therefore negligible for the control frequency used in this work. The computation is performed individually for each joint. With
q ˙ i ( t j + 1 ) = q i ( t j + 2 ) q i ( t j ) 2 Δ t with i = 1 , , n
and
q ¨ i ( t j + 1 ) = q i ( t j + 2 ) 2 q i ( t j + 1 ) + q i ( t j ) Δ t 2 with i = 1 , , n
the value of the derivatives at t j + 1 can be estimated. The time difference Δ t between two consecutive joint commands corresponds to the inverse of the control frequency f. Let q ( t j ) = q act denote the previously executed joint command, and let q ( t j + 2 ) = q next + 1 denote the joint command that follows after q next which is generated by the NPG using q next as the start value.
For the analysis of the velocity and acceleration limits, it is assumed that those values increase or decrease steadily between two consecutive joint commands. With Equations (23) and (24) the joint velocity q ˙ next and acceleration q ¨ next are estimated. Next, the relative violations of the joint velocity and acceleration are evaluated. For this purpose, the relative quotients of velocity and acceleration with respect to their maximum values are defined for each joint as
q v , rel , i = q ˙ i ( t j + 1 ) q ¯ v , i and q a , rel , i = q ¨ i ( t j + 1 ) q ¯ a , i with i = 1 , , N .
These quotients are composed of the desired velocity and acceleration divided by the maximum value for the corresponding joint. If a quotient is greater than one, the desired velocity or acceleration exceeds the limit and must be capped. If every quotient is less than one, the velocity and acceleration required for q next is within the robot’s limits and can be realized. The maximum relative deviation of velocity and acceleration
β max , v = max ( q v , rel ) and β max , a = max ( q a , rel )
is extracted, which is then used to cap the velocity or acceleration at the maximum value given by the limitations of the robot. The idea is to fix the velocity or acceleration of the joint with the largest relative deviation to the maximum velocity or acceleration and adjust the velocities of the other joints accordingly so that the path is not changed. Therefore
q next = 1 max ( β max , v , β max , a ) q next q act + q act
is adapted in a way so that q next is closer to q act than the initial q next . Summarized this method makes it possible that the TCP of the robot at least tracks the path of a trajectory planned in CS with reduced speed.

2.6. Summary of Dynamic Robot Motion Planner

The dynamic motion planner is illustrated in greater detail in Figure 7. This sketch summarizes the concepts introduced in Section 2.2, Section 2.3, Section 2.4 and Section 2.5. Given a reference trajectory defined by points with associated time stamps, the output of the motion planner is the next joint command, which can be sent either to the real robot or to the simulation. The motion planner is able to track a trajectory that changes dynamically, with the following properties:
1.
The path lies within the workspace of the robot, and every point is reachable
2.
The path can dynamically change when the robot moves
3.
The TCP velocity can change dynamically
4.
There could be singularities on the path, which need to be avoided
5.
The joint velocity and acceleration are limited
The dynamic motion planner (Figure 7) is responsible for sending joint commands to the robot with the required motion properties. It consists of the following modules: the Discretizer, the Check Waypoint module, the Target Generator, the NPG, and the subsequent safety checks (Singularity Check and Velocity Cap). The Discretizer converts the incoming time-stamped trajectory into a sequence of equidistant points in CS on the reference trajectory. The Check Waypoint module checks whether the next control point has been reached. Then, the Target Generator selects the active reference control point and provides the current direction of motion. The NPG generates the next Cartesian command along this reference, which is subsequently transformed into joint space. Finally, the Singularity Check and Velocity Cap modules modify the resulting joint command if necessary before it is sent to the robot.
In the Discretizer, the time-parameterized input sequence P v is approximated using a spline representation and reparameterized from uniform sampling in time to approximately uniform sampling in CS. The resulting output is a sequence of equidistant points W v in CS with corresponding velocities.
In the Check Waypoint module the motion planner checks whether the next control point has been reached. The robot’s current position x act is obtained by applying forward kinematics to the current joint configuration q act . This position serves as the basis for selecting the next waypoint x next on the trajectory. The Cartesian velocity is implicitly determined by the distance between x act and x next . A goal is considered reached if the TCP lies within its blending radius b r . The index variable j tracks the last reached control point and is incremented once the goal is reached.
In the Target Generator, the next control point is set as next goal. Therefore, it first checks if the current sequence of equidistant control points W v differs from the previously used reference W v , 1 . If unchanged, the next control point is simply w j + 1 . If the trajectory has changed, a control point that lies in the direction of the known endpoint of the movement is selected and j is set appropriately. This avoids using a control point, which could steer the TCP closer to the start point again. Given the current position x act , the control frequency f, and the next target, the NPG computes the next Cartesian command x next along the trajectory. Combined with a fixed orientation x o , this point is transformed into a joint configuration q next via IK.
The Singularity Check modifies q next if necessary and ensures that q next does not steer the robot into a singularity. The variable φ governs the angle on which the avoidance path deviates from the straight line path to the next control point. In cases of adaptation, the blending radius b r is enlarged by an offset l to prevent circling around a goal. The variable h tracks how often this enlargement occurs and is reset once the next control point is reached. Since the trajectory is planned in CS, the NPG is unaware of joint velocity and acceleration constraints.
In the Velocity Cap block, these are checked based on q next and the subsequent configuration q next + 1 which the NPG also generates with x next assumed as current robot state. Using the control frequency f, the expected joint velocities and accelerations are estimated. If any joint exceeds its velocity or acceleration limits, the velocity of the fastest joint is capped, and the subsequent joint command q next is adjusted accordingly by proportionally scaling the velocities of all other joints. This ensures that the TCP remains on the path of the trajectory, albeit at a reduced speed. Finally, the resulting joint command q next is sent to the real or simulated robot.

2.7. System Architecture

For real-time control, the KUKA FRI-package is used, which enables hard real-time robot control at 200 Hz. The Quality of Service (QoS) specifications require that consecutive commands be provided precisely every 5 ms. To satisfy these requirements, the proposed motion planner must compute new joint commands in less than 5 ms to satisfy the QoS. While the planner meets this requirement in most cases, occasional violations occur due to two main factors. First, the communication delay between the planning hardware and the robot hardware is approximately 1 ms in the current setup. Second, the computation time of the inverse kinematics solution depends on the robot’s configuration. In regions of low manipulability, an ill-conditioned Jacobian matrix must be inverted, where the determinant is close to zero. This can significantly increase computation time and may exceed the available time budget, leading to violations of the QoS requirements and, in the worst case, interruptions in communication between the application and the controller. Therefore, computing joint positions strictly just-in-time is not sufficient, as the robot controller requires commands at a fixed update rate. To address this, a command buffer is introduced that stores joint commands computed in advance. This approach decouples command generation from communication, introducing a controlled delay to ensure a continuous and stable data stream to the robot controller. In summary, the proposed motion planner generates joint commands that track a dynamically changing reference in soft real-time, while the command buffer stores these commands and supplies them to the robot at a fixed control frequency. In the unlikely event that the motion planner fails to compute the next joint values within the required control cycle of the command buffer, the robot performs a controlled stop.
The buffer is designed following a publisher–subscriber architecture and operates in two phases. First, the motion planner is initialized with the current joint configuration q 0 . In this phase, the buffer requests the first two joint commands, q 1 and q 2 , from the motion planner, forming two segments ( q 0 , q 1 ) and ( q 1 , q 2 ) . Every segment is interpolated such that the joint velocity within a segment changes linearly, using a 1:10 interpolation ratio between the motion planner frequency (20 Hz) and the robot control frequency (200 Hz). The concept of the buffer is illustrated in Figure 8, where black dots denote the joint commands generated by the motion planner and blue strips represent the interpolated commands q int produced by the buffer; the initialization phase is shown on the left side of the figure, while the operation phase is shown on the right. Once the initial segments are computed and buffered, motion execution begins, marking the end of the initialization phase. During operation, whenever a joint command q k is reached, the buffer triggers a request to the motion planner for the next point q k + 2 . At this point, the subsequent command q k + 1 is already available in the buffer, and the interpolation between ( q k , q k + 1 ) has already been performed. This lookahead provides sufficient time for the motion planner to compute q k + 2 and for the buffer to interpolate the segment ( q k + 1 , q k + 2 ) before q k + 1 is executed. If the trajectory is completed and no further commands are provided by the application, the buffer maintains the last control point as the active command to ensure continuous communication with the controller.
Compared to just-in-time computation, the proposed buffer structure ensures that the robot controller receives commands that satisfy the required QoS, at the expense of hard real-time trajectory tracking. Consequently, adaptations to changes in the reference are subject to a short delay and do not take effect in hard real-time. The interpolation rate is chosen conservatively but could be increased if more capable hardware is available. A larger interpolation rate of the motion planner would improve tracking performance and reduce the influence of the command buffer delay. For HRC, the soft real-time performance provided by this buffer is sufficient, as the resulting delays remain below typical human reaction times [40].
The overall system architecture for controlling the robot with the proposed motion planner is shown in Figure 9. It consists of four components: the real robot, which receives commands q int at a fixed control frequency; a trajectory generator, which provides references P v based on the current joint configuration q act ; the robot motion planner, which computes the next joint command q k + 1 for a given reference P v and a start configuration q k ; and the buffer, which supplies the joint commands q int to the robot at the required control frequency in a continuous manner.

3. Results

In the following, the proposed motion planner is evaluated using a KUKA iiwa in a laboratory environment. The robot is operated in impedance control mode with low stiffness parameters to allow deviations from the commanded position, as required in scenarios where a human and a robot jointly manipulate a rigid object during a pick-and-place task, which is common in HRC. To evaluate the motion planner’s performance in reference trajectory tracking, the robot is operated without physical coupling to a human. This is motivated by the limited reproducibility of human motion and the fact that accurate prediction of human movement would be required to obtain consistent reference trajectories, which is beyond the scope of this work.
Both dynamically changing and static reference trajectories are considered. Each reference describes a movement from a start pose to an end pose with fixed orientation. For the experiments presented in the following, the parameters introduced in Section 2 are fixed as follows. The initial blending radius is set to b r 0 = 2 cm , the minimum velocity to v min = 0.0075 m s , the damping factor of the minimum velocity to λ = 20 , and the blending radius increment to l = 1 mm . The manipulability threshold w T is set to 0.04 . These parameter values were selected based on empirical tuning and the authors’ experience with the KUKA iiwa robot.

3.1. Track a Static Trajectory

The first scenario investigates a robot replicating a recorded human trajectory, specifically moving a rod from location A to location B. This reference movement is presented componentwise in terms of position and velocity in Figure 10a,b. The tracking performance of the proposed motion planner is evaluated by comparing the reference with the actual motion. The position and velocity deviations are shown in Figure 10c,d. Throughout the entire movement, the deviation in any component from the reference trajectory does not exceed 2 cm, indicating that the robot can reproduce the trajectory with an accuracy of a few centimeters. The deviation in velocity does not exceed 4 cm per second, which is an order of magnitude smaller than the reference velocity along the path. The largest deviations in both position and velocity occur near the end of the motion, which is caused by the selected blending radius, since the robot terminates its motion upon entering the blending radius around the target. An additional source of error during the motion arises from the low stiffness parameters that are used. When position commands are executed under low stiffness, they are not tracked exactly due to the influence of gravitational and inertial forces.
In the context of HRC, small positional deviations can be regarded as acceptable, since humans are generally not consciously aware of minor trajectory variations as long as the goal is achieved [3]. Therefore, the largest deviation can be considered as relevant metric for evaluating HRC when human and robot are physically coupled. However, if the deviation grows larger, the robot exerts a guiding influence by forcing the human onto a new path. The greater the deviation, the stronger this guiding force becomes, and the more likely the human is to perceive a change in their trajectory. In such cases, the robot is considered to be dominant.

3.2. Track a Dynamically Changing Trajectory

In this scenario, the TCP of the manipulator is required to track a dynamically changing reference trajectory. Therefore, two locations are connected by a sinusoidal path that is parameterized in time as
τ = t T ,
where T denotes the movement duration. The parameterized sinusoidal curve is defined as
s sin ( τ ) = x a + τ ( x e x a ) + n A ( t ) sin ( π τ ) sin ( π f τ ) with τ [ 0 , 1 ] ,
where x a is the start location, x e the goal location, n the normalized orientation vector of the sinusoidal curve, A ( t ) the time dependent amplitude and f the frequency of the curve which determines the number of peaks. The first two terms describe the linear interpolation between the start and the goal location. The last term introduces the sinusoidal modulation, where the amplitude is varied dynamically to ensure that the reference changes at every time stamp. The factor sin ( π τ ) guarantees that the curve starts and ends at the desired locations. This path is further parameterized with linear increasing and decreasing velocity
v sin ( τ ) = τ 2 L T for 0 τ 1 2 ( 1 τ ) 2 L T for 1 2 τ 1 2
where L is the total length of the sinus curve in this moment.
The sinusoidal trajectory and the associated velocity profile are used as input for the motion planner. The curve is rotated so that the reference lies in the xy-plane. The total movement duration T is set to ten seconds, with an amplitude ranging from 5 cm to 15 cm. The reference position profile is shown in Figure 11a and the reference velocity profile in Figure 11b, where the maximum velocity reaches approximately 0.13 m per second. It is important to note that these profiles represent the values at each discrete time stamp, since the reference changes dynamically. Figure 11c shows the difference between the reference and actual positions. The maximum deviation is about 15 mm in the x-direction, while it is below 5 mm in y- and z-direction. Although there is no movement in z-direction, there is a slight error in position. This is caused by the low stiffness of the impedance control described in Section 3.1. There is also an error summed up in the other components because of the inertial forces. As before, the blending radius explains the deviation observed at the end of the movement.
The difference in total Cartesian velocity is presented in Figure 11d. Overall, those deviations are small compared to the reference velocity, but three distinct areas require interpretation. Negative deviations indicate the robot is moving faster than the reference, while positive deviations indicate it is slower. At the start of the motion, the actual velocity is slightly higher due to Equation (13), since the robot begins with a minimum velocity. The area in the middle occurs because the reference velocity exceeds the robot’s velocity. This results from the switch from acceleration to deceleration combined with the blending radius. Before the maximum velocity is reached, the next goal and its corresponding velocity are already set, causing the robot to move slightly slower. The final peak has the same origin: once the goal lies within the blending radius, the robot stops, leading to a positive velocity deviation.
Overall, the results demonstrate that such a dynamically changing reference trajectory can be tracked with position deviations of only a few millimeters. For higher velocities, the deviation in velocity remains an order of magnitude smaller than the actual velocity. Noticeable relative deviations only occur at the beginning and at the end of the movement, which can be explained by the minimum velocity constraint and the applied blending radius.
When comparing the results of this section with those of the previous sections, it can be seen that the deviations are in similar magnitudes. For the motion planner, it makes no difference whether the reference trajectory is initially known or dynamically changing.

3.3. Track a Trajectory with Singularity Avoidance

In the following, the singularity avoidance strategy introduced in Section 2.4 is evaluated. The motion planner is tested with a static reference trajectory, whose path is shown by the blue line in Figure 12. The reference TCP velocity is defined as in Equation (25) with a total trajectory duration of ten seconds. As demonstrated in the previous section, the total velocity can be tracked with comparable accuracy. The plot of deviations is omitted here, since it is evident that the individual position and velocity components over time cannot be tracked exactly due to the detour of the actual path around the singularity. The dashed red line illustrates the actual path. In the middle of the motion, a singularity is avoided, and once the manipulability has increased sufficiently, the path converges back to the reference. The avoidance is smooth in CS, and after bypassing the singularity, the TCP returns to the reference along a direct path.

3.4. Track a Trajectory with Joint Velocity and Acceleration Limits

In the following, the velocity limitation described in Section 2.5 is evaluated. This is exemplarily demonstrated for a linear movement in the negative x-direction, with a total length of 0.6 m. The reference velocity along this path is shown with the blue line in Figure 13b. For safety reasons, the joint velocity limit was conservatively set to 0.2 radians per second for this experiment. It can be observed that the Cartesian reference velocity, cannot be fully matched by the actual velocity, shown as the dotted line.
Initially, the Cartesian velocity is accurately tracked by the robot. However, after approximately three seconds, joint j 7 reaches its velocity limit, as shown in Figure 13c, preventing any further increase in Cartesian velocity. Figure 13a shows the corresponding deviation in Cartesian position, which increases until the reference trajectory reaches the goal and subsequently decreases until the TCP is within the blending radius of the goal. It can be seen that the joint velocity constraint is satisfied at all times.

4. Discussion

In this work, a motion planner was developed and evaluated in an laboratory setup that enables a cobot to track a dynamically changing reference trajectory in real time while adhering to joint velocity limitations and avoiding singularities that may lie within the path of the robot. Now the research questions from Section 1.3 are discussed.
The first question, how a robot can track a human trajectory, is addressed by the proposed motion planner. Human motions are highly individual and can change dynamically, requiring the robot to adapt its trajectory in real time. As shown in Section 3.1, a recorded human trajectory can be accurately reproduced by the proposed planner. Moreover, dynamically changing trajectories can be tracked without significant deviations in position or velocity, as demonstrated in Section 3.2. The motion planner allows the robot to track a given Cartesian reference under the condition that the robot maintains sufficient manipulability along the trajectory. Since the input trajectory is evaluated at every time stamp, the planner supports highly adaptable movements under the assumption that they are physically possible. Minor deviations between the reference and the actual trajectory remain. Industrial robots generally achieve very high precision when tracking predefined trajectories. Considering that the reference can change at every time stamp, the proposed motion planner achieves the goal of tracking a changing trajectory sufficiently.
The second question, what tracking performance can be achieved when following a human reference trajectory, can be addressed as follows. As long as the manipulability remains sufficient and the human trajectory lies within the workspace of the robot, the trajectory can be tracked with good accuracy (e.g., within a few centimeters). For the proposed motion planner, it makes no difference whether the reference is generated in advance or changes online. This property makes the planning scheme highly adaptable to fast changing references, as they can be expected in HRC. If a singularity occurs on the robot’s path or joint velocity and acceleration limits are violated, the robot is unable to track the given trajectory. In such cases, the motion planner attempts to track the trajectory as closely as possible. In the case of a violation of velocities, the movement slows down while still maintaining the path. In the case of singularities, it avoids them and moves back to the path in a direct way. Future investigations will focus on determining how the robot should return to a given reference, either in a direct, time-optimized manner or in a smooth manner, and how the prediction of human movement can be incorporated into the motion. This also raises the question of leadership in HRC, specifically when the robot should be dominant, when the human should be dominant, and how the transition of leadership should be managed.
For the second question, a few restrictions for the reference have to be made. At first, the trajectory tracking works for smooth or smoothly changing trajectories. To this end, the proposed planning unit will be evaluated in a scenario where the robot is physically coupled to a human co-worker via a rigid object. Such scenarios necessitate the prediction of human motion to ensure smooth robotic movements in collaboration tasks. Future work aims to couple this motion planner with a proper human reference generator to evaluate how the robot reacts to sudden changes in motion.
Regarding the third question, namely who is dominating the movement and when, a first insight can be given. When the deviations in position and velocity between the dynamically changing reference and the actual robot trajectory remain small, no joint velocity or acceleration limits are violated and no singularities are encountered, the human can be regarded as dominant. However, when the robot is unable to track the reference due to these constraints and instead avoids singularities or limits its velocity, the human is guided onto a different trajectory. In such cases, the robot assumes a dominant role. Future work will analyze the behavior and perception of human collaborators interacting with a robot controlled by the proposed motion planner.
Furthermore, future work will investigate the behavior of the proposed motion planner in collaborative pick-and-place scenarios with human participants, including the integration of human motion prediction. In addition, the transitions in trajectory leadership will be examined. In situations where the robot cannot follow the human motion, it must assume dominance. However, since the robot is intended to support its coworker, it is desirable that the human regains dominance as soon as possible. With the proposed dynamic motion planner, the robot returns to the reference along the shortest possible path. The objective of future work is to optimize this transition so that it becomes smooth and natural.

5. Conclusions

This work has presented a dynamic motion planner that enables collaborative robots to track dynamically changing reference trajectories, as required in HRC. An evaluation using a KUKA iiwa operated in impedance control mode confirms that the motion planner can generate appropriate position commands for accurate trajectory tracking. Furthermore, the strategies for singularity avoidance and velocity limitation proved effective, with the robot becoming dominant in critical situations. Future work will focus on investigating how transitions between human and robot dominance can be realized smoothly and naturally, as well as testing the proposed motion planner in interaction with human co-workers.

Author Contributions

Conceptualization, T.H. and M.M. (Michael Miro); methodology, T.H.; software, T.H. and V.C.; validation, T.H. and V.C.; formal analysis, T.H. and M.M. (Michael Miro); investigation, T.H.; resources, T.H.; data curation, T.H.; writing—original draft preparation, T.H.; writing—review and editing, R.S., M.M. (Michael Miro), V.C., M.M. (Martin Manns), T.B.T. and B.K.; visualization, T.H.; supervision, M.M. (Michael Miro) and B.K.; project administration, T.H.; funding acquisition, B.K. All authors have read and agreed to the published version of the manuscript.

Funding

This research work is funded by the German Research Foundation (DFG) within the research project ‘High-speed motion tracking and coupling for human-robot collaborative assembly tasks’ (grant number 500490184). The authors thank the DFG for promoting and facilitating the research.

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 interests.

Abbreviations

The following abbreviations are used in this manuscript:
CSCartesian Space
DoFDegrees of Freedom
FKForward Kinematic
HRCHuman Robot Collaboration
IKInverse Kinematic
LSLatent Space
NPGNext Point Generator
PFLPower and Force Limiting
SSMSpeed and Separation Monitoring
TCPTool Center Point

References

  1. Matheson, E.; Minto, R.; Zampieri, E.; Faccio, M.; Rosati, G. Human–Robot Collaboration in Manufacturing Applications: A Review. Robotics 2019, 8, 100. [Google Scholar] [CrossRef]
  2. Hashemi-Petroodi, S.; Thevenin, S.; Kovalev, S.; Dolgui, A. Operations management issues in design and control of hybrid human-robot collaborative manufacturing systems: A survey. Annu. Rev. Control 2020, 49, 264–276. [Google Scholar] [CrossRef]
  3. Pereira, M.; Skiba, R.; Cojan, Y.; Vuilleumier, P.; Bègue, I. Preserved Metacognition for Undetected Visuomotor Deviations. J. Neurosci. 2023, 43, 6176–6184. [Google Scholar] [CrossRef]
  4. Saeed, R.; Tuli, T.; Habersang, T.; Miro, M.; Kuhlenkötter, B.; Manns, M. Robot Trajectory Generation Based on Human Motion Behaviour. Robot. Auton. Syst. 2026, 202, 105495. [Google Scholar] [CrossRef]
  5. Ding, P.; Zhang, J.; Zheng, P.; Fei, B.; Xu, Z. Dynamic scenario-enhanced diverse human motion prediction network for proactive human–robot collaboration in customized assembly tasks. J. Intell. Manuf. 2025, 36, 4593–4612. [Google Scholar] [CrossRef]
  6. Miro, M.; Glogowski, P.; Lemmerz, K.; Kuhlenkoetter, B.; Gualtieri, L.; Rauch, E.; Gkournelos, C.; Makris, S.; Plapper, P.; Kumar, A.A. Simulation Technology and Application of Safe Collaborative Operations in Human-Robot Interaction. In Proceedings of the ISR Europe 2022; 54th International Symposium on Robotics, Munich, Germany, 20–21 June 2022; pp. 1–9. [Google Scholar]
  7. Byner, C.; Matthias, B.; Ding, H. Dynamic speed and separation monitoring for collaborative robot applications—Concepts and performance. Robot.-Comput.-Integr. Manuf. 2019, 58, 239–252. [Google Scholar] [CrossRef]
  8. Bobka, P.; Germann, T.; Heyn, J.; Gerbers, R.; Dietrich, F.; Dröder, K. Simulation Platform to Investigate Safe Operation of Human-Robot Collaboration Systems. Procedia CIRP 2016, 44, 187–192. [Google Scholar] [CrossRef]
  9. Glogowski, P.; Böhmer, A.; Hypki, A.; Kuhlenkötter, B. Robot speed adaption in multiple trajectory planning and integration in a simulation tool for human-robot interaction. J. Intell. Robot. Syst. 2021, 102, 25. [Google Scholar] [CrossRef]
  10. Dsouza, D.; Shenoy, S.; Wang, M.; Chowdhury, A. A comprehensive safety architecture for human–robot collaboration in confined workspaces using improved artificial potential field. Robotica 2023, 43, 1373–1393. [Google Scholar] [CrossRef]
  11. Matthias, B.; Reisinger, T. Example Application of ISO/TS 15066 to a Collaborative Assembly Scenario. In Proceedings of the ISR 2016: 47st International Symposium on Robotics, Munich, Germany, 21–22 June 2016; pp. 88–92. [Google Scholar]
  12. Haddadin, S.; Haddadin, S.; Khoury, A.; Rokahr, T.; Parusel, S.; Burgkart, R.; Bicchi, A.; Albu-Schäffer, A. On making robots understand safety: Embedding injury knowledge into control. Int. J. Robot. Res. 2012, 31, 1578–1602. [Google Scholar] [CrossRef]
  13. Haddadin, S.; De Luca, A.; Albu-Schäffer, A. Robot Collisions: A Survey on Detection, Isolation, and Identification. IEEE Trans. Robot. 2017, 33, 1292–1312. [Google Scholar] [CrossRef]
  14. Faulwasser, T.; Findeisen, R. Nonlinear model predictive control for constrained output path following. IEEE Trans. Autom. Control 2016, 61, 1026–1039. [Google Scholar] [CrossRef]
  15. Faulwasser, T.; Weber, T.; Zometa, P.; Findeisen, R. Implementation of Nonlinear Model Predictive Path-Following Control for an Industrial Robot. IEEE Trans. Control Syst. Technol. 2017, 25, 1505–1511. [Google Scholar] [CrossRef]
  16. Villagrossi, E.; Franceschi, P.; Nicola, G.; Pedrocchi, N. Efficient human–robot collaborative manipulation of planar deformable objects. J. Manuf. Syst. 2025, 83, 963–975. [Google Scholar] [CrossRef]
  17. Noohi, E.; Žefran, M.; Patton, J.L. A Model for Human–Human Collaborative Object Manipulation and Its Application to Human–Robot Interaction. IEEE Trans. Robot. 2016, 32, 880–896. [Google Scholar] [CrossRef]
  18. Liu, J.; Yap, H.; Khairuddin, A. Review on Motion Planning of Robotic Manipulator in Dynamic Environments. J. Sens. 2024, 2024, 5969512. [Google Scholar] [CrossRef]
  19. Covic, N.; Lacevic, B.; Osmankovic, D.; Uzunovic, T. Real-Time Sampling-Based Safe Motion Planning for Robotic Manipulators in Dynamic Environments. IEEE Trans. Robot. 2025, 41, 5287–5307. [Google Scholar] [CrossRef]
  20. Ansari, R.; Karayiannidis, Y. Task-Based Role Adaptation for Human-Robot Cooperative Object Handling. IEEE Robot. Autom. Lett. 2021, 6, 3592–3598. [Google Scholar] [CrossRef]
  21. Pupa, A.; Minelli, M.; Secchi, C. A Dynamic Planner for Safe and Predictable Human-Robot Collaboration. IEEE Robot. Autom. Lett. 2024, 9, 507–514. [Google Scholar] [CrossRef]
  22. Chen, P.; Pei, J.; Lu, W.; Li, M. A deep reinforcement learning based method for real-time path planning and dynamic obstacle avoidance. Neurocomputing 2023, 497, 64–75. [Google Scholar] [CrossRef]
  23. Dani, A.; Salehi, I.; Rotithor, G.; Trombetta, D.; Ravichandar, H. Human-in-the-Loop Robot Control for Human-Robot Collaboration: Human Intention Estimation and Safe Trajectory Tracking Control for Collaborative Tasks. IEEE Control Syst. Mag. 2020, 40, 29–56. [Google Scholar] [CrossRef]
  24. Yoshikawa, T. Manipulability of Robotic Mechanisms. Int. J. Robot. Res. 1985, 4, 3–9. [Google Scholar] [CrossRef]
  25. Zaplana, I.; Hadfield, H.; Lasenby, J. Singularities of Serial Robots: Identification and Distance Computation Using Geometric Algebra. Mathematics 2022, 10, 2068. [Google Scholar] [CrossRef]
  26. Shi, X.; Guo, Y.; Chen, X.; Chen, Z.; Yang, Z. Kinematics and Singularity Analysis of a 7-DOF Redundant Manipulator. Sensors 2021, 21, 7257. [Google Scholar] [CrossRef] [PubMed]
  27. Liu, Y.; Guo, C.; Weng, Y. Online Time-Optimal Trajectory Planning for Robotic Manipulators Using Adaptive Elite Genetic Algorithm with Singularity Avoidance. IEEE Access 2019, 7, 146301–146308. [Google Scholar] [CrossRef]
  28. Beck, F.; Vu, M.; Hartl-Nesic, C.; Kugi, A. Singularity Avoidance with Application to Online Trajectory Optimization for Serial Manipulators. IFAC-PapersOnLine 2022, 56, 284–291. [Google Scholar] [CrossRef]
  29. Zhang, Y.; Li, S.; Gui, J.; Luo, X. Velocity-Level Control with Compliance to Acceleration-Level Constraints: A Novel Scheme for Manipulator Redundancy Resolution. IEEE Trans. Ind. Inform. 2018, 14, 921–930. [Google Scholar] [CrossRef]
  30. Woliński, Ł.; Wojtyra, M. An inverse kinematics solution with trajectory scaling for redundant manipulators. Mech. Mach. Theory 2024, 191, 105493. [Google Scholar] [CrossRef]
  31. Flacco, F.; De Luca, A.; Khatib, O. Control of Redundant Robots Under Hard Joint Constraints: Saturation in the Null Space. IEEE Trans. Robot. 2015, 31, 637–654. [Google Scholar] [CrossRef]
  32. Min, J.; Chai, J. Motion graphs++: A compact generative model for semantic motion analysis and synthesis. ACM Trans. Graph. 2012, 31, 153. [Google Scholar] [CrossRef]
  33. Herrmann, E.; Manns, M.; Du, H.; Hosseini, S.; Fischer, K. Accelerating statistical human motion synthesis using space partitioning data structures. Comput. Animat. Virtual Worlds 2017, 28, e1780. [Google Scholar] [CrossRef]
  34. Manns, M.; Fischer, K.; Du, H.; Slusallek, P.; Alexopoulos, K. A new approach to plan manual assembly. Int. J. Comput. Integr. Manuf. 2018, 31, 907–920. [Google Scholar] [CrossRef]
  35. Conte, S.; de Boor, C. Elementary Numerical Analysis; McGraw-Hill: New York, NY, USA, 1972. [Google Scholar] [CrossRef]
  36. KUKA Sunrise. Connectivity FRI 2.4 V1 Manual; KUKA Roboter GmbH: Augsburg, Germany, 2012.
  37. Biagiotti, L.; Melchiorri, C. Trajectory Planning for Automatic Machines and Robots, 1st ed.; Springer: New York, NY, USA, 2009. [Google Scholar] [CrossRef]
  38. Paul, R.P. Robot Manipulators: Mathematics, Programming, and Control, 7th ed.; MIT Press: Cambridge, MA, USA, 1986. [Google Scholar]
  39. Ben-Israel, A.; Greville, T. Generalized Inverses: Theory and Application, 2nd ed.; Springer: New York, NY, USA, 2003. [Google Scholar] [CrossRef]
  40. Kosinski, R. A literature review on reaction time. Clemson Univ. 2008, 10, 337–344. [Google Scholar]
Figure 1. Concept of the Hismot-Controller.
Figure 1. Concept of the Hismot-Controller.
Robotics 15 00113 g001
Figure 2. Next Point Generator for tracking a path with constant velocity.
Figure 2. Next Point Generator for tracking a path with constant velocity.
Robotics 15 00113 g002
Figure 3. Length parameterized reference spline and its changed update.
Figure 3. Length parameterized reference spline and its changed update.
Robotics 15 00113 g003
Figure 4. Next position commands between w j and w j + 1 resp. w j + k + 1 for increasing velocity (a), decreasing velocity (b) and a changed target with first decreasing velocity and after the change nearly constant velocity (c).
Figure 4. Next position commands between w j and w j + 1 resp. w j + k + 1 for increasing velocity (a), decreasing velocity (b) and a changed target with first decreasing velocity and after the change nearly constant velocity (c).
Robotics 15 00113 g004
Figure 5. Visualization of the avoidance strategy in 3-dimensional space.
Figure 5. Visualization of the avoidance strategy in 3-dimensional space.
Robotics 15 00113 g005
Figure 6. Visualization of the singularity avoidance strategy with increasing blending radius b r in (ad) and with the new target in (e).
Figure 6. Visualization of the singularity avoidance strategy with increasing blending radius b r in (ad) and with the new target in (e).
Robotics 15 00113 g006
Figure 7. Overall block diagram of the proposed dynamic motion planner.
Figure 7. Overall block diagram of the proposed dynamic motion planner.
Robotics 15 00113 g007
Figure 8. Concept sketch of the buffer principle.
Figure 8. Concept sketch of the buffer principle.
Robotics 15 00113 g008
Figure 9. System Architecture for controlling a KUKA iiwa with the FRI-Package.
Figure 9. System Architecture for controlling a KUKA iiwa with the FRI-Package.
Robotics 15 00113 g009
Figure 10. Reference position (a) and velocity (b), and the corresponding TCP deviations in position (c) and velocity (d) when tracking the given reference trajectory with the proposed motion planner.
Figure 10. Reference position (a) and velocity (b), and the corresponding TCP deviations in position (c) and velocity (d) when tracking the given reference trajectory with the proposed motion planner.
Robotics 15 00113 g010
Figure 11. Position profile (a) and velocity profile (b) of the dynamically changing reference trajectory, position deviation (c), and velocity deviation (d).
Figure 11. Position profile (a) and velocity profile (b) of the dynamically changing reference trajectory, position deviation (c), and velocity deviation (d).
Robotics 15 00113 g011
Figure 12. Comparison of reference path and actual path when avoiding a singularity.
Figure 12. Comparison of reference path and actual path when avoiding a singularity.
Robotics 15 00113 g012
Figure 13. Position (a) and velocity deviation (b) with capped joint velocity (c) for a linear Cartesian movement.
Figure 13. Position (a) and velocity deviation (b) with capped joint velocity (c) for a linear Cartesian movement.
Robotics 15 00113 g013
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.

Share and Cite

MDPI and ACS Style

Habersang, T.; Miro, M.; Caldas, V.; Saeed, R.; Tuli, T.B.; Manns, M.; Kuhlenkötter, B. A Dynamic Motion Planner for Trajectory Tracking in HRC. Robotics 2026, 15, 113. https://doi.org/10.3390/robotics15060113

AMA Style

Habersang T, Miro M, Caldas V, Saeed R, Tuli TB, Manns M, Kuhlenkötter B. A Dynamic Motion Planner for Trajectory Tracking in HRC. Robotics. 2026; 15(6):113. https://doi.org/10.3390/robotics15060113

Chicago/Turabian Style

Habersang, Timo, Michael Miro, Victor Caldas, Raza Saeed, Tadele Belay Tuli, Martin Manns, and Bernd Kuhlenkötter. 2026. "A Dynamic Motion Planner for Trajectory Tracking in HRC" Robotics 15, no. 6: 113. https://doi.org/10.3390/robotics15060113

APA Style

Habersang, T., Miro, M., Caldas, V., Saeed, R., Tuli, T. B., Manns, M., & Kuhlenkötter, B. (2026). A Dynamic Motion Planner for Trajectory Tracking in HRC. Robotics, 15(6), 113. https://doi.org/10.3390/robotics15060113

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop