jacobian.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_JACOBIAN_HPP
23 #define KDL_JACOBIAN_HPP
24 
25 #include "frames.hpp"
26 #include <Eigen/Core>
27 
28 namespace KDL
29 {
30  // Equal is friend function, but default arguments for friends are forbidden (ยง8.3.6.4)
31  class Jacobian;
32  bool Equal(const Jacobian& a,const Jacobian& b,double eps=epsilon);
33  void SetToZero(Jacobian& jac);
34 
35 
36  class Jacobian
37  {
38  public:
39 
40  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
41  Eigen::Matrix<double,6,Eigen::Dynamic> data;
42  Jacobian();
43  explicit Jacobian(unsigned int nr_of_columns);
44  Jacobian(const Jacobian& arg);
45 
47  void resize(unsigned int newNrOfColumns);
48 
50  Jacobian& operator=(const Jacobian& arg);
51 
52  bool operator ==(const Jacobian& arg)const;
53  bool operator !=(const Jacobian& arg)const;
54 
55  friend bool Equal(const Jacobian& a,const Jacobian& b,double eps);
56 
57 
58  ~Jacobian();
59 
60  double operator()(unsigned int i,unsigned int j)const;
61  double& operator()(unsigned int i,unsigned int j);
62  unsigned int rows()const;
63  unsigned int columns()const;
64 
65  friend void SetToZero(Jacobian& jac);
66 
67  friend bool changeRefPoint(const Jacobian& src1, const Vector& base_AB, Jacobian& dest);
68  friend bool changeBase(const Jacobian& src1, const Rotation& rot, Jacobian& dest);
69  friend bool changeRefFrame(const Jacobian& src1,const Frame& frame, Jacobian& dest);
70 
71  Twist getColumn(unsigned int i) const;
72  void setColumn(unsigned int i,const Twist& t);
73 
74  void changeRefPoint(const Vector& base_AB);
75  void changeBase(const Rotation& rot);
76  void changeRefFrame(const Frame& frame);
77 
78 
79  };
80 
81  bool changeRefPoint(const Jacobian& src1, const Vector& base_AB, Jacobian& dest);
82  bool changeBase(const Jacobian& src1, const Rotation& rot, Jacobian& dest);
83  bool changeRefFrame(const Jacobian& src1,const Frame& frame, Jacobian& dest);
84 
85 
86 }
87 
88 #endif
represents rotations in 3 dimensional space.
Definition: frames.hpp:301
void resize(unsigned int newNrOfColumns)
Allocates memory for new size (can break realtime behavior)
Definition: jacobian.cpp:56
friend void SetToZero(Jacobian &jac)
Definition: jacobian.cpp:81
double operator()(unsigned int i, unsigned int j) const
Definition: jacobian.cpp:61
unsigned int columns() const
Definition: jacobian.cpp:76
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Eigen::Matrix< double, 6, Eigen::Dynamic > data
Definition: jacobian.hpp:41
bool operator==(const Jacobian &arg) const
Definition: jacobian.cpp:128
represents both translational and rotational velocities.
Definition: frames.hpp:720
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
A concrete implementation of a 3 dimensional vector class.
Definition: frames.hpp:160
double epsilon
default precision while comparing with Equal(..,..) functions. Initialized at 0.0000001.
void setColumn(unsigned int i, const Twist &t)
Definition: jacobian.cpp:150
friend bool changeBase(const Jacobian &src1, const Rotation &rot, Jacobian &dest)
Definition: jacobian.cpp:105
friend bool changeRefFrame(const Jacobian &src1, const Frame &frame, Jacobian &dest)
Definition: jacobian.cpp:119
friend bool changeRefPoint(const Jacobian &src1, const Vector &base_AB, Jacobian &dest)
Definition: jacobian.cpp:91
Twist getColumn(unsigned int i) const
Definition: jacobian.cpp:146
Jacobian & operator=(const Jacobian &arg)
Allocates memory if size of this and argument is different.
Definition: jacobian.cpp:44
represents a frame transformation in 3D space (rotation + translation)
Definition: frames.hpp:570
friend bool Equal(const Jacobian &a, const Jacobian &b, double eps)
Definition: jacobian.cpp:138
unsigned int rows() const
Definition: jacobian.cpp:71
bool operator!=(const Jacobian &arg) const
Definition: jacobian.cpp:133


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