From: Herman Bruyninckx <Herman.B<ruyninckx@me...>  20040829 10:36:15

Here is the BROSI draft. Herman  K.U.Leuven, Mechanical Engineering, Robotics Research Group <http://people.mech.kuleuven.ac.be/~bruyninc>; Tel: +32 16 322480 ================================================================= BROSI  Basic Robotics Standards, Level 1 Primitive data structures (numerical representations) for motion (position, velocity, acceleration), force, and derived quantities. Herman Bruyninckx, 29 AUG 2004 This document is released in the public domain. The presented standards can be used without any restriction, except that the names "BROS" and "Basic Robotics Standards" can only be used to refer to the material in this and related documents, and in later versions thereof. Introduction  This document is part of a multilevel standardisation effort launched by several Free Software and Open Source robotics projects. This first level of the standard is limited to the definition of numerical representations of common primitive concepts in robotics. "Primitive" means: consisting of only the basic numerical types "float" and "int". These representations are completely free of any special interpretation in whatever robotics application domain. All defined objects live in the threedimensional Euclidean space. To Be Discussed: If twodimensional ("planar") objects are needed, the suffix "2D" could be added to the data structure names; for example, "RotMatrix2D". All physical units are in SI (Systeme International d'Unites, International System of Units, <http://physics.nist.gov/cuu/Units/>;). More in particular: distances in meter, angles in radians, forces in Newton, time in seconds. When encoded in a programming language, the "argument namess" given in each object can become the fields in a data structure in the language. For example, if T is a HomTrans matrix, then T.Rxx is the topleft element of T. Mathematical representations  Point: x: float y: float Coordinates of a point in the 3D Euclidean space. Vector: x: float y: float z: float Coordinates of the directed line segment from one Point to another Point. No distinction is made between "free vectors" (not bound to any particular line), "line vectors" (bound to a particular line), or "point vectors" (bound to a particular point). UnitVector: x: float with range [1,1] y: float with range [1,1] z: float with range [1,1] vector whose coordinates must satisfy the constraint X^2 + y^2 + z^2 = 1. RotationAngle: float, with unlimited range. OrientationAngle: float, with range [pi,+pi] HeadingAngle: float, with range [pi/2,+pi/2] To Be Discussed: there are no basic numerical types that impose the ranges of the two abovementioned objects. Is this a reason not to include them in this level of the standards? RotMatrix: Rxx: float Rxy: float Rxz: float Ryx: float Ryy: float Ryz: float Rzx: float Rzx: float Rzz: float nine floats representing the 3 x 3 matrix with the direction cosines of the unit vectors of one orthogonal, righthanded reference frame with respect to another orthogonal, righthanded reference frame:  Rxx Ryx Rzx  RotMatrix =  Rxy Ryy Rzy   Rxz Ryz Rzz  All rows and colums are orthogonal UnitVectors. RotX: a: float RotMatrix representing a rotation about the X axis over an angle a:  1 0 0  RotX(a) =  0 ca sa   0 sa ca  RotY: a: float RotMatrix representing a rotation about the Y axis over an angle a:  ca 0 sa  RotY(a) =  0 1 0   sa 0 ca  RotX: a: float RotMatrix representing a rotation about the Z axis over an angle a:  ca sa 0  RotZ(a) =  sa ca 0   0 0 1  EulerMovingXYZ: a: float b: float c: float Sequence of three rotations about moving frame axes. (Alternative name: "EulerXYZ", because most literature defines Euler angles around moving axis.) The magnitudes of angles are limited, but the three angles do not have the same limits. The angle "a" belongs to the rotation around the first named axis, "b" to the second named axis, and "c" to the last named axis; for example, in EulerMovingXYZ(a,b,c), the rotation around "X" is over the angle "a", the rotation about "Y" is over the angle "b", and the rotation about "Z" is over the angle "c". There are twelve possible combinations of Euler angles: EulerMovingXYZ(a,b,c) = RotZ(c) RotY(b) RotX(a), and similarly for EulerMovingXZY, EulerMovingXYX, EulerMovingXZX, EulerMovingYXZ, EulerMovingYZX, EulerMovingYXY, EulerMovingYZY, EulerMovingZXY, EulerMovingZYX, EulerMovingZXZ, EulerMovingZYZ EulerFixedXYZ: r: float p: float y: float Sequence of three rotations about fixed frame axes: (Alternative name: RPY_XYZ ("rollpitchyaw").) EulerFixedXYZ(a,b,c) = RotX(a) RotY(b) RotZ(c), and similarly for EulerFixedXZY, EulerFixedXYX, EulerFixedXZX, EulerFixedYXZ, EulerFixedYZX, EulerFixedYXY, EulerFixedYZY, EulerFixedZXY, EulerFixedZYX, EulerFixedZXZ, EulerFixedZYZ. Quaternion: V: Vector s: float Ordered couple of a Vector (representing the axis around which to rotate), and a scalar (representing the magnitude of a rotation). s is not the angle of rotation itself, but the cosine of the half of that angle; the Vector is not the direction (unit vector) of the rotation axis itself, but this direction unit vector multiplied by the sine of the half of that angle. The major reason for the existence of Quaternions is that they do not have algebraic singularities, which all Euler angles do have. The coordinates of a Quaternion satisfy the following constraints: Vx^2 + Vy^2 + Vz^2 + s^2 = 1. HomTrans: Rxx: float Rxy: float Rxz: float Ryx: float Ryy: float Ryz: float Rzx: float Rzx: float Rzz: float Px: float Py: float Pz: float Twelve floats representing an homogeneous transformation matrix, i.e., 4 x 4 matrix of floats containing a RotMatrix and a Point in the following form:  Rxx Ryx Rzx Px   Rxy Ryy Rzy Py  HomTrans =  Rxz Ryz Rzz Pz   0 0 0 1  Velocity: Vector representing the velocity of a Point Vx: float Vy: float Vz: float Acceleration: Vector representing the acceleration of a Point Vx: float Vy: float Vz: float AngularVelocity: Vector representing the angular velocity of a rigid body Ax: float Ay: float Az: float AngularAcceleration: Vector representing the angular acceleration of a rigid body Ox: float Oy: float Oz: float Force: Vector representing a linear force Fx: float Fy: float Fz: float Moment: Vector representing a force moment Mx: float My: float Mz: float Twist: ordered couple (V,W) of two Vectors: V: Velocity W: AngularVelocity V is the velocity vector of the "velocity reference point", which is the origin of the frame in which the coordinates are expressed. W is an angular velocity vector. (Note: using a velocity reference point that is not the origin requires extra information to be given, i.c. the Position of that velocity reference point.) Wrench: ordered couple (F,M) of two Vectors: F: Vector (F: Fx Fy Fz) M: Vector (M: Mx My Mz) F is a linear force vector. M is the moment vector at the "moment reference point", which is the origin of the frame in which the coordinates are expressed. AccelerationTwist: ordered couple (A,O) of two Vectors: A: Acceleration O: AngularAcceleration V is the velocity vector of the "velocity reference point", which is the origin of the frame in which the coordinates are expressed. W is an angular velocity vector. To Be Discussed: the following two objects (TwistTrans and WrenchTrans) are easily constructed from a HomTrans, and less frequently used in data exchanges. So, they could be removed from the standard. TwistTrans: Rxx: float Rxy: float Rxz: float Ryx: float Ryy: float Ryz: float Rzx: float Rzx: float Rzz: float RPxx: float RPxy: float RPxz: float RPyx: float RPyy: float RPyz: float RPzx: float RPzy: float RPzz: float 18 floats, representing the 6 x 6 matrix of floats that transforms a Twist from one frame to another frame. It is constructed with minimal operations from the HomTrans (R,p) between both frames:  R R p^  TwistTrans =    0 R  with  0 pz py  p^ =  pz 0 px   py px 0  WrenchTrans: similar to TwistTrans, but now the 6 x 6 matrix of floats that transforms a Wrench from one frame to another frame. It is constructed with minimal operations from the HomTrans between both frames.  R 0  WrenchTrans =    R p^ R  To Be Discussed: The following paragraphs just list a set of objects to be standardized, together with a list of commonly used representations. We should discuss what alternative representations to standardize, what names are given to the objects, and, possibly, whether separate names should be given to the same objects with different representations. My suggestion is to use different names, because this is the only way to avoid online interpretation of the data. Line:  (Point, Direction)  (Point, Point)  (Plane, Plane) (intersection)  (Screw) (ordered couple of free vector and line vector, with two constraints between both) Suggestion: LinePD, LinePoPo, LinePlPl, LineS. LineSegment:  (Point, Direction, Length)  (Point, Point) Suggestion: LineSegmentPDL, LineSegmentPoPo Orientation:  RotAxis(line,angle): rotation around the (directed!) "line" through the origin of the current frame, over a given "angle"  RotMatrix  set of the 24 Euler angle sets  Quaternion Suggestion: OrientationA, OrientationM, OrientationE, OrientationQ. Frame:  HomTrans  (Point, Orientation)  (Point, RotMatrix)  (Point, Quaternion)  (Point, one of the 24 Euler angle sets) Suggestion: FrameT, FramePO, FramePM, FramePQ, FramePE. Pose, Displacement, Offset: synonyms for Frame, so with same represenation and similar naming. 