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
void Subtract(const JntArray &src1, const JntArray &src2, JntArray &dest)
Definition: jntarray.cpp:87
void Divide(const JntArray &src, const double &factor, JntArray &dest)
Definition: jntarray.cpp:97
friend void SetToZero(JntArrayVel &array)
This class represents an fixed size array containing joint values of a KDL::Chain.
Definition: jntarray.hpp:69
JntArray value() const
Definition: jntarrayvel.cpp:47
friend void Divide(const JntArrayVel &src, const double &factor, JntArrayVel &dest)
Definition: jntarrayvel.cpp:92
void Add(const JntArray &src1, const JntArray &src2, JntArray &dest)
Definition: jntarray.cpp:82
friend void Multiply(const JntArrayVel &src, const double &factor, JntArrayVel &dest)
Definition: jntarrayvel.cpp:79
friend void Subtract(const JntArrayVel &src1, const JntArrayVel &src2, JntArrayVel &dest)
Definition: jntarrayvel.cpp:68
IMETHOD void SetToZero(Vector &v)
Definition: frames.hpp:1069
IMETHOD bool Equal(const FrameAcc &r1, const FrameAcc &r2, double eps=epsilon)
Definition: frameacc.hpp:394
void resize(unsigned int newSize)
Definition: jntarrayvel.cpp:41
double epsilon
default precision while comparing with Equal(..,..) functions. Initialized at 0.0000001.
JntArray deriv() const
Definition: jntarrayvel.cpp:52
friend bool Equal(const JntArrayVel &src1, const JntArrayVel &src2, double eps)
friend void Add(const JntArrayVel &src1, const JntArrayVel &src2, JntArrayVel &dest)
Definition: jntarrayvel.cpp:57
Rall1d< double > doubleVel
Definition: framevel.hpp:36
void Multiply(const JntArray &src, const double &factor, JntArray &dest)
Definition: jntarray.cpp:92


orocos_kdl
Author(s):
autogenerated on Fri Mar 12 2021 03:05:43