Welcome to spatial_transformation’s documentation!

spatial_transformation is a utility package for working with spatial transformations in both C++ and Python.

The code is hosted on GitHub.

The Transformation Class

This package contains native implementations of a Transformation class in both Python and C++. They work very similarly but differ a bit in some details, mostly regarding data types used for the rotation (scipy’s Rotation class in Python vs Eigen’s Quaternion in C++).

There are also Python bindings for the C++ version (spatial_transformation.cpp.Transformation), so it can be used in other bindings (e.g. a function that returns a transformation). However, when working in Python, the native implementation provides more flexibility, so you may want to convert it. The Python class implements methods from_cpp() and as_cpp() for this purpose.

Compute Transformation Between Different Systems

The pointcloud library provides utility functions for computing the transformation between two different reference frames, given the positions of a set of points in both frames. For more information see breathe_apidoc/file/pointcloud_8hpp.

Use in CMake Project

find_package(spatial_transformation REQUIRED)

add_library(mylib ...)
target_link_libraries(mylib
  spatial_transformation::transformation  # for the Transformation class
  spatial_transformation::pointcloud  # for point cloud transformation computation
)

Indices and Tables

License and Copyrights

BSD 3-Clause License

Copyright (c) 2023, Max Planck Gesellschaft All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.