POS Library — Coordinate Systems

The POS library [1] is a coordinate system framework based on the POS ontology [2] for representing and transforming generalized coordinates across different coordinate systems and spaces.

See the basic notions for a general description of the fundamental concepts. Below you will find tutorials, with increasingly complex examples, and reference documentation.

Quick Example

Create a child coordinate system, define a point in it, and transform the point to world coordinates.

Coordinate system diagram
quick_example.c++
#include <print>
import ninbot;

int main()
{
   using namespace nin;
   using namespace nin::R2;

   position_coordsys_child CS1 {WCS, translation{3_m, 1_m}};
   point P = {CS1, point_qty{1_m, 2_m}};

   point_qty P_wcs = P.map_to(WCS);

   std::println("Coordinates of point P in WCS are: P={}", P_wcs);
}
Output
Coordinates of point P in WCS are: P=(4, 3) (m)

In the example above,

  • CS1 is a child coordinate system whose origin sits at (3, 1) in the World Coordinate System (WCS).

  • point binds a coordinate quantity to CS1.

  • map_to(WCS) builds a transformation function from CS1 to WCS and invokes it in one step, walking up the tree and composing the rigid transformations along the way.

Reference

Basic Templates

Template Description

coordsys_traits

Concept for coordinate system spaces

coordsys_bridge_traits

Concept for cross-space bridges

coordsys<CT>

Base class for all coordinate systems

coord_value<CT>

Coordinate quantity bound to a coordinate system

coord_cloud<CT, N>

Batch container of coordinate quantities

mapCS()

Create transformation functions between coordinate systems

coord_tf

Fixed transformation function between coordinate systems

coordsys_backend

Abstract base for backend implementations

coordsys_child

Child node in the kinematic tree

coordsys_generic

Wrapper for arbitrary backends

coordsys_cutoff

Tree traversal cutoff for performance


1. Francisco Jesús Arjonilla García, Yuichi Kobayashi (2023) The POS library: a highly customisable coordinate system library for C++. In RSJ Conference of the Robotics Society of Japan, 1J4-05. Sendai.
2. IEEE Std 1872-2015, "IEEE Standard Ontologies for Robotics and Automation," pp. 1–60, 10 April 2015. doi: 10.1109/IEEESTD.2015.7084073