📄 geometry-doc.sgml
字号:
<para>A 3-by-3 matrix in 3D, and a 2-by-2 matrix in 2D, whose columns arethe coordinates of the <link linkend="vector">unitVector</link>s alongthe directions of a <link linkend="frame">Frame</link>, expressed inthe “world frame”. </para> </listitem> </varlistentry> <varlistentry> <term> <anchor id="euler-angles"> <parameter>EulerAngles</parameter> </term> <listitem> <para>EulerAngles are only relevant in 3D. There, they represent a totalrotation as a sequence of three rotations about<emphasis role="strong">“moving axes”</emphasis>.That is, a rotation about one axis, say “X”, is executed;this rotation moves the “Y” and “X” axes ofthe “world frame”, so the next rotation is performedabout one of these new “Y” or “Z” axes.Hence, there are <emphasis role="strong">twelve</emphasis> possiblesets of Euler angles: XYX, XYZ, XZX, XZY, YZX, YZX, YXY, YXZ, ZYX,ZXY, ZXZ, ZYZ. </para> <para>In the case that the first or second rotations move the subsequentrotation axis close to one of the previous rotation axes, the totalrotation is represented by components about two almost parallel axes,and this is<emphasis role="strong">numerically badly conditioned</emphasis>. Theconditioning is even absolutely bad (<emphasis>i.e.</emphasis> a <emphasis role="strong">singularity</emphasis> occurs) if two axescoincide. </para> </listitem> </varlistentry> <varlistentry> <term><parameter>RollPitchYaw</parameter></term> <listitem> <para>Rotations about <emphasis role="strong">fixed</emphasis> axes, in thesequence “X”, “Y” and “Z”. </para> <para>In principle, there are also twelve possible rotations about fixedaxes, but only <parameter>RollPitchYaw</parameter> is commonly used.It is very well conditioned numerically as long as the rotation anglesare “small”, <emphasis>i.e.</emphasis> much less than 90degrees, because in that case two subsequent rotation directions lineup. </para> </listitem> </varlistentry> <varlistentry> <term> <anchor id="equivalent-angle-axis"> <parameter>angleAxis</parameter> </term> <listitem> <para>The rotation is represented by representing the axis of the rotation(<emphasis>i.e.</emphasis> a directed<link linkend="line">Line</link>) and the angle (one scalar). </para> </listitem> </varlistentry> <varlistentry> <term> <anchor id="quaternion"> <parameter>quaternion</parameter> </term> <listitem> <para>A four-parameter representation, which is the smallest one thatdoesn't have representation singularities. Its“disadvantage” is that it is <emphasis>doublecovering</emphasis>: each rotation has two different coordinates. </para> </listitem> </varlistentry> <varlistentry> <term> <anchor id="rotation-matrix-multiplication"> <parameter>multiplication</parameter> </term> <listitem> <para>Composition of rotations corresponds to multiplication of two rotationmatrices. For Euler angles, composition is a bit more involved, andmultiplication or addition of the numerical values has no meaning. </para> </listitem> </varlistentry></variablelist></para></section><section id="displacement"><title>Displacement</title><para>Consider the same rigid body in two different configurations, but, incontrast to the <link linkend="rotation">Rotation</link> case, nopoint connected to the bodymust remain in the same position in space. One can prove that thereexists a <link linkend="line">Line</link>such that the body can be moved from its first configuration to itssecond configuration, by a <emphasis role="strong">rotationabout that line, and a translation along that line</emphasis>.Hence, this displacement can be <emphasis>represented</emphasis> by a<link linkend="screw">Screw</link>.</para><para>A Displacement can be given the same active and a passive meaningsas for a <link linkend="rotation">Rotation</link>.So, the following properties are required to define a Displacement:</para><variablelist><title>Symbolic property</title> <varlistentry> <term><parameter>active</parameter>, <parameter>passive</parameter></term> <listitem> <para>Only in the case of a <parameter>passive</parameter> Displacement, thegeneric <link linkend="symbolic-class">symbolic information</link>about the <link linkend="geometric-port">geometric Port</link> tothe reference <link linkend="frame">frame</link> is relevant. </para> </listitem> </varlistentry></variablelist><variablelist><title>Physical properties</title> <varlistentry> <term><parameter>inversion</parameter></term> <listitem> <para>The inversion of a given Displacement is another Displacement. Thescrew axis is the same, the rotation angle about the line anddisplacement along the line are the inverse of the original values.Or, equivalently, the Screw is reversed. </para> </listitem> </varlistentry> <varlistentry> <term> <anchor id="displacement-composition"> <parameter>composition</parameter> </term> <listitem> <para>The composition of two Displacements is another Displacement, andagain it is a<emphasis role="strong">multiplicative</emphasis> operation, and <emphasis role="strong">not additive</emphasis>. </para> </listitem> </varlistentry></variablelist><para>Many different<emphasis role="strong">coordinate respresentations</emphasis> existfor Displacements: one combines the different representations of a<link linkend="rotation">Rotation</link> with that of a <link linkend="point">Point</link>. The <link linkend="htmatrix">Homogeneous Transformation Matrix</link>representation has a unique place, because it faithfully representsthe multiplicative property of Displacement composition,<emphasis>and</emphasis> the representation has no numericalsingularities.</para></section></section> <!-- geometric-primitives --><section id="geometric-database"><title>Geometric database and engine</title><para>Complex and dynamic applications need more than just thesymbolical and numerical information contained in the geometricclasses of the previous sections:<itemizedlist><listitem><para><emphasis role="strong">Topology.</emphasis> The topologicalinformation of the geometric objects involved in an applicationdescribes how the objects are<emphasis role="strong">interconnected</emphasis>. Thisinterconnection information is, in general, a<emphasis>graph</emphasis>, but most real-world constructions havemore specific structures: serial, parallel, tree-like, etc.</para><para>Every interconnection information implies a set of <emphasis role="strong">constraints</emphasis> between the coordinatesof the objects involved in the interconnection. A constraint cansometimes be a source of more complex calculations (because one has totake into account the influence of the constraints when moving anobject), but sometimes it also allows for more efficient calculations(<emphasis>e.g.</emphasis> most robot structures have efficientroutines to calculate their forward and/or inverse kinematics).</para><para>The topological structure of one single robot or animated figure issometimes called a <emphasis role="strong">skeleton</emphasis> or<emphasis role="strong">armature</emphasis>. The“connection” of all objects to the“(fixed) world” is called the<emphasis role="strong">scene (graph)</emphasis>.In graphical user interfaces, properties of the objects in thescene can be browsed or changed via a graph-like interface, in whicheach node contains the information of one geometric primitive in thescene.</para></listitem><listitem><para><emphasis role="strong">Relative feature relationships.</emphasis>The topogical structure is used to keep track of the coordinates ofall geometric primitives, whenever one or more objects are moved in thescene. Users of an application are typically interested in knowingthe relative position and/or motion of two or more system<emphasis>features</emphasis>, <emphasis>i.e.</emphasis> particularparts of the geometric primitives that are relevant to the currentlyexecuted task.</para><para>The geometric database should also allow<emphasis role="strong">scripting</emphasis> and<emphasis role="strong">programming</emphasis>,<emphasis>i.e.</emphasis> user-defined functions that calculateon-line the feature relationships that users are interested in. Forexample, a function to find the closest points on two object surfaces;or a function to calculate the distance between points on theend-effector of two different robots.</para><para>The combination of the <emphasis>geometric data</emphasis>(topological and numerical), the<emphasis>scripting functions</emphasis> defined on tha data, and thecorresponding (graphical) user interface, is called a <emphasis role="strong">geometric engine</emphasis>.</para></listitem><listitem><para><emphasis role="strong">Non-geometric properties.</emphasis>The geometric database is important to calculate the kinematicinformation in the system, but often an application also needs other information: <itemizedlist> <listitem> <para> <emphasis role="strong">Visualisation</emphasis>: What isthe shape of each object? Its texture? Its color? All this“flesh” around the skeleton is to be stored independently.Applying the “flesh” is sometimes called<emphasis role="strong">rigging</emphasis>. </para> </listitem> <listitem> <para> <emphasis role="strong">Input/Output</emphasis>: What processprovides the data to move an object or a skeleton? What processcollects the latest information on the object (for on-line or off-line“reporting” and “monitoring”)? </para> </listitem> </itemizedlist></para></listitem></itemizedlist>The connections between all the different kinds of object informationdescribed above can be implemented with the<ulink url="decoupling.html#INTER-CONNECTION-DECOUPLING">Object-Port-Connector</ulink>software pattern, in order to provide maximal decoupling. Thispattern leads naturally to a <emphasis role="strong">graph</emphasis>data structure for the geometric database: <itemizedlist><listitem><para>Each geometric primitive is a <emphasis role="strong">node</emphasis>in the graph.</para></listitem><listitem><para>The graph's <emphasis role="strong">edges</emphasis> represent topological connectivity.</para></listitem><listitem><para>Each node has its own physical and numerical<emphasis role="strong">properties</emphasis>.</para></listitem><listitem><para>The overall graph has (a hierarchy of)<emphasis role="strong">sub-graphs</emphasis> that represent <ulink url="kindyn-doc.html#KINEMATIC-CHAIN-INTERFACE">kinematic chains</ulink>,constraints or feature relationships.</para></listitem> </itemizedlist></para></section> <section id="implementation-issues"><title>Implementation issues</title><para>There are a couple of important decisions that must be taken by thelibrary implementors:<itemizedlist><listitem><para><emphasis role="strong">Namespaces</emphasis>: most of the datastructures and method calls are valid in 1D, 2D and 3D spaces. Hence,the introduction of corresponding namespaces can make the programmingeasier, because the (most often) redundant space dimension informationneed not be included in the method and data structure names.</para></listitem><listitem><para><emphasis role="strong">Alternative representations</emphasis>: mostphysical properties can be mathematically represented in more than oneway. Hence, in principle one should provide all method calls indifferent forms, where each form uses another representation. Forexample, the<link linkend="frame-move-method"><function>move</function></link>method to displace a <link linkend="frame">Frame</link> could take an<link linkend="htmatrix">homogeneousTransformationMatrix</link> asargument, or a <link linkend="vector">Vector</link> together with aset of <link linkend="euler-angles">EulerAngles</link> or a<link linkend="quaternion">quaternion</link>.</para><para>This problem of alternative argument lists could be solved by<emphasis role="strong">overloading</emphasis>.</para></listitem><listitem><para><emphasis role="strong">Alternative algorithms</emphasis>: manymethod calls can be implemented in more than one way, and the user canoften want to be able to explicitly choose which algorithm is used.</para><para>This problem of alternative argument lists could be solved by the<emphasis role="strong">strategy software pattern</emphasis>: the samemethod call is <emphasis role="strong">configured</emphasis> to use aparticular algorithm at run-time.</para></listitem></itemizedlist></para></section></article>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -