Modeling | |
Functions | |
CreateManipulator | Constructs a data structure of type Manipulator. |
SubsPlus | Substitute coherently angles in a system. |
SubsParameters | Specify parameter values in a Manipulator |
UnassignParameters | Release parameters in a Manipulator |
CreateManipulator := proc ( sys ::list({algebraic, algebraic=algebraic, algebraic<algebraic}), cart ::list(name), arti ::list(name) := [op(indets(sys,name) minus {op(vars)} minus map(lhs,{op(spec)}))], passive ::list(name) := [], geompars ::list(name) := [op(indets(sys,name) minus {op(cart)} minus {op(arti)} minus {op(passive)})], spec ::{list,set}(name=algebraic) := [], plotrange ::list(name=range) := [], points ::list(name=list(algebraic)) := [], loops ::list(list(name)) := [], chains ::list(list(name)) := [], actuators ::list({list(name),name}) := [], model ::string := "No name", precision ::integer := 4, { noradical ::truefalse := false } )
Constructs a data structure of type Manipulator.
sys | list of polynomials, polynomial equalities and polynomial inequalities with rational coefficients: the implicit equations and constraints of the considered manipulator |
cart | list of names: the pose variables |
arti (optional) | list of names: the control parameters; default value: the names of sys not in vars |
passive (optional) | list of names: the passive variables; default value: [] |
geompars (optional) | list of names: the geometric parameters; default value: the names of sys not in cart, nor in arti |
spec (optional) | a list of equations of the form name=formula where name is a parameter name and formula a polynom with trigonometric function; the new variables in a formula are handled in the same way as the replaced variable. default value: [] |
points (optional) | list of name=list: the points of the robot with their coordinates; default value: [] |
loops (optional) | list of list of names: the frame loops of the robot default value: [] |
chains (optional) | list of list of names: the frame chains of the robot default value: [] |
actuators (optional) | list of names or list of names : the robot actuators; a list of name is for a leg actuator, a name is for an angle actuator; default value: [] |
model (optional) | string: the name of the model; default value: “No name” |
precision (optional) | an integer: the number of significative digits; default value: 4 |
A data structure of type Manipulator containing the fields:
Equations | a list of polynomials [p1, ..., pk]: the modelling equations |
Constraints | a list of strict inequalities: the constraint inequalities |
PoseVariables | a list of names: the variables defining the pose |
ArticularVariables | a list of names: the control parameters |
PassiveVariables | a list of names: the remaining variables |
GeometricParameters | a list of names: the geometric parameters |
GenericEquations | a list of polynomials: the modelling equations with symbolic geometric parameters |
GenericConstraints | a list of strict inequalities: the constraint inequalities appearing in sys |
Precision | an integer: the number of correct digits |
PoseValues | the pose values substituted in the GenericEquations to get the Equations |
ArticularValues | the articular values substituted in the GenericEquations to get the Equations |
PassiveValues | the passive values substituted in the GenericEquations to get the Equations |
GeometricValues | the geometric values substituted in the GenericEquations to get the Equations |
DefaultPlotRanges | ranges used by default for plotting if provided |
Points | the points coordinate of the robot |
Loops | the frame loops of the robot |
Chains | the frame chain of the robot |
Actuators | the actuators of the robot |
Model | a string: the name of the modelling |
> CreateManipulator ( [x=t,y=t, -1<t, t<1], [x,y], [t], "Dummy" ); Record(Equations = [x - t, y - t], Constraints = [-1 < t, t < 1], Variables = [x, y], ControlParameters = [t], GeometricParameters = [], GenericEquations = [x - t, y - t], GenericConstraints = [-1 < t, t < 1], ParameterValues = [], Model = "Dummy")
SubsPlus := proc ( spec ::seq (name=algebraic), formula ::{algebraic, algebraic<algebraic, list({algebraic,algebraic=algebraic, algebraic<algebraic})}, precision ::integer := 4 )
Substitute coherently angles in a system.
spec | sequence of equalities var=value where var is a name and value a numerical value. |
formula | equation, inequation, polynomial or list of those, with trigonometric and algebraic expressions. |
precision (optional) | integer: the number of digits that must be kept when modifying the values in spec. |
The input formula where the name in spec have been replaced by the corresponding values; the algebraic relations satisfied by cos and sin are still valid with the chosen numerical values.
> SubsPlus(a=3, cos(a)^2+sin(a)^2); 1
SubsParameters := proc ( spec ::seq (name=algebraic), robot ::Manipulator, precision ::integer := 4 )
Specify parameter values in a Manipulator
spec | a sequence of equations of the form name=formula where name is a parameter name and formula a polynom with trigonometric functions |
robot | a Manipulator object |
precision = integer (optional) | the precision, where integer is the number of significative digits; default value: 4. |
Returns A Manipulator object, equivalent to the input Manipulator where some parameter have been specified by a numerical value
> robot := CreateManipulator ( [x=t,y=t, -1<t, t<1], [x,y], [t], "Dummy" ); > SubsParameters (t=0.7, robot); Record(Equations = [x - 7/10, y - 7/10], Constraints = [-1 < 7/10, 7/10 < 1], Variables = [x, y], ControlParameters = [], GeometricParameters = [], GenericEquations = [x - t, y - t], GenericConstraints = [-1 < t, t < 1], ParameterValues = [t = 0.7], Model = "Dummy")
UnassignParameters := proc ( pars ::seq (And(name,Not(Manipulator))), robot ::Manipulator )
Release parameters in a Manipulator
pars | a sequence of equations of the form name=value where name is a parameter name and value its numerical value |
robot | a Manipulator object |
Returns A Manipulator object, equivalent to the input Manipulator where some parameter have been unassigned.
> robot := CreateManipulator ( [x=t,y=t,-1<t,t<1],[x,y],[t],[t=0.7],"Dummy" ); robot := Record(Equations = [x - 7/10, y - 7/10], Constraints = [-1 < 7/10, 7/10 < 1], Variables = [x, y], ControlParameters = [], GeometricParameters = [], GenericEquations = [x - t, y - t], GenericConstraints = [-1 < t, t < 1], ParameterValues = [t = 0.7], Model = "Dummy") > UnassignParameters(t,%); Record(Equations = [x - t, y - t], Constraints = [-1 < t, t < 1], Variables = [x, y], ControlParameters = [t], GeometricParameters = [], GenericEquations = [x - t, y - t], GenericConstraints = [-1 < t, t < 1], ParameterValues = [], Model = "No name")
Constructs a data structure of type Manipulator.
CreateManipulator := proc ( sys ::list({algebraic, algebraic=algebraic, algebraic<algebraic}), cart ::list(name), arti ::list(name) := [op(indets(sys,name) minus {op(vars)} minus map(lhs,{op(spec)}))], passive ::list(name) := [], geompars ::list(name) := [op(indets(sys,name) minus {op(cart)} minus {op(arti)} minus {op(passive)})], spec ::{list,set}(name=algebraic) := [], plotrange ::list(name=range) := [], points ::list(name=list(algebraic)) := [], loops ::list(list(name)) := [], chains ::list(list(name)) := [], actuators ::list({list(name),name}) := [], model ::string := "No name", precision ::integer := 4, { noradical ::truefalse := false } )
Substitute coherently angles in a system.
SubsPlus := proc ( spec ::seq (name=algebraic), formula ::{algebraic, algebraic<algebraic, list({algebraic,algebraic=algebraic, algebraic<algebraic})}, precision ::integer := 4 )
Specify parameter values in a Manipulator
SubsParameters := proc ( spec ::seq (name=algebraic), robot ::Manipulator, precision ::integer := 4 )
Release parameters in a Manipulator
UnassignParameters := proc ( pars ::seq (And(name,Not(Manipulator))), robot ::Manipulator )