From 14b582d268bc45661824b04c8978deac597ee0e4 Mon Sep 17 00:00:00 2001 From: Paul Furgale Date: Tue, 25 Nov 2014 06:42:36 +0100 Subject: [PATCH] cleaned up the code a bit --- .../nonlinear/tests/testCustomChartExpression.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gtsam_unstable/nonlinear/tests/testCustomChartExpression.cpp b/gtsam_unstable/nonlinear/tests/testCustomChartExpression.cpp index bfd2574ea..02c1803b6 100644 --- a/gtsam_unstable/nonlinear/tests/testCustomChartExpression.cpp +++ b/gtsam_unstable/nonlinear/tests/testCustomChartExpression.cpp @@ -32,12 +32,17 @@ using boost::assign::map_list_of; using namespace std; using namespace gtsam; -// Dynamically sized Vector - +// A simple prototype custom chart that does two things: +// 1. it reduces the dimension of the variable being estimated +// 2. it scales the input to retract. +// +// The Jacobian of this chart is: +// [ 2 0 ] +// [ 0 3 ] +// [ 0 0 ] struct ProjectionChart { typedef Eigen::Vector3d type; typedef Eigen::Vector2d vector; - enum { dimension = 2 }; static vector local(const type& origin, const type& other) { return (other - origin).head<2>(); } @@ -57,7 +62,6 @@ template<> struct dimension : public boost::integral_constant point(1);