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:
or
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for farm_ng_core-2.3.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42a305abf2f7a8a6574683d4e5b483b04e3fa769ebdf860cd8b4fec83ade4f64 |
|
MD5 | 281324202bba3703fb86b3deab4697c6 |
|
BLAKE2b-256 | aca620349b382aa2bf3fda5277353e10c942c52f5ab27416169fae6a68a8c019 |
Hashes for farm_ng_core-2.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 360e651e53a5d96e3a5ba43a58e253bae5fea39c523a33b8e14a477c34c8001c |
|
MD5 | 5d350c72ee391e10022e3a13df6f01b7 |
|
BLAKE2b-256 | 8515b82a645f23d9fb02a527a61cc71290b550d9f624eac4ce2cba135a739feb |
Hashes for farm_ng_core-2.3.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f574ae05872c1332e789636ddd812052a52993e351096f83beae5b2ba7d678a |
|
MD5 | 23d639a4c2b05340b01bdea83de08192 |
|
BLAKE2b-256 | 337092b5f7cd9b59c6beac483f1127c8fcb7d63e201749322d7a30f12be6e65d |
Hashes for farm_ng_core-2.3.1-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36fdbfac00440445e3424501c3750896a0c7eb02b2450f5fddfcbf35c5c2386d |
|
MD5 | 3c58b65aa4863cfed694b983a0430bd4 |
|
BLAKE2b-256 | 3de45b12cad0fa20637aabeabb23111c91962e6bd84a8d5817336bd377183c0b |
Hashes for farm_ng_core-2.3.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9af58f0444739a7df675ac85f3d91efc8b733718c42ab2e7bc25c09feb23e6c3 |
|
MD5 | d88044170fb5630e1487bf61e0f0814c |
|
BLAKE2b-256 | 5a0f9376a3e11e86ab301016148598d1fd305405cb2002e37bade574a3821526 |
Hashes for farm_ng_core-2.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ad4ad2b33631d40b0b5df848fb30f5ead2def0355b4d5a6ee8a8c774f6457d7 |
|
MD5 | a594590f5663852d3ef3c67c393f251c |
|
BLAKE2b-256 | e12d196f23a982ca950d1e5dded3d5c874819747bd12865cdab3373f3f6021a5 |
Hashes for farm_ng_core-2.3.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05a72adea30f2ba89c4662eaa39b3084fd1bb862f149d8a7bf4c41102bd52c58 |
|
MD5 | ceede4ce83fdfc617c0f261407c57ba6 |
|
BLAKE2b-256 | 0158ff77a7777324293b745a2ce592fdd0a0895352fabf9e4690071e4ccd4a04 |
Hashes for farm_ng_core-2.3.1-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a33891b3a824c26697f42430bed8ab56a3ea6e150c44d7eb491c2a3404a62a3c |
|
MD5 | c1e7dc53242170a493570935a8e1485d |
|
BLAKE2b-256 | f29634c8b7ade0fd54729eca64428c844052402bb1a220c93c3381e7aea3c0d3 |
Hashes for farm_ng_core-2.3.1-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5482d50d6ccf0ff853962902a7123a0e3105893eba18b3ca15d121666c497b2d |
|
MD5 | a3f225ad116efb72bc0c74a94cd8edaf |
|
BLAKE2b-256 | 488cf77225bd5558e3fab2e854320c2800196b30782946b802aa261d6560c09d |
Hashes for farm_ng_core-2.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11d70bed86c8db7262c344a2ce5d824f6753db129324ae1ddbacae0cfe29ed54 |
|
MD5 | d85f661b8463c41e9a31f54eb0c324b4 |
|
BLAKE2b-256 | de4495c1989d91911324a2c3bc03f723ff2c666a8af4d822b0ccc8da1fbe6cc0 |
Hashes for farm_ng_core-2.3.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44c2788c3e184c6e701fcf400a6cfb0bd484c5a3f595783ccc271d7a2d00d783 |
|
MD5 | 9f478a0e4fb338421d76a95e22b6dcd4 |
|
BLAKE2b-256 | 6dfcad363dda0ec05b22fefb947e06306128b79deed8b5f20c255d8110bd251c |
Hashes for farm_ng_core-2.3.1-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10d62109ba0811bb8c5d60cfb54eaa360c46950a7ed7cc215f22a78b602b7568 |
|
MD5 | aed3e96590c049bea7c584bdddef7c70 |
|
BLAKE2b-256 | f031ed4eb72009375be4ca0c8917eeef3bdca545e22c25462a3a7c5e776b91d0 |
Hashes for farm_ng_core-2.3.1-cp39-cp39-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c626ae51fd1ae69056d9ec30da810f4aea84ff16151824ea4f0400b3c29ca62d |
|
MD5 | 43176720b285f577b5adb19bfc4db321 |
|
BLAKE2b-256 | d743706da9380ae00bbdb9f9c06d7d14b3dcbac1274862a45db0257de41ee8bc |
Hashes for farm_ng_core-2.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 384f0a25e0a5bd9264a1f7b4cfe8b404520ab1516c1cbb1f56d9deab320c9bf4 |
|
MD5 | 1e26579ee13500f12d73935864004aef |
|
BLAKE2b-256 | 3010185484a3b769687ce07966e661014bfee2c0b03fb42e6e0260bbd5385eb1 |
Hashes for farm_ng_core-2.3.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3faf006be2ca8cb3b4dc3f47d5d6304f37eced3c0d4dfa86ef791eb8430b87a |
|
MD5 | 1aa565259aaa692c924159af7b45595e |
|
BLAKE2b-256 | ef7e632007fb5afa10a84db9b17cc5fae94b44b98165450046b35f4392549253 |
Hashes for farm_ng_core-2.3.1-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b995c83fbb265acec91b753dd60198d8e784b2e1cb0b5b7e1e455c32778e01c |
|
MD5 | fb01e1892ba94e33f78b136af9ad3980 |
|
BLAKE2b-256 | 7a430ef1f5e3b74a40ef6fa6b3836e0b184b9726e989cd1c4b580f12b35ab431 |
Hashes for farm_ng_core-2.3.1-cp38-cp38-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd130a82f1a1634120df18edbb68f8a3255ebe87abf47d1cf78ede24edfacfd8 |
|
MD5 | 833c52b93781e0f0933aab74be24f77c |
|
BLAKE2b-256 | e19aa290737e9ae3f0d496edabdd8ab67f24752a5b63946162b6a5cfb6bbeb11 |
Hashes for farm_ng_core-2.3.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e2960f1b668aa45bbae745b2cff8cba56c476e192ba26ae9e67f5bdd9494c64 |
|
MD5 | 0fcc327474ac995c4ffda79ba29c7a82 |
|
BLAKE2b-256 | e5cb2f1dcafd7103eb381abe8dcdcba98184463fd62f126063c9a8f8f4203205 |
Hashes for farm_ng_core-2.3.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc2212b414af7d2f705698256106765f33e6b8d023e287f2f207abd7c77bd82d |
|
MD5 | 3b565fe1a2d9c4c1b813369f2a8e3c4b |
|
BLAKE2b-256 | a06988208a46176a474cd73676ccec66f23569d4dc1267742ebeb23b179fd47d |
Hashes for farm_ng_core-2.3.1-cp38-cp38-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bc48aab9878a19ccdc6f60b6dc0391ed405798eb9a1843c07365bad9ed1ed24 |
|
MD5 | daae922c5dddafbd5d4831e9c7482c01 |
|
BLAKE2b-256 | 0806d19899efd1d0bf694ac2905ea2cb03242999b0486812301b0a4c9018b300 |