1515 * @author Frank Dellaert
1616 **/
1717
18- #include < gtsam/geometry/SO3.h>
19-
18+ #include < CppUnitLite/TestHarness.h>
2019#include < gtsam/base/Testable.h>
2120#include < gtsam/base/testLie.h>
21+ #include < gtsam/geometry/SO3.h>
2222
23- #include < boost/bind/bind.hpp>
24- #include < CppUnitLite/TestHarness.h>
25-
26- using namespace boost ::placeholders;
23+ using namespace std ::placeholders;
2724using namespace std ;
2825using namespace gtsam ;
2926
@@ -211,7 +208,7 @@ TEST(SO3, ExpmapDerivative) {
211208TEST (SO3, ExpmapDerivative2) {
212209 const Vector3 theta (0.1 , 0 , 0.1 );
213210 const Matrix Jexpected = numericalDerivative11<SO3, Vector3>(
214- boost ::bind (&SO3::Expmap, _1, boost::none), theta);
211+ std ::bind (&SO3::Expmap, std::placeholders:: _1, boost::none), theta);
215212
216213 CHECK (assert_equal (Jexpected, SO3::ExpmapDerivative (theta)));
217214 CHECK (assert_equal (Matrix3 (Jexpected.transpose ()),
@@ -222,7 +219,7 @@ TEST(SO3, ExpmapDerivative2) {
222219TEST (SO3, ExpmapDerivative3) {
223220 const Vector3 theta (10 , 20 , 30 );
224221 const Matrix Jexpected = numericalDerivative11<SO3, Vector3>(
225- boost ::bind (&SO3::Expmap, _1, boost::none), theta);
222+ std ::bind (&SO3::Expmap, std::placeholders:: _1, boost::none), theta);
226223
227224 CHECK (assert_equal (Jexpected, SO3::ExpmapDerivative (theta)));
228225 CHECK (assert_equal (Matrix3 (Jexpected.transpose ()),
@@ -277,7 +274,7 @@ TEST(SO3, ExpmapDerivative5) {
277274TEST (SO3, ExpmapDerivative6) {
278275 const Vector3 thetahat (0.1 , 0 , 0.1 );
279276 const Matrix Jexpected = numericalDerivative11<SO3, Vector3>(
280- boost ::bind (&SO3::Expmap, _1, boost::none), thetahat);
277+ std ::bind (&SO3::Expmap, std::placeholders:: _1, boost::none), thetahat);
281278 Matrix3 Jactual;
282279 SO3::Expmap (thetahat, Jactual);
283280 EXPECT (assert_equal (Jexpected, Jactual));
@@ -288,7 +285,7 @@ TEST(SO3, LogmapDerivative) {
288285 const Vector3 thetahat (0.1 , 0 , 0.1 );
289286 const SO3 R = SO3::Expmap (thetahat); // some rotation
290287 const Matrix Jexpected = numericalDerivative11<Vector, SO3>(
291- boost ::bind (&SO3::Logmap, _1, boost::none), R);
288+ std ::bind (&SO3::Logmap, std::placeholders:: _1, boost::none), R);
292289 const Matrix3 Jactual = SO3::LogmapDerivative (thetahat);
293290 EXPECT (assert_equal (Jexpected, Jactual));
294291}
@@ -298,7 +295,7 @@ TEST(SO3, JacobianLogmap) {
298295 const Vector3 thetahat (0.1 , 0 , 0.1 );
299296 const SO3 R = SO3::Expmap (thetahat); // some rotation
300297 const Matrix Jexpected = numericalDerivative11<Vector, SO3>(
301- boost ::bind (&SO3::Logmap, _1, boost::none), R);
298+ std ::bind (&SO3::Logmap, std::placeholders:: _1, boost::none), R);
302299 Matrix3 Jactual;
303300 SO3::Logmap (R, Jactual);
304301 EXPECT (assert_equal (Jexpected, Jactual));
@@ -308,7 +305,7 @@ TEST(SO3, JacobianLogmap) {
308305TEST (SO3, ApplyDexp) {
309306 Matrix aH1, aH2;
310307 for (bool nearZeroApprox : {true , false }) {
311- boost ::function<Vector3 (const Vector3&, const Vector3&)> f =
308+ std ::function<Vector3 (const Vector3&, const Vector3&)> f =
312309 [=](const Vector3& omega, const Vector3& v) {
313310 return so3::DexpFunctor (omega, nearZeroApprox).applyDexp (v);
314311 };
@@ -331,7 +328,7 @@ TEST(SO3, ApplyDexp) {
331328TEST (SO3, ApplyInvDexp) {
332329 Matrix aH1, aH2;
333330 for (bool nearZeroApprox : {true , false }) {
334- boost ::function<Vector3 (const Vector3&, const Vector3&)> f =
331+ std ::function<Vector3 (const Vector3&, const Vector3&)> f =
335332 [=](const Vector3& omega, const Vector3& v) {
336333 return so3::DexpFunctor (omega, nearZeroApprox).applyInvDexp (v);
337334 };
@@ -357,7 +354,7 @@ TEST(SO3, vec) {
357354 Matrix actualH;
358355 const Vector9 actual = R2.vec (actualH);
359356 CHECK (assert_equal (expected, actual));
360- boost ::function<Vector9 (const SO3&)> f = [](const SO3& Q) { return Q.vec (); };
357+ std ::function<Vector9 (const SO3&)> f = [](const SO3& Q) { return Q.vec (); };
361358 const Matrix numericalH = numericalDerivative11 (f, R2, 1e-5 );
362359 CHECK (assert_equal (numericalH, actualH));
363360}
@@ -371,7 +368,7 @@ TEST(Matrix, compose) {
371368 Matrix actualH;
372369 const Matrix3 actual = so3::compose (M, R, actualH);
373370 CHECK (assert_equal (expected, actual));
374- boost ::function<Matrix3 (const Matrix3&)> f = [R](const Matrix3& M) {
371+ std ::function<Matrix3 (const Matrix3&)> f = [R](const Matrix3& M) {
375372 return so3::compose (M, R);
376373 };
377374 Matrix numericalH = numericalDerivative11 (f, M, 1e-2 );
0 commit comments