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


orocos_kdl
Author(s):
autogenerated on Fri Jun 14 2019 19:33:22