From fb49d238616133d4255996caa33e8042cad42edb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Sol=C3=A0?= <jsola@iri.upc.edu> Date: Fri, 24 May 2019 19:40:40 +0200 Subject: [PATCH] replace Affine --> Isometry --- hello_wolf/factor_bearing.h | 2 +- hello_wolf/factor_range_bearing.h | 6 +++--- hello_wolf/processor_range_bearing.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hello_wolf/factor_bearing.h b/hello_wolf/factor_bearing.h index 56857fe0a..1b5ff4049 100644 --- a/hello_wolf/factor_bearing.h +++ b/hello_wolf/factor_bearing.h @@ -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 - 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<const Matrix<T, 2, 1>> point_w(_p2); Map<const Matrix<T, 1, 1>> res(_res); diff --git a/hello_wolf/factor_range_bearing.h b/hello_wolf/factor_range_bearing.h index c4a321bad..ffe896f75 100644 --- a/hello_wolf/factor_range_bearing.h +++ b/hello_wolf/factor_range_bearing.h @@ -97,11 +97,11 @@ inline bool FactorRangeBearing::operator ()(const T* const _p_w_r, // robot posi Map<Matrix<T, 2, 1>> res(_res); // residual // 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, 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_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_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 - 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 // 3. Get the expected range-and-bearing of the point diff --git a/hello_wolf/processor_range_bearing.h b/hello_wolf/processor_range_bearing.h index 30b2bd865..00592e5d6 100644 --- a/hello_wolf/processor_range_bearing.h +++ b/hello_wolf/processor_range_bearing.h @@ -30,7 +30,7 @@ WOLF_PTR_TYPEDEFS(ProcessorRangeBearing); class ProcessorRangeBearing : public ProcessorBase { public: - typedef Eigen::Transform<Scalar, 2, Eigen::Affine> Trf; + typedef Eigen::Transform<Scalar, 2, Eigen::Isometry> Trf; ProcessorRangeBearing(const SensorRangeBearingPtr _sensor_ptr, ProcessorParamsBasePtr _params); virtual ~ProcessorRangeBearing() {/* empty */} -- GitLab