Blender V2.61 - r43446
|
00001 // Copyright (C) 2007 Ruben Smits <ruben dot smits at mech dot kuleuven dot be> 00002 00003 // Version: 1.0 00004 // Author: Ruben Smits <ruben dot smits at mech dot kuleuven dot be> 00005 // Maintainer: Ruben Smits <ruben dot smits at mech dot kuleuven dot be> 00006 // URL: http://www.orocos.org/kdl 00007 00008 // This library is free software; you can redistribute it and/or 00009 // modify it under the terms of the GNU Lesser General Public 00010 // License as published by the Free Software Foundation; either 00011 // version 2.1 of the License, or (at your option) any later version. 00012 00013 // This library is distributed in the hope that it will be useful, 00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 // Lesser General Public License for more details. 00017 00018 // You should have received a copy of the GNU Lesser General Public 00019 // License along with this library; if not, write to the Free Software 00020 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00021 00022 00023 #ifndef KDL_SEGMENT_HPP 00024 #define KDL_SEGMENT_HPP 00025 00026 #include "frames.hpp" 00027 #include "inertia.hpp" 00028 #include "joint.hpp" 00029 #include <vector> 00030 00031 namespace KDL { 00032 00046 class Segment { 00047 friend class Chain; 00048 private: 00049 Joint joint; 00050 Inertia M; 00051 Frame f_tip; 00052 00053 public: 00063 Segment(const Joint& joint=Joint(), const Frame& f_tip=Frame::Identity(),const Inertia& M = Inertia::Zero()); 00064 Segment(const Segment& in); 00065 Segment& operator=(const Segment& arg); 00066 00067 virtual ~Segment(); 00068 00076 Frame pose(const double& q)const; 00088 Twist twist(const double& q,const double& qdot, int dof=0)const; 00089 00100 Twist twist(const Vector& p, const double& qdot, int dof=0)const; 00101 00112 Twist twist(const Frame& f, const double& qdot, int dof)const; 00113 00120 const Joint& getJoint()const 00121 { 00122 return joint; 00123 } 00130 const Inertia& getInertia()const 00131 { 00132 return M; 00133 } 00134 00141 const Frame& getFrameToTip()const 00142 { 00143 return f_tip; 00144 } 00145 00146 }; 00147 }//end of namespace KDL 00148 00149 #endif