jntarray.hpp
Go to the documentation of this file.
00001 // Copyright  (C)  2007  Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
00002 
00003 // Version: 1.0
00004 // Author: Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
00005 // Maintainer: Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
00006 // URL: http://www.orocos.org/kdl
00007 
00008 // This library is free software; you can redistribute it and/or
00009 // modify it under the terms of the GNU Lesser General Public
00010 // License as published by the Free Software Foundation; either
00011 // version 2.1 of the License, or (at your option) any later version.
00012 
00013 // This library is distributed in the hope that it will be useful,
00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016 // Lesser General Public License for more details.
00017 
00018 // You should have received a copy of the GNU Lesser General Public
00019 // License along with this library; if not, write to the Free Software
00020 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00021 
00022 #ifndef KDL_JNTARRAY_HPP
00023 #define KDL_JNTARRAY_HPP
00024 
00025 #include "frames.hpp"
00026 #include "jacobian.hpp"
00027 
00028 #include <Eigen/Core>
00029 
00030 namespace KDL
00031 {
00069     class JntArray
00070     {
00071     public:
00072         Eigen::VectorXd data;
00073 
00081         JntArray();
00092         explicit JntArray(unsigned int size);
00093 
00097         JntArray(const JntArray& arg);
00098         ~JntArray();
00108         void resize(unsigned int newSize);
00109                 
00110         JntArray& operator = ( const JntArray& arg);
00119         double operator()(unsigned int i,unsigned int j=0)const;
00128         double& operator()(unsigned int i,unsigned int j=0);
00133         unsigned int rows()const;
00137         unsigned int columns()const;
00138 
00139         friend void Add(const JntArray& src1,const JntArray& src2,JntArray& dest);
00140         friend void Subtract(const JntArray& src1,const JntArray& src2,JntArray& dest);
00141         friend void Multiply(const JntArray& src,const double& factor,JntArray& dest);
00142         friend void Divide(const JntArray& src,const double& factor,JntArray& dest);
00143         friend void MultiplyJacobian(const Jacobian& jac, const JntArray& src, Twist& dest);
00144         friend void SetToZero(JntArray& array);
00145         friend bool Equal(const JntArray& src1,const JntArray& src2,double eps);
00146 
00147         friend bool operator==(const JntArray& src1,const JntArray& src2);
00148         //friend bool operator!=(const JntArray& src1,const JntArray& src2);
00149         };
00150 
00151     bool operator==(const JntArray& src1,const JntArray& src2);
00152     //bool operator!=(const JntArray& src1,const JntArray& src2);
00153 
00163     void Add(const JntArray& src1,const JntArray& src2,JntArray& dest);
00173     void Subtract(const JntArray& src1,const JntArray& src2,JntArray& dest);
00183     void Multiply(const JntArray& src,const double& factor,JntArray& dest);
00193     void Divide(const JntArray& src,const double& factor,JntArray& dest);
00206     void MultiplyJacobian(const Jacobian& jac, const JntArray& src, Twist& dest);
00212     void SetToZero(JntArray& array);
00223     bool Equal(const JntArray& src1,const JntArray& src2,double eps=epsilon);
00224 
00225 }
00226 
00227 #endif


orocos_kdl
Author(s):
autogenerated on Fri Jun 14 2019 19:33:22