kinfam_io.cpp

Go to the documentation of this file.
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 #include "kinfam_io.hpp"
00023 #include "frames_io.hpp"
00024 
00025 namespace KDL {
00026 std::ostream& operator <<(std::ostream& os, const Joint& joint) {
00027         return os << joint.getTypeName();
00028 }
00029 
00030 std::istream& operator >>(std::istream& is, Joint& joint) {
00031         return is;
00032 }
00033 
00034 std::ostream& operator <<(std::ostream& os, const Segment& segment) {
00035         os << "[" << segment.getJoint() << ",\n" << segment.getFrameToTip() << "]";
00036         return os;
00037 }
00038 
00039 std::istream& operator >>(std::istream& is, Segment& segment) {
00040         return is;
00041 }
00042 
00043 std::ostream& operator <<(std::ostream& os, const Chain& chain) {
00044         os << "[";
00045         for (unsigned int i = 0; i < chain.getNrOfSegments(); i++)
00046                 os << chain.getSegment(i) << "\n";
00047         os << "]";
00048         return os;
00049 }
00050 
00051 std::istream& operator >>(std::istream& is, Chain& chain) {
00052         return is;
00053 }
00054 
00055 std::ostream& operator <<(std::ostream& os, const Tree& tree) {
00056         SegmentMap::const_iterator root = tree.getSegment("root");
00057         return os << root;
00058 }
00059 
00060 std::ostream& operator <<(std::ostream& os, SegmentMap::const_iterator root) {
00061         //os<<root->first<<": "<<root->second.segment<<"\n";
00062         os << root->first<<"(q_nr: "<<root->second.q_nr<<")"<<"\n \t";
00063         for (unsigned int i = 0; i < root->second.children.size(); i++) {
00064                 os <<(root->second.children[i])<<"\t";
00065         }
00066         return os << "\n";
00067 }
00068 
00069 std::istream& operator >>(std::istream& is, Tree& tree) {
00070         return is;
00071 }
00072 
00073 std::ostream& operator <<(std::ostream& os, const JntArray& array) {
00074         os << "[";
00075         for (unsigned int i = 0; i < array.rows(); i++)
00076                 os << std::setw(KDL_FRAME_WIDTH) << array(i);
00077         os << "]";
00078         return os;
00079 }
00080 
00081 std::istream& operator >>(std::istream& is, JntArray& array) {
00082         return is;
00083 }
00084 
00085 std::ostream& operator <<(std::ostream& os, const Jacobian& jac) {
00086         os << "[";
00087         for (unsigned int i = 0; i < jac.rows(); i++) {
00088                 for (unsigned int j = 0; j < jac.columns(); j++)
00089                         os << std::setw(KDL_FRAME_WIDTH) << jac(i, j);
00090                 os << std::endl;
00091         }
00092         os << "]";
00093         return os;
00094 }
00095 
00096 std::istream& operator >>(std::istream& is, Jacobian& jac) {
00097         return is;
00098 }
00099 std::ostream& operator <<(std::ostream& os, const JntSpaceInertiaMatrix& jntspaceinertiamatrix) {
00100         os << "[";
00101         for (unsigned int i = 0; i < jntspaceinertiamatrix.rows(); i++) {
00102                 for (unsigned int j = 0; j < jntspaceinertiamatrix.columns(); j++)
00103                         os << std::setw(KDL_FRAME_WIDTH) << jntspaceinertiamatrix(i, j);
00104                 os << std::endl;
00105         }
00106         os << "]";
00107         return os;
00108 }
00109 
00110 std::istream& operator >>(std::istream& is, JntSpaceInertiaMatrix& jntspaceinertiamatrix) {
00111         return is;
00112 }
00113 }
00114 

Generated on Wed Nov 23 19:00:20 2011 for FreeCAD by  doxygen 1.6.1