From c1d174c103777069382054dba1e667677a9046a0 Mon Sep 17 00:00:00 2001 From: jcarpent <jcarpent@laas.fr> Date: Wed, 27 Jul 2016 19:41:03 +0200 Subject: [PATCH] Minot clean --- src/multibody/joint/joint-basic-visitors.hpp | 2 +- src/multibody/joint/joint-basic-visitors.hxx | 5 +---- src/multibody/joint/joint-spherical-ZYX.hpp | 21 ++++++++++---------- unittest/joint.cpp | 5 ----- 4 files changed, 13 insertions(+), 20 deletions(-) diff --git a/src/multibody/joint/joint-basic-visitors.hpp b/src/multibody/joint/joint-basic-visitors.hpp index 38f13ed22..c1e15ec9d 100644 --- a/src/multibody/joint/joint-basic-visitors.hpp +++ b/src/multibody/joint/joint-basic-visitors.hpp @@ -324,7 +324,7 @@ namespace se3 * @return The U*D^{-1} matrix of the inertia matrix decomposition */ inline Eigen::Matrix<double,6,Eigen::Dynamic> udinv_inertia(const JointDataVariant & jdata); - + } // namespace se3 diff --git a/src/multibody/joint/joint-basic-visitors.hxx b/src/multibody/joint/joint-basic-visitors.hxx index 113c8f97e..616442203 100644 --- a/src/multibody/joint/joint-basic-visitors.hxx +++ b/src/multibody/joint/joint-basic-visitors.hxx @@ -18,9 +18,6 @@ #ifndef __se3_joint_basic_visitors_hxx__ #define __se3_joint_basic_visitors_hxx__ -// remove the includes ? -#include <Eigen/StdVector> -#include <boost/variant.hpp> #include "pinocchio/assert.hpp" #include "pinocchio/multibody/joint/joint-variant.hpp" #include "pinocchio/multibody/visitor.hpp" @@ -142,7 +139,7 @@ namespace se3 inline double finiteDifferenceIncrement(const JointModelVariant & jmodel) { return JointEpsVisitor::run(jmodel); } - + /** * @brief JointIntegrateVisitor */ diff --git a/src/multibody/joint/joint-spherical-ZYX.hpp b/src/multibody/joint/joint-spherical-ZYX.hpp index c0d776934..2410b5dc0 100644 --- a/src/multibody/joint/joint-spherical-ZYX.hpp +++ b/src/multibody/joint/joint-spherical-ZYX.hpp @@ -69,18 +69,19 @@ namespace se3 struct MotionSpherical { - MotionSpherical () {w.fill(NAN);} - MotionSpherical (const typename MotionTpl<Scalar,Options>::Vector3 & w) : w (w) {} - typename MotionTpl<Scalar,Options>::Vector3 w; + typedef typename MotionTpl<Scalar,Options>::Vector3 Vector3; + + MotionSpherical () : w(Vector3::Constant(NAN)) {} + MotionSpherical (const Vector3 & w) : w (w) {} - typename MotionTpl<Scalar,Options>::Vector3 & operator() () { return w; } - const typename MotionTpl<Scalar,Options>::Vector3 & operator() () const { return w; } + Vector3 & operator() () { return w; } + const Vector3 & operator() () const { return w; } - operator Motion() const - { - //return Motion (typename MotionTpl<_Scalar,_Options>::Vector3::Zero (), w); - return Motion ( Motion::Vector3::Zero (), w); - } + operator Motion() const { return Motion(Motion::Vector3::Zero(), w); } + + operator Vector3() const { return w; } + + Vector3 w; }; // struct MotionSpherical inline friend const MotionSpherical operator+ (const MotionSpherical & m, const BiasSpherical & c) diff --git a/unittest/joint.cpp b/unittest/joint.cpp index c232abf52..3cb9c62f2 100644 --- a/unittest/joint.cpp +++ b/unittest/joint.cpp @@ -119,11 +119,6 @@ BOOST_AUTO_TEST_SUITE ( JointTest) BOOST_AUTO_TEST_CASE ( test_all_joints ) { using namespace se3; - - Model model; - buildModels::humanoidSimple(model); - Data data(model); - boost::mpl::for_each<JointModelVariant::types>(TestJoint()); } BOOST_AUTO_TEST_SUITE_END () -- GitLab