1. Introduction
Robotic arms have become essential in various fields due to their precision and flexibility. However, a persistent challenge in robotic motion planning lies in addressing singularities [Reference Nakamura and Hanafusa1, Reference Manavalan and Howard2] – configurations where the Jacobian matrix loses rank, leading to potential velocity fluctuations and control instabilities. Foundational singularity-theoretic and algebraic treatments further clarify these configurations and their geometry [Reference Donelan3, Reference Caro, Semaan, Kanaan and Wenger4]. Maintaining geometric path adherence, that is, the robot’s ability to precisely follow prescribed Cartesian paths, serves as a crucial constraint for high-precision robotic tasks. Near singular configurations, even small joint variations can cause significant end-effector deviations, jeopardizing path accuracy; quantitative “closeness-to-singularity” measures provide early warning signals for such risks [Reference Bu5, Reference Bu6]. As robotic applications expand in advanced manufacturing and medical robotics, developing strategies that effectively navigate singularities while ensuring high-fidelity path tracking remains a critical research imperative.
Over decades, singularity avoidance methods have evolved mainly along two lines: Jacobian matrix optimization and joint velocity adjustment. The first line includes techniques such as the pseudoinverse [Reference Chiaverini and Egeland7, Reference Buss8], damped least squares method [Reference Kirc´anski, Kirc´anski, Lekovic and Vukobratovic9, Reference Wampler10], adaptive damping [Reference Buss and Kim11, Reference Zahedi, Chang and Lee12], and singular value decomposition (SVD)-based approaches [Reference Maciejewski and Klein13–Reference Choi, Park, Kim, Lee, Lee, Yoon and Park15] that maintain full rank Jacobians near singularities; algebraic analyses also support reliable singularity detection across architectures [Reference Caro, Semaan, Kanaan and Wenger4]. Although successful in preserving mathematical stability, these methods often introduce deviations from the intended Cartesian path, reducing task accuracy. The second line focuses on modulating joint velocities to traverse singular regions, including singularity-consistent methods [Reference Nenchev and Uchiyama16, Reference Nenchev, Okawa and Sone17], null-space projection techniques [Reference Nenchev18, Reference Vigoriti, Ruggiero, Lippiello and Villani19], and velocity scaling [Reference Wojtyra and Wolihski20]. Recent work on trajectory optimization [Reference Petrović, Marić, Marković, Kelly and Petrović21, Reference Milenkovic, Wang and Rodriguez22] attempts to minimize path deviations and improve efficiency. In parallel, studies relating workspace structure, redundancy, and singularity loci highlight design–control trade-offs that can be exploited for avoidance [Reference Wang, Wu, Li and Liu31]. Despite these advances, the increasing demand for precise geometric path adherence reveals limitations of existing singularity avoidance methods, especially when path deviations or efficiency losses are unacceptable.
Block diagram of framework.

Complementing singularity handling, techniques for geometric path adherence focus on accurate path representation and control. Path parameterization methods optimize trajectory descriptions to facilitate tracking, including predictive approaches [Reference Bemporad, Tarn and Xi23], dynamic parameterization [Reference Kumon and Adachi24], and time-optimal methods [Reference Pham and Stasse25, Reference Suleiman26], all enhancing robot responsiveness and constraint compliance. On the control side, diverse tracking strategies address path deviation minimization: singularity-consistent tracking [Reference Nenchev and Uchiyama16, Reference Nenchev, Tsumaki and Uchiyama27], coordinate transformation-based contour following [Reference Chen and Peng28], adaptive fuzzy controllers [Reference Khalate, Leena and Ray29, Reference Hu, Chen and Wang30], neural network inverse kinematics [Reference Duka32, Reference Csiszar, Eilers and Verl33], and fractional order fuzzy PID control [Reference Sharma, Rana K.P. and Kumar34, Reference Mohammed, Bendary and Elserafi35]. In addition, metric-based proximity assessment [Reference Bu5, Reference Bu6] and algebraic singularity tools [Reference Caro, Semaan, Kanaan and Wenger4] offer complementary constraints for path planners, while design-time shaping of singularity-free workspaces provides a structural route to avoidance [Reference Demjen, Lovasz, Ceccarelli, Sticlaru, Lupuţi, Oarcea and Silaghi-Perju36].
To address these intertwined challenges, we propose a novel framework integrating singularity modeling, arc-length parameterization, and curvature-based dynamic sampling. As illustrated in Figure 1, our approach consists of two complementary components: (1) a singularity-consistent method that evaluates motion difficulty and adaptively adjusts joint velocities for smooth transitions near singularities and (2) a curvature-adaption method that calculates trajectory curvature, determines adaptive sampling density, and performs arc-length parameterization for refined path resampling. By jointly handling singularities and complex curved trajectories, this dual approach overcomes the limitations of traditional single-focus methods, achieving enhanced motion smoothness and trajectory accuracy across diverse robotic tasks.
The key contributions of our approach are as follows:
• We integrate singularity-consistent theory with arc-length parameterization, enabling accurate modeling of Cartesian paths in joint space and ensuring seamless transitions through singular configurations.
• We propose a curvature-based adaptive sampling method that utilizes path curvature as a weighting factor to adaptively adjust sampling intervals. This approach effectively balances joint velocity smoothness with Cartesian tracking accuracy, particularly in regions of high curvature or near singularities.
This paper is organized as follows: Section 2 presents the proposed methodology, including the singularity-consistency method and the curvature-adaption method (with details on path parameterization, curvature modeling, and adaptive sampling). Section 3 describes the experimental setup and the conducted experiments. Finally, Section 4 concludes the paper, summarizing the findings and outlining future research directions.
2. Methodology
2.1. Singularity-consistent method
For a serial-link manipulator, its motion state is defined by
$n$
joint variables
$\mathbf{q} = (q_1, q_2, \ldots , q_n)$
, which determine the configuration of the manipulator. On the other hand, the pose of the end-effector, including its position and orientation, can be described by
$m$
independent variables
$\mathbf{r} = (r_1, r_2, \ldots , r_m)$
. In most practical cases,
$m = 6$
, as the end-effector pose typically consists of three-dimensional position and three-dimensional orientation, mathematically represented as
$\text{SE}(3) = \mathbb{R}^3 \times \text{SO}(3)$
, the space of Euclidean motions. In certain scenarios, such as when only the position is considered or the motion is constrained to a plane, the dimensionality of
$\mathbf{r}$
can be further reduced, for example,
$\mathbf{r} \in \mathbb{R}^3$
or
$\mathbb{R}^2$
.
Let
$\mathbf{q}\in \mathbb{R}^n$
be joint variables and
$\mathbf{r}\in \mathbb{R}^m$
be task-space variables (position/orientation under a chosen parameterization). The forward kinematics is
where
$\mathbf{r}$
represents the pose of the end-effector (e.g., position and orientation) and
$\mathbf{q}$
represents the joint variables of the manipulator.
When the end-effector follows a predefined trajectory, its pose
$\mathbf{r}$
can also be expressed as a function of the path parameter
$p$
, which typically represents time or a normalized progress variable along the trajectory:
Jacobian matrices are key to describing the mapping between joint velocities and Cartesian end-effector velocities. This relationship can be expressed as:
where
$ J(\mathbf{q})$
is the manipulator Jacobian, defined as:
The Jacobian
$ J(\mathbf{q})$
provides a linear mapping between the joint space velocity
$ \dot {\mathbf{q}}$
and the Cartesian space velocity
$ \dot {\mathbf{r}}$
. This relationship is fundamental in robotic motion control, enabling the computation of the end-effector velocity from joint velocities, and vice versa.
We mark the unit vector tangent of
$ \mathbf{r}(p)$
as:
To describe this relationship, we define the following augmented kinematic function:
where
$ \bar {\mathbf{q}} = [\mathbf{q}^\top , p]^\top$
is an extended parameter vector that includes both the joint variables
$ \mathbf{q}$
and the path parameter
$ p$
. In the ideal case,
$ \mathbf{h}(\bar {\mathbf{q}}) \equiv \mathbf{0}$
, which implies that the end-effector trajectory follows the desired path precisely.
Linearizing at
$(\mathbf{q},p)$
yields
Here,
$ \mathbf{H}(\bar {\mathbf{q}})$
denotes the augmented matrix of the original Jacobian. It integrates the path parameter
$ p$
into the standard Jacobian framework, providing a unified representation for analyzing and controlling the end-effector’s trajectory tracking.
For computational convenience, we express the general solution of Eq. (7) in the following form:
where
$ b$
is an arbitrarily small scalar and
$ \bar {\mathbf{F}}(\bar {\mathbf{q}}) \in \ker \mathbf{H}(\bar {\mathbf{q}}) \subset \mathbb{R}^{n+1}$
is a vector in the null space of the augmented Jacobian matrix
$ \mathbf{H}(\bar {\mathbf{q}})$
.
According to matrix theory, the solution structure depends on the relationship between
$m$
and
$n$
.
Special case:
$m=n$
Here,
${J}\in \mathbb{R}^{n\times n}$
is square. Consider
where the subscript
$\square$
emphasizes that this form applies specifically to the square-Jacobian case (
$m = n$
). Using
${J}\,\operatorname {adj}{J}=\det\!({J})\,\mathbf{I}$
,
thus
$\bar {\mathbf{F}}_{\square }\in \ker \mathbf{H}$
. Define the singularity-consistent first-order step
which automatically satisfies (7). As
$\det {J}\to 0$
, (11) yields
$dp=b\,\det {J}\to 0$
, avoiding blow-ups in
$d\mathbf{q}$
or
$dp$
– the desired “singularity-consistent” behavior.
Properties. If
$\operatorname {rank}{J}=n-1$
, then
$\operatorname {adj}{J}$
has rank
$1$
and
$\det {J}=0$
; (11) reduces to
$dp=0$
with a nonzero
$d\mathbf{q}\in \ker {J}$
. If
$\operatorname {rank}{J}\le n-2$
, then
$\operatorname {adj}{J}=\mathbf{0}$
and a numerical null space (SVD) of
$\mathbf{H}$
is required.
General case:
$m\neq n$
To avoid the square-Jacobian assumption behind
$\det\!({J})$
, define
and construct
Since
$\mathbf{A}\,\operatorname {adj}\mathbf{A}=\det\!(\mathbf{A})\,\mathbf{I}_m$
,
hence
$\bar {\mathbf{F}}\in \ker \mathbf{H}$
and
Consistency with the square case. When
$m=n$
, using
$\operatorname {adj}\!({J}{J}^\top )=\operatorname {adj}\!({J})^\top \operatorname {adj}\!({J})$
together with
${J}^\top \operatorname {adj}\!({J}{J}^\top )=\det\!({J})\,\operatorname {adj}\!({J})$
and
$\det\!({J}{J}^\top )=\det\!({J})^2$
, we obtain
which is colinear with (10) and thus identical as a kernel direction.
Computation and robustness
-
(i) If
$\mathbf{A}$
is nonsingular, useto avoid forming adjugates;
\begin{equation*} \bar {\mathbf{F}}= \begin{bmatrix} \det\!(\mathbf{A})\,{J}^\top \mathbf{A}^{-1}\mathbf{S}\\[2pt] \det\!(\mathbf{A}) \end{bmatrix} \end{equation*}
-
(ii) at generic singularities with
$\operatorname {rank}{J}=m-1$
,
$\operatorname {adj}\mathbf{A}$
has rank
$1$
and
$\det \mathbf{A}=0$
, yielding
$dp=0$
and a nonzero feasible
$d\mathbf{q}$
; -
(iii) at higher-order singularities (
$\operatorname {rank}{J}\le m-2$
),
$\operatorname {adj}\mathbf{A}=\mathbf{0}$
, and one should compute a null vector of
$\mathbf{H}$
via SVD; -
(iv) with a joint space metric/weight
$\mathbf{W}\succ 0$
, take
$\mathbf{A}={J}\mathbf{W}{J}^\top$
and replace (13) accordingly.
Remark. The method only relies on the null-space relation
$\mathbf{H}\,\bar {\mathbf{F}}=\mathbf{0}$
and never requires
$\det\!(\mathbf{H})$
. If a scalar conditioning index is desired, use
$\mathbf{H}\mathbf{H}^\top ={J}{J}^\top +\mathbf{S}\mathbf{S}^\top$
and inspect its singular values or
$\det\!(\mathbf{H}\mathbf{H}^\top )$
.
By analyzing the structure of
$ \bar {\mathbf{F}}(\bar {\mathbf{q}})$
, it becomes clear that
$ \mathbf{F}(\bar {\mathbf{q}})$
combines the joint angle variations and the path parameter
$ p$
through the augmented parameter vector
$ \bar {\mathbf{q}}$
. This coupling enables
$ \mathbf{F}(\bar {\mathbf{q}})$
playing a singularity-consistent role in the solution process. When the manipulator’s joint configuration approaches a Jacobian singularity (i.e.,
$ \det {J}(\mathbf{q}) \to 0$
), the singularity is reflected in the augmented Jacobian matrix
$ \mathbf{H}(\bar {\mathbf{q}})$
. Consequently, the system automatically adjusts the Cartesian sampling along the path parameter
$ p$
, ensuring consistent behavior even in the presence of singularities.
By splitting Eq. (9) into two components, we obtain the following expressions for the joint differential motion and the path parameter differential:
To ensure that the manipulator can traverse through the singular region while respecting the joint’s maximum speed limits, we define the joint velocity adjustment factor
$ b^*$
as the maximum allowable scaling factor for the joint velocities. Based on the current joint configuration and velocity limits,
$ b^*$
is computed as:
where:
-
•
$ dq_{\text{max}}$
represents the maximum allowable joint velocity, determined by the physical constraints of the manipulator. -
•
$ \|\mathbf{F}(\bar {\mathbf{q}})\|$
is the norm of the joint velocity component derived from the mapping
$ \mathbf{F}(\bar {\mathbf{q}})$
, which reflects the influence of both the Jacobian singularity and the path parameter
$ p$
.
The adjustment factor
$ b^*$
ensures that the joint velocities remain within their feasible limits, even as the manipulator approaches a singular configuration. When
$ \|\mathbf{F}(\bar {\mathbf{q}})\|$
becomes large near a singularity,
$ b^*$
is automatically reduced to prevent the joint velocities from exceeding
$ dq_{\text{max}}$
. This mechanism allows the manipulator to pass through the singular region in a controlled and safe manner.
2.2. Curvature-adaption method
2.2.1. Path arc-length parameterization
While curves can be mathematically represented using path parameters, the variation of the cumulative arc length with respect to the path parameter is generally non-uniform. As illustrated in Figure 2, the arc length
$L(t)$
of both Bézier and Lissajous curves is not linearly related to the parameter
$t$
(the red curve deviates significantly from the line
$y=x$
). The cumulative arc length
$L(t)$
is defined as:
where
$\mathbf{C}(t)$
represents the parametric equation of the curve. Due to the integral, uniform variation in
$t$
does not guarantee a uniform increase in
$L(t)$
. Consequently, uniform sampling of the path parameter
$t$
may result in irregular variations of the differential speed, approximated as
$\frac {\Delta L}{\Delta t}$
. As shown in the right subplots of Figure 2, the speed curves demonstrate significant and non-smooth fluctuations, indicating that uniform sampling in the parameter domain does not guarantee uniformity in the arc-length domain.
Path arc length and speed profiles. Top row:
Bézier curve example. Bottom row: Lissajous curve example. Left: The geometric paths (blue solid line) and their control points (red dashed line for the Bézier curve). Middle: The arc-length function
$L(t)$
(red solid line) and the ideal linear relationship
$y=x$
(black dashed line). Right: The corresponding sampled differential speed profile. The results demonstrate that the arc-length function
$L(t)$
deviates from the ideal linear relationship, indicating a non-uniform parameterization with respect to arc length. This non-uniformity is also reflected in the fluctuating speed profiles.

To address the non-uniformity challenge of the curve’s arc length, a natural approach is to introduce the path arc length as the path parameter. This involves reparameterizing the path using the arc length
$s$
as the new parameter. For a path parameterized by
$\sigma$
in joint space, the arc length
$s$
is given by:
where
$\|\mathbf{q}'\|_M = \sqrt {\mathbf{q'}^T M \mathbf{q}'}$
denotes the weighted Euclidean norm of the joint velocity,
$M$
is a metric matrix (assumed to be the identity matrix for simplicity), and
$\mathbf{q}' = \frac {d\mathbf{q}}{d\sigma }$
represents the derivative of the joint coordinates with respect to the original path parameter.
By parameterizing the path with respect to arc length, we have:
This implies that equal increments in
$s$
correspond to equal distances traversed along the curve, regardless of the original parameterization. Consequently, sampling uniformly in
$s$
yields points that are equidistant along the path in joint space. This method, known as arc-length parameterization, effectively transforms a non-uniformly parameterized path into a uniformly parameterized one with respect to arc length, ensuring consistent and predictable motion along the curve. The resulting parameterization
$\mathbf{q}(s)$
provides a more natural and intuitive representation of the path, facilitating tasks such as trajectory planning and control.
It is worth noting that for curves where analytical integration is difficult, a discrete sampling approach combined with numerical integration can be employed to approximate the arc length. Common methods for equidistant sampling include Simpson’s rule, the Trapezoidal rule, and other numerical integration techniques, allowing us to obtain approximately uniformly spaced points with respect to arc length.
From this, we derive:
and consequently:
These equations describe how the arc length, the original parameter, and the joint space coordinates change with respect to each other. They are fundamental to understanding and implementing arc-length parameterization.
2.2.2. Curvature modeling
While arc-length parameterization provides a uniform representation of the geometric path in Cartesian space, another crucial geometric variable must be considered: the path curvature. Although sampling uniformly with respect to arc length ensures equidistant points along the path, neglecting the path’s curvature can lead to subtle deformations in the robot’s motion during trajectory tracking. This is because curvature directly influences the required joint accelerations and velocities. Consequently, ignoring curvature can compromise the robot’s ability to precisely adhere to the intended geometric path, especially in regions with high curvature. Therefore, a comprehensive understanding of the path’s behavior requires considering both arc length and curvature to ensure accurate and compliant motion.
For a given path parameterized by
$\mathbf{q}(\sigma )$
, the curvature
$\kappa$
in joint space can be defined using the second derivative of the path with respect to
$\sigma$
:
where
$\mathbf{q}'$
and
$\mathbf{q}''$
are the first and second derivatives of
$\mathbf{q}$
with respect to
$\sigma$
, respectively, and
$\|\cdot \|_M$
denotes the norm induced by the metric matrix
$M$
. The numerator
$\|\mathbf{q}' \times \mathbf{q}''\|_M$
represents the magnitude of the cross product of the tangent and acceleration vectors, capturing the “twist” of the curve, while the denominator
$\|\mathbf{q}'\|_M^3$
normalizes this value relative to the cube of the tangent vector’s magnitude.
The curvature
$\kappa$
provides a quantitative measure of how sharply the path bends at any point
$\sigma$
. High curvature values indicate regions of sharp turns or singularities, which may lead to large joint accelerations and potentially unstable behavior. Conversely, low curvature values correspond to smoother, more gradual transitions along the path.
To analyze the curvature effectively, it is important to examine its value range (curvature value domain) over the entire path. Let
$\kappa _{\text{min}}$
and
$\kappa _{\text{max}}$
denote the minimum and maximum curvature values along the path, respectively. The range
$[\kappa _{\text{min}}, \kappa _{\text{max}}]$
provides critical information about the path’s geometric complexity and the potential for dynamic instabilities. For practical implementations, it is often desirable to normalize the curvature to a unitless quantity for easier interpretation and comparison across different paths.
A curvature normalization function
$\kappa _{\text{norm}}$
can be defined as follows:
where
$\kappa _{\text{norm}}(\sigma ) \in [0, 1]$
. This normalization maps the curvature values to a standardized range, enabling consistent evaluation and visualization of the path’s geometric properties. Regions with
$\kappa _{\text{norm}} \approx 0$
correspond to relatively straight segments, while
$\kappa _{\text{norm}} \approx 1$
indicates areas with the sharpest bends.
Furthermore, the normalized curvature can be incorporated into path planning and motion control algorithms to adaptively adjust speed or smooth transitions in regions of high curvature, thereby mitigating the risk of instability. By coupling curvature analysis with arc-length parameterization, a comprehensive understanding of the geometric and dynamic characteristics of the path can be achieved, leading to more robust and efficient motion planning strategies.
Limitations of arc-length uniform sampling strategy. The figure illustrates potential issues arising from solely relying on arc length for sampling. Top : A planned path with uniform arc-length sampling. Middle: In regions with gentle curvature (circled area), the mapping between joint space and Cartesian space can lead to joint configurations near singularities, causing large joint movements for small end-effector displacements. Bottom: In areas of high curvature (circled area), uniform arc-length sampling may result in under-sampling, potentially missing crucial details of the path and compromising tracking accuracy.

2.2.3. Weights adaptive sampling
As illustrated in Figure 3, path curvature significantly impacts trajectory tracking, particularly concerning the robot’s ability to accurately follow the planned path. Neglecting curvature can lead to issues such as large joint movements near singularities in regions of low curvature, or under-sampling in areas of high curvature, ultimately compromising the robot’s ability to adhere to the intended trajectory. To address these challenges and improve path fidelity, we introduce a curvature-adaptive weighted sampling algorithm. This algorithm is designed to ensure more accurate path adherence by dynamically adjusting the sampling density based on the curvature.
First, given a path represented as a sequence of discrete points
$\mathbf{p}_i \in \mathbb{R}^2$
, the curvature at each point is computed using three consecutive points. Let
$\mathbf{p}_{\text{prev}}$
,
$\mathbf{p}_{\text{curr}}$
, and
$\mathbf{p}_{\text{next}}$
denote the previous, current, and next points, respectively. The vectors between these points are defined as:
The curvature
$\kappa$
is then calculated as:
\begin{align} \kappa = \begin{cases} \frac {2 \cdot \| \mathbf{v}_1 \times \mathbf{v}_2 \|}{\| \mathbf{v}_1 \| \cdot \| \mathbf{v}_2 \| \cdot \| \mathbf{v}_1 + \mathbf{v}_2 \|}, & \text{if } \| \mathbf{v}_1 \| \neq 0 \text{ and } \| \mathbf{v}_2 \| \neq 0, \\ 0, & \text{otherwise}. \end{cases} \end{align}
Here,
$\|\cdot \|$
denotes the Euclidean norm, and
$\times$
represents the cross product. If either
$\mathbf{v}_1$
or
$\mathbf{v}_2$
has zero magnitude, the curvature is set to zero.
To ensure that curvature values are within a standard range, they are normalized as follows:
\begin{equation} \kappa _{\text{norm}} = \begin{cases} \frac {\kappa }{\max\!(\kappa )}, & \text{if } \max\!(\kappa ) \neq 0, \\ 0, & \text{if } \max\!(\kappa ) = 0. \end{cases} \end{equation}
Here,
$\max\!(\kappa )$
represents the maximum curvature value across all points.
Then we design the weight function to integrate a base arc-length weight factor
$\alpha$
with a curvature weight factor
$\beta$
, effectively combining these two crucial aspects.
Here,
$\alpha$
governs the baseline density along arc length (favoring more uniform spacing), whereas
$\beta$
increases sampling density in higher-curvature regions. Without loss of generality, we set
$\alpha ,\beta \ge 0$
and
$\alpha +\beta =1$
(the subsequent normalization makes only the relative balance matter). In the subsequent experiments, we adopt
$\boldsymbol{\alpha }=0.6$
and
$\boldsymbol{\beta }=0.4$
as a balanced default. In practical engineering applications, the parameters can be adjusted according to the specific task requirements and trajectory characteristics. For relatively flat trajectories where a smoother and more optimal velocity profile is desired,
$\alpha$
can be tuned within [0.6, 0.8]; for tasks demanding high trajectory-following accuracy, such as precision machining or robotic path tracking in high-curvature segments,
$\beta$
can be tuned within [0.4, 0.6]. Nearby choices lead to similar qualitative behavior.
The cumulative weight
$W(s)$
along the path is computed as the integral of the weight function with respect to the arc length
$s$
:
The cumulative weight is then normalized to the range
$[0, 1]$
:
To perform sampling based on the computed weights, we define a set of target weights uniformly distributed in
$[0, 1]$
:
where
$N$
is the number of desired sampling points. For each target weight, the closest cumulative weight is identified, and the corresponding path point is selected.
The following pseudocode summarizes the entire process:
Curvature – Based Weight Adaptive Sampling

To evaluate how well an executed path conforms to the planned trajectory, we employ the Fréchet distance as a metric for assessing their similarity. This metric provides the measure of adherence between the two paths. When the paths are represented as discrete sequences of points, the discrete Fréchet distance is commonly used. Let
$P = \{p_1, p_2, \ldots , p_m\}$
and
$Q = \{q_1, q_2, \ldots , q_n\}$
denote two discrete curves in
$\mathbb{R}^d$
, representing the planned and executed paths, respectively. The discrete Fréchet distance is defined as:
where
$\pi$
represents all possible alignments (or couplings) of the two curves and
$\|p_i - q_j\|$
is the Euclidean distance between points
$p_i \in P$
and
$q_j \in Q$
. An alignment
$\pi$
is a sequence of index pairs
$(i, j)$
satisfying the following conditions:
1.
$(1, 1) \in \pi$
and
$(m, n) \in \pi$
(the alignment starts at the first points and ends at the last points of the curves).
2. The alignment is monotonic; that is, if
$(i, j) \in \pi$
, then
$(i+1, j)$
,
$(i, j+1)$
, or
$(i+1, j+1)$
must also be in
$\pi$
.
The discrete Fréchet distance can be computed efficiently using a dynamic programming approach. Let
$C[i, j]$
represent the discrete Fréchet distance between the sub-curves
$\{p_1, \ldots , p_i\}$
and
$\{q_1, \ldots , q_j\}$
. The recursive formula for
$C[i, j]$
is given by:
\begin{equation} \begin{aligned} C[i, j] = &\ \max \Big ( \|p_i - q_j\|, \\ &\ \min \big ( C[i-1, j], \, C[i, j-1], \, C[i-1, j-1] \big ) \Big ) \end{aligned} \end{equation}
with the following base cases:
The final discrete Fréchet distance is given by:
The following pseudocode outlines the dynamic programming algorithm for computing the discrete Fréchet distance.
Compute Discrete Fréchet Distance

The time complexity of this algorithm is
$O(m \cdot n)$
, where
$m$
and
$n$
are the number of points in the curves
$P$
and
$Q$
, respectively. This makes it efficient for practical applications involving discrete curves.
3. Experiments
3.1. Singularity consistent motion
We conducted validation experiments on a six-degree-of-freedom (6-DOF) serial manipulator jointly developed by our laboratory and an industrial manufacturer, whose kinematic layout follows the well-known PUMA-type architecture (shoulder–elbow–wrist with a spherical 3-axis wrist). The mechanical configuration is shown in Figure 4, and its Denavit–Hartenberg (DH) parameters are summarized in Table I. The control loop operates at a fixed frequency, and all planning and evaluation rely solely on the DH model and these bounds, independent of any vendor-specific features.
Illustration of the robot manipulator and its corresponding DH coordinate system. (a) depicts the physical robot used in this study. (b) shows the abstract representation of the robot’s kinematic structure using DH parameters.

Denavit–Hartenberg (DH) parameters of the robotic manipulator (in mm).

We have designed a linear motion trajectory for the robotic arm, defined by a starting point
$ p_1$
and an endpoint
$ p_2$
in the Cartesian space:
\begin{align*} p_1&\,:\, \{465.0000, 340.0000, -10.0000, -0.6283, 0, 0\}, \\[10pt] p_2&\,:\, \{491.1970, 354.7178, 29.6084, 1.1903, -0.8956, 0.0806\}. \end{align*}
Along this trajectory, the path passes through a critical intermediate point, which corresponds to a singular configuration of the robotic arm. This singularity is characterized by the joint angles
$ \theta$
and the Cartesian coordinates
$ p_s$
:
\begin{align*} \theta &\,:\, \{\pi /5, \pi /3, 0, \pi /3, \pi /2, \pi /6\}, \\[10pt] p_s&\,:\, \{478.0985, 347.3589, 9.8042, 0.2810, -0.4478, 0.0403\}. \end{align*}
The Jacobian matrix at the specified singularity is as follows:
\begin{equation*} J = \begin{bmatrix} -295.48 & -435.13 & 435.13 & 0 & 152.37 & 0 \\[5pt] 511.79 & -251.22 & 251.22 & 0 & -87.97 & 0 \\[5pt] 0 & -374.98 & 35.00 & 0 & 0 & 0 \\[5pt] 0.43 & -0.50 & 0.50 & 0 & -0.50 & 0\\[5pt] 0.25 & 0.87 & -0.87 & 0 & -0.87 & 0\\[5pt] 0.87 & 0.00 & 0.00 & -1 & 0.00 & 1 \end{bmatrix} \end{equation*}
Near a singular configuration, the determinant of the Jacobian matrix approaches zero, indicating a loss of controllability. This singularity, specifically a wrist singularity, occurs when the fifth joint reaches 90 degrees. At this point, the manipulator’s ability to exert forces or produce motion in certain directions is significantly reduced. Identifying such singularities is crucial for optimizing robot design and control.
At this specific point, the unit vector representing the design path parameter
$p$
is given by
$ S(p) = [0.7623, 0.0683, 1.5731, -0.7115, -0.8756, -0.8166]$
. This vector defines the desired trajectory in the operational space. By integrating this parameter into the singularity-consistent framework, we can construct the augmented matrix as follows:
\begin{equation*} \begin{aligned} H &= \begin{bmatrix} J & -S(p) \end{bmatrix} \\[5pt] &= \begin{bmatrix} -295.48 & -435.13 & 435.13 & 0 & 152.37 & 0 & -0.76 \\[5pt] 511.79 & -251.22 & 251.22 & 0 & -87.97 & 0 & -0.07 \\[5pt] 0 & -374.98 & 35.00 & 0 & 0 & 0 & -1.57 \\[5pt] 0.43 & -0.50 & 0.50 & 0 & -0.50 & 0 & 0.71 \\[5pt] 0.25 & 0.87 & -0.87 & 0 & -0.87 & 0 & 0.88 \\[5pt] 0.87 & 0.00 & 0.00 & -1 & 0.00 & 1 & 0.82 \end{bmatrix} \end{aligned} \end{equation*}
The introduction of the path vector ensures that the determinant of the augmented matrix
$H$
remains nonzero. Then, based on Eq. (15) and considering joint velocity limits, a velocity scaling factor
$b$
is calculated. This factor effectively suppresses excessive joint velocities, enabling the manipulator to traverse the singularity smoothly without abrupt motion.
To further highlight the effectiveness of the proposed method, we additionally implement a conventional kinematic approach under identical conditions, without the singularity-aware path vector and velocity scaling. As illustrated in Figure 5, the traditional method induces noticeable spikes in joint velocities when approaching the singularity, leading to unstable motion. In contrast, Figure 6 shows that our method maintains bounded velocities and smooth transitions through the singular configuration. This comparative analysis underscores the robustness and superiority of the proposed strategy.
Joint motion curves on the given singular path using the traditional kinematic method: (a) shows the joint position curves, and (b) shows the joint velocity curves.

Joint motion curves on the given singular path using the proposed method: (a) shows the joint position curves, and (b) shows the joint velocity curves.

3.2. Path curvature adaptive sampling
In this study, we designed and utilized a Bézier curve described by the following parametric equation:
\begin{align} B(t) = & \, (1-t)^4 P_0 + 4(1-t)^3 t P_1 \notag \\ & + 6(1-t)^2 t^2 P_2 + 4(1-t) t^3 P_3 \notag \\ & + t^4 P_4, \end{align}
where the curve is defined by five control points, including a start point
$ P_0$
, an end point
$ P_4$
, and three intermediate control points
$ P_1$
,
$ P_2$
, and
$ P_3$
. The specific values of these control points are as follows:
-
•
$ P_0 = [0, 0]$
(Start point), -
•
$ P_1 = [2.5, 1.5]$
-
•
$ P_2 = [0.5, 0]$
-
•
$ P_3 = [1.2, -0.2]$
-
•
$ P_4 = [2, 0]$
(End point).
This curve above is a fourth-degree (quartic) Bézier curve. Its parametric equation provides a smooth and flexible path representation, with the intermediate control points
$ P_1$
,
$ P_2$
, and
$ P_3$
shaping the geometry and curvature. The parameter
$ t$
varies continuously within the interval
$ [0, 1]$
, where
$ t = 0$
corresponds to the start point
$ P_0$
and
$ t = 1$
corresponds to the end point
$ P_4$
. We use a Bézier curve because our method relies on arc-length–based smooth sampling over diverse curvature profiles; by adjusting control-point locations (and degree), one parametric curve yields rich – even non-monotonic – curvature while keeping path smoothness for stable derivatives and arc-length evaluation. Compared with more elaborate spline constructions, Bézier offers a simpler equation setup that still spans the required curvature regimes and is widely adopted in robotic/CNC trajectory planning, highlighting its practical engineering relevance.
The results of our experiments are depicted in Figure 7, which provides a comparative analysis of various sampling techniques.
Comparison of sampling methods. (Left) Uniform parameter sampling. (Center) Arc-length reparameterization uniform sampling. (Right) Adaptive sampling with curvature weighting.

Figure 7 illustrates the performance of three distinct sampling methods, evaluated using both the original and doubled path Fréchet distances. The original sampling path is generated by each method, and then the doubled sampling path is created by adding intermediate points to the original sampling path. The Fréchet distance between the original curve and the original sampling path reflects the initial approximation quality. The doubled path Fréchet distance, calculated between the original curve and the doubled sampling path, is used to further assess the geometric adherence of the original sampling path to the original curve. By comparing these two Fréchet distances, we can evaluate how well each sampling method captures the geometric essence of the original curve and how sensitive the approximation is to increased sampling density on the sampled path.
-
1. Uniform Parameter Sampling: As depicted in Figure 7 (left), this method maintains the general shape of the original curve but leads to significant variations in arc length between consecutive sample points. The original Fréchet distance (original curve to original sampling path) is 0.4296, and the doubled path Fréchet distance (original curve to doubled sampling path) is 0.2226.
-
2. Arc-Length Reparameterization Uniform Sampling: Figure 7 (center) demonstrates this technique, which achieves relatively uniform segment lengths. However, it introduces noticeable geometric distortions, especially in regions with high curvature. The original Fréchet distance is 0.1530, and the doubled path Fréchet distance is 0.0970.
-
3. Adaptive Sampling with Curvature Weighting (Non-uniform Sampling): As illustrated in Figure 7 (right), this approach effectively balances shape fidelity and sampling density by allocating more sample points to high-curvature regions. The original Fréchet distance is 0.1499, and the doubled path Fréchet distance is 0.0682.
Analysis of the Fréchet distances, both original and doubled, provides a deeper understanding of the three sampling methods’ performance. While a smaller original Fréchet distance indicates a better initial approximation of the original curve, the doubled path distance serves as a further validation of geometric adherence. The substantial reduction observed in uniform parameter sampling’s doubled path distance highlights its initial limitations in capturing finer details, despite its simplicity. Arc-length reparameterization shows a better initial approximation, but the moderate reduction in its doubled path distance reveals limitations due to induced distortions. The weight adaptive sampling method consistently outperforms the others, exhibiting the lowest original and doubled path distances. This demonstrates its superior ability to accurately capture the original curve’s geometry, a fact further reinforced by the doubled path analysis. The experiment underscores the importance of selecting a sampling method tailored to the specific application and desired accuracy, with weight adaptive sampling demonstrating the most robust performance in this case.
3.3. Physical verification
To validate the effectiveness of the proposed algorithm, we conducted physical experiments using a 6-DOF robotic manipulator (see Figure 8). The robot arm was securely mounted on a fixed base, with a fluorescent pen attached to its end-effector to serve as a writing instrument. A whiteboard was placed in front of the manipulator as the writing surface. Multiple trajectory patterns were designed to evaluate the robot’s real-world motion tracking capabilities, including:
Experimental platform of robot.

-
1. Combinations of linear and circular arc trajectories, to verify the smoothness and stability of basic path following.
-
2. Complex “2025” digit trajectories, to assess the accuracy and adaptability of the manipulator when executing intricate paths.
Across trials, the manipulator executes the planned paths with stable motion, and the traced shapes closely match the references (Figures 9 and 10), indicating promising real-world feasibility. To complement qualitative observations, we report two standard errors between the measured and reference end-effector trajectories. Let
$\mathbf{p}_t \in \mathbb{R}^3$
and
$\mathbf{p}^{\ast }_t$
denote the measured and reference positions at synchronized timestamps
$t=1,\ldots ,T$
. The positional RMSE quantifies overall spatial accuracy:
\begin{equation*} \mathrm{RMSE}_{\text{pos}}=\sqrt {\frac {1}{T}\sum _{t=1}^{T}\left \|\mathbf{p}_t-\mathbf{p}^{\ast }_t\right \|_2^{2}}\;\;[\mathrm{mm}]. \end{equation*}
To capture dynamic tracking fidelity, we compute velocities by differentiating lightly smoothed positions (e.g., Savitzky–Golay) to obtain
$\dot {\mathbf{p}}_t$
and
$\dot {\mathbf{p}}^{\ast }_t$
. The velocity RMSE is then
\begin{equation*} \mathrm{RMSE}_{\text{vel}}=\sqrt {\frac {1}{T}\sum _{t=1}^{T}\left \|\dot {\mathbf{p}}_t-\dot {\mathbf{p}}^{\ast }_t\right \|_2^{2}}\;\;[\mathrm{mm/s}]. \end{equation*}
All metrics are summarized as mean
$\pm$
standard deviation over
$N$
repetitions per trajectory after timestamp alignment. The quantitative results in Table II further confirm these observations. For the line–arc trajectory, the mean position and velocity RMSEs of 1.368 × 10−
6 mm and 5.26 × 10−
3 mm/s demonstrate excellent tracking performance for smooth trajectories. For the more challenging “2025” digits, the errors increase to 3.514 × 10−
3 mm and 0.197 mm/s, yet remain small relative to the overall path length and speed, demonstrating that the proposed algorithm maintains high accuracy even for intricate trajectories. The low standard deviations across repetitions suggest good repeatability of the physical experiments.
Tracking errors (mean
$\pm$
SD over
$N$
trials). Lower is better.

Sequence of robot trajectory execution frames for the simple trajectory combination.

Sequence of robot trajectory execution frames for the “2025” digit trajectory.

4. Conclusion
The study proposes a novel integrated framework for robotic arm path planning that addresses challenges of smooth motion control and precise geometric path tracking near singularities. The framework combines singularity-consistent kinematic representations for reconstructing motion patterns, arc-length reparameterization of Cartesian paths, and a curvature-weighted adaptive sampling strategy to dynamically adjust sampling intervals. This approach effectively balances joint velocity smoothness and geometric tracking accuracy.
Experimental validation compared three sampling methods – uniform parameter sampling, arc-length reparameterization, and the proposed weight adaptive sampling – using original and doubled Fréchet distances to quantitatively evaluate geometric adherence. Results show that the weight adaptive sampling consistently outperforms other methods by achieving the lowest Fréchet distances, indicating superior capability in capturing complex path geometries, especially near singular regions and high-curvature segments. Additionally, the singularity-consistent method demonstrated notably smoother transitions through singular configurations, mitigating abrupt joint motion changes and enhancing overall motion continuity.
Despite these significant improvements, several limitations remain. The computational complexity of curvature-weighted sampling can be substantial for long trajectories due to increased sample density, suggesting a need for optimization or more efficient curvature estimation techniques. Moreover, the current framework does not explicitly integrate obstacle avoidance, which is critical for applying the method in dynamic, cluttered environments. Robustness to external disturbances – such as unexpected forces, impacts, or payload changes – also requires further investigation and enhancement.
In conclusion, this study validates that integrating singularity-consistent motion control, curvature-adaptive sampling, and arc-length parameterization offers a robust and practical solution for robotic arm trajectory planning. The proposed framework significantly improves joint velocity continuity and geometric path adherence, ensuring smooth singularity transitions and precise tracking of complex Cartesian paths. Future work will focus on optimizing real-time computational performance, incorporating dynamic obstacle avoidance, and enhancing resilience to external disturbances, aiming to develop a more versatile and robust control strategy for robotic manipulators operating near singularities.
Author contributions
Xianyou Zhong conceived and designed the study. Xianyou Zhong and Mengjiao Shen developed the algorithms. Xianyou Zhong, Mengjiao Shen, and Xiao Lin collected and curated the data. Xianyou Zhong wrote the original draft. Chengju Liu and Qijun Chen provided resource support and writing guidance.
Financial support
This paper is supported by the National Natural Science Foundation of China (No. 62073245).
Competing interests
None.
Ethical approval
None.









