From 057bd8ce6a5746a449df66ccf66fad0d3a559153 Mon Sep 17 00:00:00 2001 From: gaschler Date: Fri, 12 Jan 2018 21:46:47 +0100 Subject: [PATCH] Public SpaCostFunction::Compute* (#814) --- cartographer/mapping_2d/pose_graph/spa_cost_function.h | 6 +++--- cartographer/mapping_3d/pose_graph/spa_cost_function.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cartographer/mapping_2d/pose_graph/spa_cost_function.h b/cartographer/mapping_2d/pose_graph/spa_cost_function.h index 95969af..3ea80ad 100644 --- a/cartographer/mapping_2d/pose_graph/spa_cost_function.h +++ b/cartographer/mapping_2d/pose_graph/spa_cost_function.h @@ -50,9 +50,6 @@ class SpaCostFunction { return true; } - private: - explicit SpaCostFunction(const Constraint::Pose& pose) : pose_(pose) {} - // Computes the error between the node-to-submap alignment 'zbar_ij' and the // difference of submap pose 'c_i' and node pose 'c_j' which are both in an // arbitrary common frame. @@ -86,6 +83,9 @@ class SpaCostFunction { e[2] = e_ij[2] * T(pose.rotation_weight); } + private: + explicit SpaCostFunction(const Constraint::Pose& pose) : pose_(pose) {} + const Constraint::Pose pose_; }; diff --git a/cartographer/mapping_3d/pose_graph/spa_cost_function.h b/cartographer/mapping_3d/pose_graph/spa_cost_function.h index 1139191..6fe0b95 100644 --- a/cartographer/mapping_3d/pose_graph/spa_cost_function.h +++ b/cartographer/mapping_3d/pose_graph/spa_cost_function.h @@ -53,9 +53,6 @@ class SpaCostFunction { return true; } - private: - explicit SpaCostFunction(const Constraint::Pose& pose) : pose_(pose) {} - // Computes the error between the node-to-submap alignment 'zbar_ij' and the // difference of submap pose 'c_i' and node pose 'c_j' which are both in an // arbitrary common frame. @@ -108,6 +105,9 @@ class SpaCostFunction { } } + private: + explicit SpaCostFunction(const Constraint::Pose& pose) : pose_(pose) {} + const Constraint::Pose pose_; };