orocos_kdl
jntarrayvel.hpp
Go to the documentation of this file.
1 // Copyright (C) 2007 Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
2 
3 // Version: 1.0
4 // Author: Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
5 // Maintainer: Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
6 // URL: http://www.orocos.org/kdl
7 
8 // This library is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU Lesser General Public
10 // License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 
22 #ifndef KDL_JNTARRAYVEL_HPP
23 #define KDL_JNTARRAYVEL_HPP
24 
25 #include "utilities/utility.h"
26 #include "jntarray.hpp"
27 #include "framevel.hpp"
28 
29 namespace KDL
30 {
31  // Equal is friend function, but default arguments for friends are forbidden (ยง8.3.6.4)
32  class JntArrayVel;
33  bool Equal(const JntArrayVel& src1,const JntArrayVel& src2,double eps=epsilon);
34  void Add(const JntArrayVel& src1,const JntArrayVel& src2,JntArrayVel& dest);
35  void Add(const JntArrayVel& src1,const JntArray& src2,JntArrayVel& dest);
36  void Subtract(const JntArrayVel& src1,const JntArrayVel& src2,JntArrayVel& dest);
37  void Subtract(const JntArrayVel& src1,const JntArray& src2,JntArrayVel& dest);
38  void Multiply(const JntArrayVel& src,const double& factor,JntArrayVel& dest);
39  void Multiply(const JntArrayVel& src,const doubleVel& factor,JntArrayVel& dest);
40  void Divide(const JntArrayVel& src,const double& factor,JntArrayVel& dest);
41  void Divide(const JntArrayVel& src,const doubleVel& factor,JntArrayVel& dest);
42  void SetToZero(JntArrayVel& array);
43 
44 
46  {
47  public:
50  public:
52  explicit JntArrayVel(unsigned int size);
53  JntArrayVel(const JntArray& q,const JntArray& qdot);
54  explicit JntArrayVel(const JntArray& q);
55 
56  void resize(unsigned int newSize);
57 
58  JntArray value()const;
59  JntArray deriv()const;
60 
61  friend void Add(const JntArrayVel& src1,const JntArrayVel& src2,JntArrayVel& dest);
62  friend void Add(const JntArrayVel& src1,const JntArray& src2,JntArrayVel& dest);
63  friend void Subtract(const JntArrayVel& src1,const JntArrayVel& src2,JntArrayVel& dest);
64  friend void Subtract(const JntArrayVel& src1,const JntArray& src2,JntArrayVel& dest);
65  friend void Multiply(const JntArrayVel& src,const double& factor,JntArrayVel& dest);
66  friend void Multiply(const JntArrayVel& src,const doubleVel& factor,JntArrayVel& dest);
67  friend void Divide(const JntArrayVel& src,const double& factor,JntArrayVel& dest);
68  friend void Divide(const JntArrayVel& src,const doubleVel& factor,JntArrayVel& dest);
69  friend void SetToZero(JntArrayVel& array);
70  friend bool Equal(const JntArrayVel& src1,const JntArrayVel& src2,double eps);
71 
72  };
73 
74 }
75 
76 #endif
KDL::JntArray
Definition: jntarray.hpp:69
KDL::Subtract
void Subtract(const JntArray &src1, const JntArray &src2, JntArray &dest)
Definition: jntarray.cpp:85
jntarray.hpp
KDL::Add
void Add(const JntArray &src1, const JntArray &src2, JntArray &dest)
Definition: jntarray.cpp:80
KDL::JntArrayVel::Multiply
friend void Multiply(const JntArrayVel &src, const double &factor, JntArrayVel &dest)
Definition: jntarrayvel.cpp:79
utility.h
KDL::JntArrayVel::resize
void resize(unsigned int newSize)
Definition: jntarrayvel.cpp:41
KDL::Multiply
void Multiply(const JntArray &src, const double &factor, JntArray &dest)
Definition: jntarray.cpp:90
KDL
Definition: kukaLWR_DHnew.cpp:25
KDL::JntArrayVel::SetToZero
friend void SetToZero(JntArrayVel &array)
Definition: jntarrayvel.cpp:105
KDL::JntArrayVel::JntArrayVel
JntArrayVel()
Definition: jntarrayvel.hpp:51
KDL::epsilon
double epsilon
default precision while comparing with Equal(..,..) functions. Initialized at 0.0000001.
Definition: utility.cxx:21
framevel.hpp
KDL::JntArrayVel::Equal
friend bool Equal(const JntArrayVel &src1, const JntArrayVel &src2, double eps)
Definition: jntarrayvel.cpp:111
KDL::Divide
void Divide(const JntArray &src, const double &factor, JntArray &dest)
Definition: jntarray.cpp:95
KDL::doubleVel
Rall1d< double > doubleVel
Definition: framevel.hpp:55
KDL::JntArrayVel::value
JntArray value() const
Definition: jntarrayvel.cpp:47
KDL::JntArrayVel::Subtract
friend void Subtract(const JntArrayVel &src1, const JntArrayVel &src2, JntArrayVel &dest)
Definition: jntarrayvel.cpp:68
KDL::JntArrayVel::Divide
friend void Divide(const JntArrayVel &src, const double &factor, JntArrayVel &dest)
Definition: jntarrayvel.cpp:92
KDL::JntArrayVel
Definition: jntarrayvel.hpp:45
KDL::JntArrayVel::deriv
JntArray deriv() const
Definition: jntarrayvel.cpp:52
KDL::Rall1d
Definition: rall1d.h:71
KDL::Equal
IMETHOD bool Equal(const FrameAcc &r1, const FrameAcc &r2, double eps=epsilon)
KDL::JntArrayVel::qdot
JntArray qdot
Definition: jntarrayvel.hpp:49
KDL::JntArrayVel::Add
friend void Add(const JntArrayVel &src1, const JntArrayVel &src2, JntArrayVel &dest)
Definition: jntarrayvel.cpp:57
KDL::SetToZero
void SetToZero(Jacobian &jac)
Definition: jacobian.cpp:79
KDL::JntArrayVel::q
JntArray q
Definition: jntarrayvel.hpp:48