• Aucun résultat trouvé

The SIROPA library: Maple

1.4 Mathematical concepts and tools

1.4.2 The SIROPA library: Maple

Mathematical concepts and tools 33 Weierstrass substitution

Algebraic tools are employed for solving constraint equations which are generally algebraic.

Usually, these equations are in the form of trigonometric entities. The Weierstrass substitution (named after Karl Weierstrass 1815–1897) or the tangent half-angle substitution is an important trigonometric relation for converting a rational function into an ordinary form. The substitution is given by:

t= tanθ 2

(1.11) In Eq. (1.11), θ is any arbitrary angle. This convention is also helpful in simpliyfing the sine,cosineand tangent functions as:

sin(θ) = 2t

1 +t2 , cos(θ) = 1−t2

1 +t2 , tan(θ) = 2t

1−t2 (1.12)

The conventions given in Eq. (1.12) are important for solving algebraic problems using the CAD algorithm as they simplify quickly the polynomials and the computations times are reduced.

9 p l o t r a n g e[ o ] : : l i s t (name=range ) ,

10 p o i n t s[ p ] : : l i s t (name=l i s t ( a l g e b r a i c ) ) ,

11 l o o p s[ p ] : : l i s t ( l i s t (name) ) ,

12 chains[ p ] : : l i s t ( l i s t (name) ) ,

13 a c t u a t o r s[ p ] : : l i s t ({ l i s t (name) ,name}) ,

14 model[ o ] : : s t r i n g := "No name " ,

15 p r e c i s i o n[ o ] : : i n t e g e r := 4 ,

16 {

17 n o r a d i c a l : : t r u e f a l s e := f a l s e

18 }

19 )

Listing 1.1 – The definition of CreateManipulatorfunction in SIROPA [Jha+18]

In Listing 1.1,[c]represents the compulsory inputs or arguments for the function. The parameter sysaccepts the equations governing the manipulator. For a parallel manipulator, these equations are generally the relation between base and the end-effector which gives the IKP. Constraints are also set if necessary for the equations, such as non-zero or non-negative conditions. The parameters cart and artiare the pose variables and the articular variables of the manipulator.

The parameter geomparsaccepts other parameters which are present insysbut are not present incartorarti. The parameterspoints,loopsandchainsdefine the input coordinates that connect with systo create the manipulator geometry and closed-chains.

Figure 1.19 – The various functions of the SIROPA library in Maple [Jha+18]

Mathematical concepts and tools 35 PlotRobot3D

Once the manipulator equations are generated with theCreateManipulatorfunction, the PlotRobot3Dfunction can be employed to visualize a simple 3D model of the robot. Animation can also be done to view various configurations of the robot over a period of time. The definition of thePlotRobot3Dfunction in SIROPA is provided in Listing 1.2. The user can provide some input values of pose variables (resp. articular variables) to visualize and understand the results of IKP (resp. DKP) for the manipulator. For any given inputs, the output values are also displayed to the user along with the determinant values of the Jacobian matrix.

1 PlotRobot3D := proc (

2 robot : : Manipulator ,

3 spec : : seq (name=constant ) ,

4 k : : { i n t e g e r , range , l i s t ( i n t e g e r ) } := . . ,

5 {

6 c o l o r := [ ] ,

7 l e g e n d v a r s := subs (map( s−>l h s ( s )=NULL, [ spec ] ) ,

8 [ op (robot:− A r t i c u l a r V a r i a b l e s ) , op (robot:− PoseVariables ) ,

9 op (robot:− P a s s i v e V a r i a b l e s ) , ’ det ( J ) ’ ] ) ,

10 nolegend : : t r u e f a l s e := f a l s e ,

11 n o c o n s t r a i n t s : : t r u e f a l s e := f a l s e

12 }

13 )

Listing 1.2 – The definition of PlotRobot3Dfunction in SIROPA [Jha+18]

ConstraintEquations

The functionConstraintEquationsis important to create a set of equations with inequal-ities. Normally, the inverse kinematic equations are transformed into constraint equations by setting minimum and maximum limits. For example; if a manipulator has three equations for the IKP, the number of constraint equations can be six with each IKP having a lower limit and an upper limit. This function is useful for tracing the joint limits. The definition of the ConstraintEquations function is provided below in Listing 1.3.

1 ConstraintEquations := proc (robot : : Manipulator ,

2 {

3 c o n s t r a i n t s : : t r u e f a l s e := f a l s e

4 }

5 )

Listing 1.3 – The definition of ConstraintEquations functions in SIROPA [Jha+18]

SerialSingularities, ParallelSingularities & Projection

The functions SerialSingularities and ParallelSingularities as the name indicates are employed to generate the determinant values of the inverse and the direct kinematics matricesB

andA. The generated equations are then employed for CAD algorithm to study the workspaces of the manipulator with respect to the pose variables (resp. articular variables). The function Projectionis employed to project the equations of parallel or serial singularities of the robot on the workspace or the joint space. The definition for the three functions is provided in Listing 1.4.

The parameterrobotcontains the equations that are generated using theCreateManipulator function.

1 s1 := S e r i a l S i n g u l a r i t i e s ( robot : : Manipulator )

2 s2 := P a r a l l e l S i n g u l a r i t i e s ( robot : : Manipulator )

3 s1_cart := P r o j e c t i o n ( s1 , robot:− PoseVariables )

4 s2_cart := P r o j e c t i o n ( s2 , robot:− PoseVariables )

5 s1_art := P r o j e c t i o n ( s1 , robot:− A r t i c u l a r V a r i a b l e s )

6 s2_art := P r o j e c t i o n ( s2 , robot:− A r t i c u l a r V a r i a b l e s )

Listing 1.4 – The definition of SerialSingularities ParallelSingularities and Projection functions in SIROPA [Jha+18]

CellDecompositionPlus

The CellDecompositionPlus is the important function of the SIROPA library that has been exploited in this thesis. This function decomposes the parameter space of a paramet-ric polynomial system into cells in which the original system has a constant number of so-lutions [Jha16]. The function works exactly similar to the CellDecomposition function of RootFinding[Parametric]except with the difference that it handles trigonometric expressions and utilizes the tangent half-angle substitution for faster computations. The CAD algorithm is carried out in Maple with the help of this function. The definition ofCellDecompositionPlus is provided below in Listing 1.5.

1 CellDecompositionPlus := proc (

2 equ : : l i s t ( a l g e b r a i c ) ,

3 ineq : : l i s t ( a l g e b r a i c ) ,

4 vars : : l i s t (name) ,

5 pars : : l i s t (name) := [ op ( i n d e t s ( [equ,ineq] , name)

6 minus {op (vars) }) ] ,

7 {

8 n o f a c t o r : : t r u e f a l s e := f a l s e ,

9 g b f a c t o r : : t r u e f a l s e := f a l s e ,

10 n o r e a l r o o t s t e s t : : t r u e f a l s e := f a l s e

11 }

12 )

Listing 1.5 – The definition ofCellDecompositionPlusfunction in SIROPA [Jha+18]

The parameterrobot accepts only the equations defined inCreateManipulatorfunction.

The parameter ineq handles list of trigonometric expressions or polynomials with inequalities that ensure that the equations are greater than zero. The parameter vars can contain the ar-ticular variables (resp. pose variables) and pars can contain the pose variables (resp. articular

Mathematical concepts and tools 37 variables). For example, for a given manipulator, the parallel singularities or the serial singulari-ties equations can be passed toineqto generate the cells defining the workspaces or joint spaces.

The execution time for theCellDecompositionPlusfunction depends on the complexity of the system as well as the configuration of the computer. The results of CellDecompositionPlus are generated as cells where each cell contains the polynomial/trigonometric entities of the given input parameters. These cells are then traced with the help of PlotCell2D or PlotCell3D depending on the number of output parameters. These plot functions requires the output cells of CellDecompositionPlusfor a specified range of the pose variables or the articular variables.

The SIROPA library also offers many other functions that are useful for algebraic computa-tions. A detailed explanation for the rest of the functions shown in Figure 1.19 that were not discussed and examples of some manipulator architectures can be found in [Jha+18] and [Sir].