Blender V4.3
segment.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
23#ifndef KDL_SEGMENT_HPP
24#define KDL_SEGMENT_HPP
25
26#include "frames.hpp"
27#include "inertia.hpp"
28#include "joint.hpp"
29#include <vector>
30
31namespace KDL {
32
46 class Segment {
47 friend class Chain;
48 private:
49 Inertia M;
50 Joint joint;
51 Frame f_tip;
52
53 public:
63 Segment(const Joint& joint=Joint(), const Frame& f_tip=Frame::Identity(),const Inertia& M = Inertia::Zero());
64 Segment(const Segment& in);
65 Segment& operator=(const Segment& arg);
66
67 virtual ~Segment();
68
76 Frame pose(const double* q)const;
88 Twist twist(const double* q,const double& qdot, int dof=0)const;
89
100 Twist twist(const Vector& p, const double& qdot, int dof=0)const;
101
112 Twist twist(const Frame& f, const double& qdot, int dof)const;
113
120 const Joint& getJoint()const
121 {
122 return joint;
123 }
130 const Inertia& getInertia()const
131 {
132 return M;
133 }
134
141 const Frame& getFrameToTip()const
142 {
143 return f_tip;
144 }
145
146 };
147}//end of namespace KDL
148
149#endif
This class encapsulates a serial kinematic interconnection structure. It is build out of segments.
Definition chain.hpp:36
represents a frame transformation in 3D space (rotation + translation)
Definition frames.hpp:526
static Frame Identity()
Definition frames.inl:719
static Inertia Zero()
Definition inertia.hpp:46
This class encapsulates a simple joint, that is with one parameterized degree of freedom and with sca...
Definition joint.hpp:43
This class encapsulates a simple segment, that is a "rigid body" (i.e., a frame and an inertia) with ...
Definition segment.hpp:46
virtual ~Segment()
Definition segment.cpp:47
Segment & operator=(const Segment &arg)
Definition segment.cpp:39
const Joint & getJoint() const
Definition segment.hpp:120
Frame pose(const double *q) const
Definition segment.cpp:51
Twist twist(const double *q, const double &qdot, int dof=0) const
Definition segment.cpp:56
const Inertia & getInertia() const
Definition segment.hpp:130
const Frame & getFrameToTip() const
Definition segment.hpp:141
Segment(const Joint &joint=Joint(), const Frame &f_tip=Frame::Identity(), const Inertia &M=Inertia::Zero())
Definition segment.cpp:27
represents both translational and rotational velocities.
Definition frames.hpp:679
A concrete implementation of a 3 dimensional vector class.
Definition frames.hpp:143
#define M
Definition chain.cpp:27