Skip to main content

No project description provided

Project description

farm-ng-core

farm-ng-core

Foundational library for robotics and machine sensing application under active development


for c++, python and soon rust - under active development


👟Getting Started

Check out the getting-started docs:

here

or

here

Core layer

Convenient macros such as FARM_ENUM, FARM_ASSERT_* and FARM_UNWRAP.

Standard Library-like genera purpose utilities.

farm-ng-core only has a small set of dependencies: libfmt, expected (both being targeted for c++ standardization) and Protocol Buffers / GRPC.

Sophus 2: Building Blocks for 2D and 3D Geometry

Sophus started as a c++ implementation of Lie Groups / Manifolds. It evolved to a collection of types and functions commonly used or 2d and 3d geometric problems especially in the domain of robotics, computer vision annd graphics.

🌐Lie Groups

tldr: rotations, translations and scaling in 2d and 3d

Lie groups are generalizations of the Euclidean vector spaces R^N. A little more formally, a Manifold which is also an abstract group.

Okay, and what is a Manifold?

Manifold are generalizations of the Euclidean vector spaces R^N. In particular, they behave locally like a Euclidean vector space, but globally can have a very different structures. In particular there can be wrap-around. The circle group SO(2) is the simplest example for such wrap around. Assume, we have a dial pointing North. If you turn the dial 90 degree to the left, it points West. If you turn it another 90 degrees it turns South. Now, if you turn it again 90 degrees is points East. And you turn it left again for 90 degrees it points North again. It wrapped around: 90 "+" 90 "+" 90 "+" 90 = 0.

3d rotation example using the SO(3) type

  // The following demonstrates the group multiplication of rotation matrices

  // Create rotation matrices from rotations around the x and y and z axes:
  double const kPi = sophus::kPi<double>;
  sophus::Rotation3F64 R1 = sophus::Rotation3F64::fromRx(kPi / 4);
  sophus::Rotation3F64 R2 = sophus::Rotation3F64::fromRy(kPi / 6);
  sophus::Rotation3F64 R3 = sophus::Rotation3F64::fromRz(-kPi / 3);

  std::cout << "The rotation matrices are" << std::endl;
  std::cout << "R1:\n" << R1.matrix() << std::endl;
  std::cout << "R2:\n" << R2.matrix() << std::endl;
  std::cout << "R3:\n" << R3.matrix() << std::endl;
  std::cout << "Their product R1*R2*R3:\n"
            << (R1 * R2 * R3).matrix() << std::endl;
  std::cout << std::endl;

  // Rotation matrices can act on vectors
  Eigen::Vector3d x;
  x << 0.0, 0.0, 1.0;
  std::cout << "Rotation matrices can act on 3-vectors" << std::endl;
  std::cout << "x\n" << x << std::endl;
  std::cout << "R2*x\n" << R2 * x << std::endl;
  std::cout << "R1*(R2*x)\n" << R1 * (R2 * x) << std::endl;
  std::cout << "(R1*R2)*x\n" << (R1 * R2) * x << std::endl;
  std::cout << std::endl;

  // SO(3) are internally represented as unit quaternions.
  std::cout << "R1 in matrix form:\n" << R1.matrix() << std::endl;
  std::cout << "R1 in unit quaternion form:\n"
            << R1.unitQuaternion().coeffs() << std::endl;
  // Note that the order of coefficients of Eigen's quaternion class is
  // (imag0, imag1, imag2, real)
  std::cout << std::endl;

3d rotation + translation example using the SE(3) type

  // Example of create a rigid transformation from an SO(3) = 3D rotation and a
  // translation 3-vector:

  // Let use assume there is a camera in the world. First we describe its
  // orientation in the world reference frame.
  sophus::Rotation3F64 world_from_camera_rotation =
      sophus::Rotation3F64::fromRx(sophus::kPi<double> / 4);
  // Then the position of the camera in the world.
  Eigen::Vector3d camera_in_world(0.0, 0.0, 1.0);

  // The pose (position and orientation) of the camera in the world is
  // constructed by its orientation ``world_from_camera_rotation`` as well as
  // its position ``camera_in_world``.
  sophus::Isometry3F64 world_anchored_camera_pose(
      world_from_camera_rotation, camera_in_world);

  // SE(3) naturally representation is a 4x4 matrix which can be accessed using
  // the .matrix() method:
  std::cout << "world_anchored_camera_pose:\n"
            << world_anchored_camera_pose.matrix() << std::endl;

Table of Lie Groups

The following table gives an overview of all Lie Groups in Sophus.

c++ type Lie group name Description
Rotation2<T> Special Orthogonal Group in 2D, SO(2) rotations in 2d, also called Circle Group, or just "angle"
Rotation3<T> Special Orthogonal Group in 3D, SO(3) rotations in 3d, 3D orientations
Isometry2<T> Special Euclidean Group in 2D, SE(3) rotations and translations in 2D, also called 2D rigid body transformations, 2d poses, plane isometries
Isometry3<T> Special Euclidean Group in 3D, SE(3) rotations and translations in 3D, also called rigid body transformations,6 DoF poses, Euclidean isometries
RxSo2<T> Direct product of SO(3) and scalar matrix, R x SO(2) scaling and rotations in 2D
RxSo3<T> Direct product of SO(3) and scalar matrix R x SO(3) scaling and rotations in 3D
Similarity2<T> Similarity Group in 2D, Sim(2) scaling, rotations and translation in 2D
Similarity3<T> Similarity Group in 3D, Sim(3) scaling, rotations and translation in 3D
Cartesian2<T> 2D Euclidean Vector Space, R^2 all vector spaces are trivial Lie groups, also called 2d translation group, the translation part of SE(2)
Cartesian3<T> 3D Euclidean Vector Space, R^3 all vector spaces are trivial Lie groups, also called 3d translation group, the translation part of SE(2)

Supported advanced features on Lie groups:

  • ✅ (linear) interpolation
  • ✅ Spline interpolation
  • ✅ Averaging (of more than two elements)

🌁Image classes, Sensor Models and more

Image Classes: Image, MutImage, DynImage, MutDynImage and view classes.

Collection of camera models (pinhole, brown-conrady aka opencv, kannala-brandt and orthographic), IMU mode and more.

Component Pipeline

C++ Component pipeline (aka actor framework) for easy parallelization of data processing pipelines.

Logging/Serialization Infrastructure

  • Text Logging

  • Protobuf Logging

  • RPCs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

farm_ng_core-2.0.0rc2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (540.3 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

farm_ng_core-2.0.0rc2-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl (572.6 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ i686

farm_ng_core-2.0.0rc2-cp312-cp312-macosx_11_0_x86_64.whl (327.3 kB view details)

Uploaded CPython 3.12 macOS 11.0+ x86-64

farm_ng_core-2.0.0rc2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (538.9 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

farm_ng_core-2.0.0rc2-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl (568.7 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ i686

farm_ng_core-2.0.0rc2-cp311-cp311-macosx_11_0_x86_64.whl (325.4 kB view details)

Uploaded CPython 3.11 macOS 11.0+ x86-64

farm_ng_core-2.0.0rc2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (537.8 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

farm_ng_core-2.0.0rc2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl (567.8 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ i686

farm_ng_core-2.0.0rc2-cp310-cp310-macosx_11_0_x86_64.whl (324.2 kB view details)

Uploaded CPython 3.10 macOS 11.0+ x86-64

farm_ng_core-2.0.0rc2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (537.2 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

farm_ng_core-2.0.0rc2-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl (567.3 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ i686

farm_ng_core-2.0.0rc2-cp39-cp39-macosx_11_0_x86_64.whl (324.4 kB view details)

Uploaded CPython 3.9 macOS 11.0+ x86-64

farm_ng_core-2.0.0rc2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (536.9 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

farm_ng_core-2.0.0rc2-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl (567.5 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ i686

farm_ng_core-2.0.0rc2-cp38-cp38-macosx_11_0_x86_64.whl (324.2 kB view details)

Uploaded CPython 3.8 macOS 11.0+ x86-64

File details

Details for the file farm_ng_core-2.0.0rc2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for farm_ng_core-2.0.0rc2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 946c376eda4d9835cbe194070a8f7d927f48862c5720d0338560925aed3d6eab
MD5 0350aa1c09e5295b7eda20d8c6390095
BLAKE2b-256 da70521bb73e89faccbfd4c814f369bb5ea716f668a6898f9ebc36c99d6e80a0

See more details on using hashes here.

Provenance

File details

Details for the file farm_ng_core-2.0.0rc2-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for farm_ng_core-2.0.0rc2-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 a784845779c719c90da2c5bc78f8af3e006fa74225856ddf67c75d9beead85f1
MD5 0e9b29118669a0421e3e77841373189d
BLAKE2b-256 cb78c38850b1dcdc3d7d3c2b87140116f0aa88cb18bb63440221c5f3a8e29d09

See more details on using hashes here.

Provenance

File details

Details for the file farm_ng_core-2.0.0rc2-cp312-cp312-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for farm_ng_core-2.0.0rc2-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 87896147a3c238203cdb722cec434240b109a947d3e8864019146331307ff694
MD5 fdf74ab5f40d44bdba52a72538ef25f5
BLAKE2b-256 19b541f3e922bda932fe79705ac77f0b6467c68c31fb278db067e961300cd97c

See more details on using hashes here.

Provenance

File details

Details for the file farm_ng_core-2.0.0rc2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for farm_ng_core-2.0.0rc2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5e00fbb76c896a0947bd407ede6af936d27906391c8ca67cf08b3066fe2192bd
MD5 7060164b0ebefee4dc2c9abe0f0e3323
BLAKE2b-256 fdc3f370b5a7fd694413f5145352124fd5621e489974eb21715094d16a121142

See more details on using hashes here.

Provenance

File details

Details for the file farm_ng_core-2.0.0rc2-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for farm_ng_core-2.0.0rc2-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 d639368b1782d1f4a75b68236eb7dc74bd7c465d3632c2d4d8df86af75881a0b
MD5 9b1a50da0b2d862a905c4aa48eb456e2
BLAKE2b-256 fa03e1157c37e82bc2ea3afec578c1591ee1f6b99bf57bdd43ad3da89375824c

See more details on using hashes here.

Provenance

File details

Details for the file farm_ng_core-2.0.0rc2-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for farm_ng_core-2.0.0rc2-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 598757174e3f45a7e8c3182db2df3b7dc6d2476d8f26b32aab2194e91334f34b
MD5 e60bc4892f271b4afb708ae3363b4a5a
BLAKE2b-256 18ec59e163d5eee532fc593e8ef1f85c6ae628662c8c164997acbe7346d54e4c

See more details on using hashes here.

Provenance

File details

Details for the file farm_ng_core-2.0.0rc2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for farm_ng_core-2.0.0rc2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 84bbf82921fb13f3d165876df540ac0df8908f3bc7ca08aa56abbe85cc066e47
MD5 4960d964859363a148bcde130d03bafd
BLAKE2b-256 e53feac16d244328c9612ed57082c48eef4a11910fc42b07ec4f2ff020e47675

See more details on using hashes here.

Provenance

File details

Details for the file farm_ng_core-2.0.0rc2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for farm_ng_core-2.0.0rc2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 f835e8a52b19140e19bbf903c3586e16e917d3f2973aaf8156b9cc79ab776b41
MD5 552fa1323760cf0c7fa0b956c3bb8e1d
BLAKE2b-256 59252ed56bbd187713af15d71fd5fe0c4bbba0e77ac13783f852eb490b217a5b

See more details on using hashes here.

Provenance

File details

Details for the file farm_ng_core-2.0.0rc2-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for farm_ng_core-2.0.0rc2-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 9499cca35eb9368547fe4aaf3fce945fa2d55900c275cd9d648f09e2dcbcde6f
MD5 373dc9b14e6b602c594c67272250690c
BLAKE2b-256 618e6ff88a635e2240629c800abfee6b2be4712af7e5ffc1fd9fd175c445bd4a

See more details on using hashes here.

Provenance

File details

Details for the file farm_ng_core-2.0.0rc2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for farm_ng_core-2.0.0rc2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 93d3e147ef54ca87d84f20fbabb9e2b71c6e2bc5399d2dff4fbf88219f9d0530
MD5 a9c1a638a37990cc879b647ca446a8e4
BLAKE2b-256 eaf3a7e51b8641db7a8246bde8e4a66cfd04cfe131ae0237c50ca8e9455950e2

See more details on using hashes here.

Provenance

File details

Details for the file farm_ng_core-2.0.0rc2-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for farm_ng_core-2.0.0rc2-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 bc853e98bfa426b4554eafa42757935fc70b4c6a7981b3e2256e1ec7c004da7e
MD5 c0926fe969c034e8b6c6fa7d4d679cc1
BLAKE2b-256 11de464684b617538853d3760a2566b36030d98139158f57178a010b8479f2e8

See more details on using hashes here.

Provenance

File details

Details for the file farm_ng_core-2.0.0rc2-cp39-cp39-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for farm_ng_core-2.0.0rc2-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 943756d37a8b3338da546b238c9f2cefc8dbce6c37e0c376fd223412a0784bd8
MD5 a18403158aa341dda52695322a44d9f8
BLAKE2b-256 cf2ef4e9baf3f3eb23ab8e3d5f9f5ca9bb9d3c59c34a89a051b02bfd7c95d191

See more details on using hashes here.

Provenance

File details

Details for the file farm_ng_core-2.0.0rc2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for farm_ng_core-2.0.0rc2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e04e30386a3f8d4aded16d06f9d799d07726d7109e90d5a382d55da685309b44
MD5 14d3faf4e0eb3a474d48e444b6f31164
BLAKE2b-256 a61a25a9a86f5193bb2c4b6afd025682937676267aef85fa2090163b3e9f418d

See more details on using hashes here.

Provenance

File details

Details for the file farm_ng_core-2.0.0rc2-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for farm_ng_core-2.0.0rc2-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 b2cb4f77702db21c7664748dbede5b553bb7a2d608264a90919faba39093f754
MD5 7cdee6353d14cf96424f61d8a14142da
BLAKE2b-256 11b9ec0a4d07ce8bc663dccb894743911063c33186dabfb8ea9a724efa437f06

See more details on using hashes here.

Provenance

File details

Details for the file farm_ng_core-2.0.0rc2-cp38-cp38-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for farm_ng_core-2.0.0rc2-cp38-cp38-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 64eb2a938032e3c9e6e1a3a3c9ac31bc85179cb13b98eb625fab4940c79ffa9c
MD5 1a7d23721255cacdc73fe2a93eed7634
BLAKE2b-256 b81f63d193ee9dcb1828c2f4879126f625ddc9fcf7cef9bfd9da172657af4395

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page