Blender  V3.3
chain.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_CHAIN_HPP
23 #define KDL_CHAIN_HPP
24 
25 #include "segment.hpp"
26 #include <string>
27 #include <Eigen/StdVector>
28 
29 namespace KDL {
36  class Chain {
37  private:
38  // Eigen allocator is needed for alignment of Eigen data types
39  std::vector<Segment, Eigen::aligned_allocator<Segment> > segments;
40  unsigned int nrOfJoints;
41  unsigned int nrOfSegments;
42  public:
47  Chain();
48  Chain(const Chain& in);
49  Chain& operator = (const Chain& arg);
50 
56  void addSegment(const Segment& segment);
63  void addChain(const Chain& chain);
64 
73  unsigned int getNrOfJoints()const {return nrOfJoints;};
78  unsigned int getNrOfSegments()const {return nrOfSegments;};
79 
88  const Segment& getSegment(unsigned int nr)const;
89 
90  virtual ~Chain();
91  };
92 
93 
94 
95 }//end of namespace KDL
96 
97 #endif
This class encapsulates a serial kinematic interconnection structure. It is build out of segments.
Definition: chain.hpp:36
void addChain(const Chain &chain)
Definition: chain.cpp:62
const Segment & getSegment(unsigned int nr) const
Definition: chain.cpp:68
unsigned int getNrOfJoints() const
Definition: chain.hpp:73
virtual ~Chain()
Definition: chain.cpp:73
Chain & operator=(const Chain &arg)
Definition: chain.cpp:44
void addSegment(const Segment &segment)
Definition: chain.cpp:55
unsigned int getNrOfSegments() const
Definition: chain.hpp:78
This class encapsulates a simple segment, that is a "rigid body" (i.e., a frame and an inertia) with...
Definition: segment.hpp:46
Segment< FEdge *, Vec3r > segment
Definition: chain.cpp:27