orocos_kdl
segment.hpp
Go to the documentation of this file.
1 // Copyright (C) 2007 Ruben Smits <ruben dot smits at intermodalics dot eu>
2 
3 // Version: 1.0
4 // Author: Ruben Smits <ruben dot smits at intermodalics dot eu>
5 // Maintainer: Ruben Smits <ruben dot smits at intermodalics dot eu>
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 
23 #ifndef KDL_SEGMENT_HPP
24 #define KDL_SEGMENT_HPP
25 
26 #include "frames.hpp"
27 #include "rigidbodyinertia.hpp"
28 #include "joint.hpp"
29 #include <vector>
30 
31 namespace KDL {
32 
46  class Segment {
47  friend class Chain;
48  private:
53 
54  public:
76  Segment(const Segment& in);
77  Segment& operator=(const Segment& arg);
78 
79  virtual ~Segment();
80 
88  Frame pose(const double& q)const;
100  Twist twist(const double& q,const double& qdot)const;
101 
108  const std::string& getName()const
109  {
110  return name;
111  }
118  const Joint& getJoint()const
119  {
120  return joint;
121  }
129  {
130  return I;
131  }
138  void setInertia(const RigidBodyInertia& Iin)
139  {
140  this->I=Iin;
141  }
142 
150  {
151 
152  return joint.pose(0)*f_tip;
153  }
154 
161  void setFrameToTip(const Frame& f_tip_new);
162 
170  const Frame& getFrameToTipZero() const
171  {
172  return f_tip;
173  }
174  };
175 }//end of namespace KDL
176 
177 #endif
frames.hpp
KDL::Frame::Identity
static Frame Identity()
Definition: frames.inl:700
KDL::Segment::f_tip
Frame f_tip
Definition: segment.hpp:52
std::string
KDL::Segment::getJoint
const Joint & getJoint() const
Definition: segment.hpp:118
vector
KDL::Joint::Fixed
@ Fixed
Definition: joint.hpp:47
KDL::Segment::I
RigidBodyInertia I
Definition: segment.hpp:51
KDL::Segment::setFrameToTip
void setFrameToTip(const Frame &f_tip_new)
Definition: segment.cpp:67
KDL::RigidBodyInertia
6D Inertia of a rigid body
Definition: rigidbodyinertia.hpp:37
KDL::Segment::joint
Joint joint
Definition: segment.hpp:50
KDL
Definition: kukaLWR_DHnew.cpp:25
KDL::Joint::pose
Frame pose(const double &q) const
Definition: joint.cpp:68
KDL::Twist
represents both translational and rotational velocities.
Definition: frames.hpp:723
rigidbodyinertia.hpp
KDL::Segment::getFrameToTipZero
const Frame & getFrameToTipZero() const
Definition: segment.hpp:170
KDL::Segment::pose
Frame pose(const double &q) const
Definition: segment.cpp:57
KDL::Frame
represents a frame transformation in 3D space (rotation + translation)
Definition: frames.hpp:572
KDL::Segment::getFrameToTip
Frame getFrameToTip() const
Definition: segment.hpp:149
KDL::Segment::setInertia
void setInertia(const RigidBodyInertia &Iin)
Definition: segment.hpp:138
KDL::Segment::twist
Twist twist(const double &q, const double &qdot) const
Definition: segment.cpp:62
KDL::RigidBodyInertia::Zero
static RigidBodyInertia Zero()
Definition: rigidbodyinertia.hpp:49
KDL::Segment
This class encapsulates a simple segment, that is a "rigid body" (i.e., a frame and a rigid body ine...
Definition: segment.hpp:46
KDL::Segment::getName
const std::string & getName() const
Definition: segment.hpp:108
KDL::Segment::~Segment
virtual ~Segment()
Definition: segment.cpp:53
KDL::Segment::operator=
Segment & operator=(const Segment &arg)
Definition: segment.cpp:44
KDL::Joint
This class encapsulates a simple joint, that is with one parameterized degree of freedom and with sca...
Definition: joint.hpp:45
KDL::Segment::name
std::string name
Definition: segment.hpp:49
KDL::Chain
This class encapsulates a serial kinematic interconnection structure. It is built out of segments.
Definition: chain.hpp:35
KDL::Segment::getInertia
const RigidBodyInertia & getInertia() const
Definition: segment.hpp:128
joint.hpp
KDL::Segment::Segment
Segment(const std::string &name, const Joint &joint=Joint(Joint::Fixed), const Frame &f_tip=Frame::Identity(), const RigidBodyInertia &I=RigidBodyInertia::Zero())
Definition: segment.cpp:24