Skip to content
Snippets Groups Projects
Commit fb49d238 authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

replace Affine --> Isometry

parent 6a377906
No related branches found
No related tags found
1 merge request!2replace Affine --> Isometry
...@@ -57,7 +57,7 @@ inline bool FactorBearing::operator ()(const T* const _p1, const T* const _o1, ...@@ -57,7 +57,7 @@ inline bool FactorBearing::operator ()(const T* const _p1, const T* const _o1,
{ {
// 1. produce a transformation matrix to transform from robot frame to world frame // 1. produce a transformation matrix to transform from robot frame to world frame
Transform<T, 2, Affine> H_w_r = Translation<T,2>(_p1[0], _p1[1]) * Rotation2D<T>(*_o1) ; // Robot frame = robot-to-world transform Transform<T, 2, Isometry> H_w_r = Translation<T,2>(_p1[0], _p1[1]) * Rotation2D<T>(*_o1) ; // Robot frame = robot-to-world transform
// Map input pointers into meaningful Eigen elements // Map input pointers into meaningful Eigen elements
Map<const Matrix<T, 2, 1>> point_w(_p2); Map<const Matrix<T, 2, 1>> point_w(_p2);
Map<const Matrix<T, 1, 1>> res(_res); Map<const Matrix<T, 1, 1>> res(_res);
......
...@@ -97,11 +97,11 @@ inline bool FactorRangeBearing::operator ()(const T* const _p_w_r, // robot posi ...@@ -97,11 +97,11 @@ inline bool FactorRangeBearing::operator ()(const T* const _p_w_r, // robot posi
Map<Matrix<T, 2, 1>> res(_res); // residual Map<Matrix<T, 2, 1>> res(_res); // residual
// 1. produce transformation matrices to transform from sensor frame --> to robot frame --> to world frame // 1. produce transformation matrices to transform from sensor frame --> to robot frame --> to world frame
Transform<T, 2, Affine> H_w_r = Translation<T,2>(_p_w_r[0], _p_w_r[1]) * Rotation2D<T>(*_o_w_r) ; // Robot frame = robot-to-world transform Transform<T, 2, Isometry> H_w_r = Translation<T,2>(_p_w_r[0], _p_w_r[1]) * Rotation2D<T>(*_o_w_r) ; // Robot frame = robot-to-world transform
Transform<T, 2, Affine> H_r_s = Translation<T,2>(_p_r_s[0], _p_r_s[1]) * Rotation2D<T>(*_o_r_s) ; // Sensor frame = sensor-to-robot transform Transform<T, 2, Isometry> H_r_s = Translation<T,2>(_p_r_s[0], _p_r_s[1]) * Rotation2D<T>(*_o_r_s) ; // Sensor frame = sensor-to-robot transform
// 2. Transform world-referenced landmark point to sensor-referenced point // 2. Transform world-referenced landmark point to sensor-referenced point
Transform<T, 2, Affine> H_w_s = H_w_r * H_r_s; // world-to-sensor transform Transform<T, 2, Isometry> H_w_s = H_w_r * H_r_s; // world-to-sensor transform
Matrix<T, 2, 1> lmk_s = H_w_s.inverse() * lmk; // point in sensor frame Matrix<T, 2, 1> lmk_s = H_w_s.inverse() * lmk; // point in sensor frame
// 3. Get the expected range-and-bearing of the point // 3. Get the expected range-and-bearing of the point
......
...@@ -30,7 +30,7 @@ WOLF_PTR_TYPEDEFS(ProcessorRangeBearing); ...@@ -30,7 +30,7 @@ WOLF_PTR_TYPEDEFS(ProcessorRangeBearing);
class ProcessorRangeBearing : public ProcessorBase class ProcessorRangeBearing : public ProcessorBase
{ {
public: public:
typedef Eigen::Transform<Scalar, 2, Eigen::Affine> Trf; typedef Eigen::Transform<Scalar, 2, Eigen::Isometry> Trf;
ProcessorRangeBearing(const SensorRangeBearingPtr _sensor_ptr, ProcessorParamsBasePtr _params); ProcessorRangeBearing(const SensorRangeBearingPtr _sensor_ptr, ProcessorParamsBasePtr _params);
virtual ~ProcessorRangeBearing() {/* empty */} virtual ~ProcessorRangeBearing() {/* empty */}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment