farm-ng-core
sophus::PointTransformer< TT > Class Template Reference

Functor to efficiently transform a number of point given a Isometry3 pose. More...

#include <point_transform.h>

Public Member Functions

 PointTransformer ()=default
 
 PointTransformer (sophus::Isometry3< TT > const &foo_from_bar)
 
auto transform (Eigen::Matrix< TT, 3, 1 > const &point_in_bar) const -> Eigen::Matrix< TT, 3, 1 >
 Transforms a 3-point from frame bar to frame foo. More...
 
auto scaledTransform (InverseDepthPoint3< TT > const &inverse_depth_point_in_bar) const -> Eigen::Matrix< TT, 3, 1 >
 
auto projTransform (Eigen::Matrix< TT, 3, 1 > const &point_in_bar) const -> Eigen::Matrix< TT, 2, 1 >
 Transforms 3-point in frame bar to foo and projects it onto the Euclidean plane z=1 in foo. More...
 
auto projTransform (InverseDepthPoint3< TT > const &inverse_depth_point_in_bar) const -> Eigen::Matrix< TT, 2, 1 >
 Transforms and projects the 3d inverse depth point in frame bar to the Euclidean plane z=1 in foo. More...
 
auto dxProjExpXTransformPointAt0 (InverseDepthPoint3< TT > const &inverse_depth_point_in_bar) const -> Eigen::Matrix< TT, 2, 6 >
 Returns pose derivative of inverse depth point projection at the identity: More...
 
auto dxProjTransformX (InverseDepthPoint3< TT > const &inverse_depth_point_in_bar) const -> Eigen::Matrix< TT, 2, 3 >
 
auto fooFromBar () const -> sophus::Isometry3< TT > const &
 
auto fooRotationBar () const -> Eigen::Matrix< TT, 3, 3 > const &
 
auto barOriginInFoo () const -> Eigen::Matrix< TT, 3, 1 > const &
 

Detailed Description

template<class TT>
class sophus::PointTransformer< TT >

Functor to efficiently transform a number of point given a Isometry3 pose.

When transforming a point point_in_bar given a sophus::Isometry3 pose foo_from_bar, one can simply use

Eigen::Vector3d = foo_from_bar * point_in_bar;

Internally, this applies the (unit) quaternion to the left and the right of the point to rotate it and then adds the translation:

point_in_foo = q*point_in_bar*q' + bar_origin_in_foo.

If there are a lot of point to transform, there is a more efficient way using the rotation matrix R which can be precomputed from the quaternion q.

point_in_foo = R * point_in_bar + bar_origin_in_foo

This is what this functor is for.

Constructor & Destructor Documentation

◆ PointTransformer() [1/2]

template<class TT >
sophus::PointTransformer< TT >::PointTransformer ( )
default

◆ PointTransformer() [2/2]

template<class TT >
sophus::PointTransformer< TT >::PointTransformer ( sophus::Isometry3< TT > const &  foo_from_bar)
inlineexplicit

Member Function Documentation

◆ barOriginInFoo()

template<class TT >
auto sophus::PointTransformer< TT >::barOriginInFoo ( ) const -> Eigen::Matrix<TT, 3, 1> const&
inline

◆ dxProjExpXTransformPointAt0()

template<class TT >
auto sophus::PointTransformer< TT >::dxProjExpXTransformPointAt0 ( InverseDepthPoint3< TT > const &  inverse_depth_point_in_bar) const -> Eigen::Matrix<TT, 2, 6>
inline

Returns pose derivative of inverse depth point projection at the identity:

Dx proj(exp(x) * foo_from_bar * foo_in_bar.toEuclideanPoint3()) at x=0

with foo_in_bar = (a,b,psi) being an inverse depth point.

◆ dxProjTransformX()

template<class TT >
auto sophus::PointTransformer< TT >::dxProjTransformX ( InverseDepthPoint3< TT > const &  inverse_depth_point_in_bar) const -> Eigen::Matrix<TT, 2, 3>
inline

◆ fooFromBar()

template<class TT >
auto sophus::PointTransformer< TT >::fooFromBar ( ) const -> sophus::Isometry3<TT> const&
inline

◆ fooRotationBar()

template<class TT >
auto sophus::PointTransformer< TT >::fooRotationBar ( ) const -> Eigen::Matrix<TT, 3, 3> const&
inline

◆ projTransform() [1/2]

template<class TT >
auto sophus::PointTransformer< TT >::projTransform ( Eigen::Matrix< TT, 3, 1 > const &  point_in_bar) const -> Eigen::Matrix<TT, 2, 1>
inline

Transforms 3-point in frame bar to foo and projects it onto the Euclidean plane z=1 in foo.

◆ projTransform() [2/2]

template<class TT >
auto sophus::PointTransformer< TT >::projTransform ( InverseDepthPoint3< TT > const &  inverse_depth_point_in_bar) const -> Eigen::Matrix<TT, 2, 1>
inline

Transforms and projects the 3d inverse depth point in frame bar to the Euclidean plane z=1 in foo.

◆ scaledTransform()

template<class TT >
auto sophus::PointTransformer< TT >::scaledTransform ( InverseDepthPoint3< TT > const &  inverse_depth_point_in_bar) const -> Eigen::Matrix<TT, 3, 1>
inline

◆ transform()

template<class TT >
auto sophus::PointTransformer< TT >::transform ( Eigen::Matrix< TT, 3, 1 > const &  point_in_bar) const -> Eigen::Matrix<TT, 3, 1>
inline

Transforms a 3-point from frame bar to frame foo.


The documentation for this class was generated from the following file: