Table of Contents
The pose type is used to represent the location and orientation of geometric objects within coordinate systems anchored to the earth's surface or within other astronomical coordinate systems. The location is represented by a 2D or 3D point. For 2D poses, the orientation is defined by a rotation angle in (-π, π] expressed in radians. For 3D poses, the orientation is defined by four float values W, X, Y, Z, representing a unit quaternion
where
.
The pose constructor accepts quaternions whose norm is within 1e-3 of unit (a tolerance wide enough to absorb the integrator drift typical of sensor-fusion clients such as IMUs and AR/VR runtimes), then renormalizes to exactly unit norm before storing. Way-off norms (e.g., the obvious-bug case (1, 1, 1, 1) where |q| = 2), zero quaternions, and quaternions with NaN/Inf components are rejected up front. The on-disk representation is therefore independent of the caller's floating-point hygiene, and downstream comparison, hashing, SLERP, and Euler-decomposition code can rely on the unit-norm invariant.
The GeoPose Standards Working Group (SWG), working under the auspices of the Open Geospatial Consortium, has defined a standard for exchanging pose information across different users, devices, and platforms. More information about the standard can be found in the GitHub repository of the GeoPose SWG.
The pose type serves as base type for defining the temporal pose type tpose. The tpose type has similar functionality as the temporal point type tgeompoint. Thus, most functions and operators described before for the tgeompoint type are also applicable for the tpose type. In addition, there are specific functions defined for the tpose type. We cover these functions in this chapter.
The tpose type is used for defining the type trgeometry (that is, temporal rigid geometry) defined in the next chapter. The implementation of the these types in MobilityDB has been studied in the following PhD thesis.
The posechain type represents a body whose parts are placed with respect to one another: a camera on a gimbal on a vehicle, or an arm whose forearm is placed with respect to its upper arm. A pose chain is an ordered list of at least one pose. The first link is expressed in the chain's outer frame, and every later link is expressed in the frame the link before it defines, so a link states where a part sits relative to its parent rather than relative to the world.
The OGC GeoPose standard calls such a structure a chain of frame transforms, where each transform is a pair of reference frames and the outer frame is the domain while the inner frame is the range. The standard states that an inner frame cannot be a topocentric frame, so a chain carries exactly one frame that names a place on the earth, at its outside. Two properties follow, and both are enforced: the whole chain has one SRID, and every link has the same dimension. Only the outer link may be geodetic, and only the outer link may carry an SRID.
Where the outer frame is geographic, the outer link's position is in degrees while a later link's translation is in metres along the local East-North-Up axes at its parent. The composition takes that sum in geocentric coordinates and reads the position back as a geographic one, so a chain over a geographic frame is composed on the ellipsoid rather than in the plane, and the orientation is re-expressed against the East-North-Up basis at the position the composition reaches.
Composing every link gives the pose of the innermost frame in the outer frame of the chain, which is what the conversion to pose returns. That single conversion gives a chain the whole surface defined for poses, so the type itself stays small. The two types therefore answer the same questions, and this chapter states each operation once, naming the type only where the answer depends on it.
| What it states | Base type | Set type | Temporal type |
|---|---|---|---|
| One placement | pose | poseset | tpose |
| A composition of placements | posechain | posechainset | tposechain |
Most functions and operators for temporal types described in the previous chapters can be applied to poses and to pose chains. Therefore, in the signatures of the functions, the notation base represents a pose or a posechain and the notation ttype a tpose or a tposechain. To avoid redundancy, we present next only what is specific to the two types.
A signature both types answer names them as an alternation, {pose,posechain}, and a signature only one of them answers names that one. A function whose name differs between the two keeps a line of its own, so tpose(pose,timestamptz) and tposechain(posechain,timestamptz) are never collapsed into one callable name that does not exist.