PaceRobots.SPM.model
— Functionmodel(p::Vector{BigInterval})
This function models the kinematic equations for a parallel robot, based on a set of input parameters p
, which are represented by a custom type BigInterval
. The function returns a system of equations SYS
containing the kinematic relationships, taking into account rotation matrices and trigonometric expressions.
Arguments
p::Vector{BigInterval}
: A vector of input parameters of typeBigInterval
. This vector includes the angles and offsets that define the robot's motion.
Returns
SYS::Vector
: A vector containing the kinematic equations of the robot.
Details
The function uses trigonometric functions and rotation matrices to calculate the robot's motion, applying homogenization techniques to deal with variables in the system. The kinematic equations involve transformations and constraints of the system based on the angles and motions provided by the input vector p
.
PaceRobots.SPM.specialize_chi
— Functionspecialize_chi(sys::Vector, x::Vector)
This function substitutes specific values into the first three variables of a system of equations sys
. The variables (assumed to be χ
or similar) are replaced by values provided in the vector x
.
Arguments
sys::Vector
: A vector of symbolic expressions (kinematic equations).x::Vector
: A vector containing the specific values to substitute into the first three variables insys
.
Returns
specialized_sys::Vector
: A new system of equations where the first three variables have been substituted with the values inx
.
Details
The function uses deep copying to avoid unintended changes to the original vector x
(there seemed to be an issue with DynamicPolynomias v5). The substitution is done for the first three variables (assumed to be χ
variables) in each equation of the system sys
.
It uses DynamicPolynomials.subs
to perform the substitutions, ensuring that the original system remains intact.
PaceRobots.SPM.specialize_theta
— Functionspecialize_theta(sys::Vector, x::Vector)
This function substitutes specific values into the last three variables of a system of equations sys
. The variables (assumed to be θ
or similar) are replaced by values provided in the vector theta
.
Arguments
sys::Vector
: A vector of symbolic expressions (kinematic equations).theta::Vector
: A vector containing the specific values to substitute into the last three variables insys
.
Returns
specialized_sys::Vector
: A new system of equations where the last three variables have been substituted with the values intheta
.
Details
The function uses deep copying to avoid unintended changes to the original vector theta
(there seemed to be an issue with DynamicPolynomias v5). The substitution is done for the first three variables (assumed to be θ
variables) in each equation of the system sys
.
It uses DynamicPolynomials.subs
to perform the substitutions, ensuring that the original system remains intact.
PaceRobots.SPM.ST1
— FunctionST1(sys::Vector)
This function computes the discriminants for the first three equations in the provided system sys
, with respect to the variables θi.
Arguments
sys::Vector
: A vector of symbolic expressions representing a system of equations of type DynamicPolynomials.
Returns
- A tuple containing the three discriminants and the polynomial ring used for the coefficients.
Details
- The third variable
χ[3]
is set to zero in each of the first three equations ofsys
. - The coefficients of the resulting equations are collected.
- Discriminants are computed for each equation based on the position of the
θ
variables.
PaceRobots.SPM.ST2_angular
— FunctionST2_angular(sys::Vector, theta_init::Vector, sign::Int32, chi_init::Vector,
step_range::Vector, prec_range::Vector, max_nb_loops::Integer,
nb_ang_steps::Int32, work_precision, output_precision;
w1::Vector, w2::Vector, w3::Vector, w4::Vector)
This function attempts to solve a system of equations iteratively by adjusting the variables θ (theta) and χ (chi), using an Inverse Geometric Problem (IGP) solver and Newton's method for further refinement. If the optional paramaters are specified, the function stops iterating if χ goes outside a defined box (w1
, w2
, w3
, w4
).
Arguments
sys::Vector
: A system of polynomial equations represented as a vector of DynamicPolynomials.theta_init::Vector
: Initial guess for the θ values.sign::Int32
: Sign flag used in the IGP solver.chi_init::Vector
: Initial guess for the χ values.step_range::Vector
: Step size range for θ adjustments.prec_range::Vector
: Range of precision values for iterative refinement.max_nb_loops::Integer
: Maximum number of iterations for Newton's method.nb_ang_steps::Int32
: Number of angular steps for each iteration of χ.work_precision
: Precision used during intermediate calculations.output_precision
: Final precision for the solution.
Optional
w1
,w2
,w3
,w4
: Vectors defining the bounding box for χ values.
Returns
- A tuple containing:
plots
: A list of box plot representations showing solutions and precision intervals.kanto_res
: The results of the Kantorovich method for each solution.
Description
- The function starts by initializing θ and χ to their respective initial values. It iteratively adjusts the values of χ based on an angle and step size.
- In each iteration, the function tries to solve for θ using an IGP solver. If successful, the system is evaluated at the newly found θ.
- The system is then solved using Newton's method, and if convergence is reached, the solution is stored.
- If the method fails to converge, step sizes are reduced or precision is increased. If no solution is found, the system resets to the initial values.
- This process continues until the system has been processed over a range of angles.
- The function returns plots showing the Kantorovich balls.