Crate ecoord

Source
Expand description

A library for transforming between 3D coordinate frames.

The position of an object in 3D space can be described geometrically using an inertial frame of reference. If the transform (translation and rotation) between two reference frames is known, the object’s position can be determined for each frame.

As some objects, like pedestrians or UAVs, move in space, a reference frame can be time-dependent. Each transform object has a timestamp defined in seconds and nanoseconds, whereby different interpolation strategies, such as step-wise or linear, can be applied.

The transforms from a frame to another are assigned to channels, which enables the activation and deactivation of selected channels. If multiple channels describe the same transform from a frame to another frame, the channel with the highest prioritization number is used. If multiple channels have the same prioritization number, the alphabetically sorted last channel name is used.

§Overview

§Data Structure

For de/serializing JSON is used in three forms:

  • ecoord.json: readable JSON
  • file_name.ecoord.json prefixing with a file name
  • file_name.ecoord.json.zst: compressed JSON using the ZStandard compression algorithm

Document Structure:

  • document
    • transforms
    • channel_info: additional information on channels
      • ìd: String
      • priority: Option<i32>
        • default: 0
        • if multiple channels hold transforms for the same frame to child frame, the one with the higher priority is selected
    • frame_info: additional information on frames
    • transform_info
      • frame_id: String
      • child_frame_id: String
      • interpolation_method: Option<String>
        • step (default): piecewise constant interpolation
        • linear: linear interpolation

Re-exports§

pub use ecoord_io as io;
pub use ecoord_transform as transform;

Structs§

ChannelId
Dedicated type for an identifier of a channel.
ChannelInfo
Additional information for a frame.
FrameId
Dedicated type for an identifier of a frame.
FrameInfo
Additional information for a frame.
ReferenceFrames
Represents a list of transforms for representing different coordinate frames.
SphericalPoint3
Represents a point in three-dimensional spherical coordinates.
Transform
A time-dependent rigid transformation in 3D.
TransformId
Dedicated type for an identifier of a transform.
TransformInfo
Additional information for a frame.
UnitSphericalPoint3

Enums§

Error
InterpolationMethod
Methods for interpolating a list of Transform.

Functions§

merge
Merges a list of reference frame systems to a single reference frame system. Requires unique ChannelId and TransformId combinations across the input ReferenceFrames.