KDL 1.5.1
Loading...
Searching...
No Matches
kinfam_io.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#ifndef KDL_KINFAM_IO_HPP
23#define KDL_KINFAM_IO_HPP
24
25#include <iostream>
26#include <fstream>
27
28#include "joint.hpp"
29#include "segment.hpp"
30#include "chain.hpp"
31#include "jntarray.hpp"
32#include "jacobian.hpp"
33#include "tree.hpp"
35
36namespace KDL {
37std::ostream& operator <<(std::ostream& os, const Joint& joint);
38std::istream& operator >>(std::istream& is, Joint& joint);
39std::ostream& operator <<(std::ostream& os, const Segment& segment);
40std::istream& operator >>(std::istream& is, Segment& segment);
41std::ostream& operator <<(std::ostream& os, const Chain& chain);
42std::istream& operator >>(std::istream& is, Chain& chain);
43
44std::ostream& operator <<(std::ostream& os, const Tree& tree);
45std::istream& operator >>(std::istream& is, Tree& tree);
46
47std::ostream& operator <<(std::ostream& os, SegmentMap::const_iterator it);
48
49std::ostream& operator <<(std::ostream& os, const JntArray& array);
50std::istream& operator >>(std::istream& is, JntArray& array);
51std::ostream& operator <<(std::ostream& os, const Jacobian& jac);
52std::istream& operator >>(std::istream& is, Jacobian& jac);
53std::ostream& operator <<(std::ostream& os, const JntSpaceInertiaMatrix& jntspaceinertiamatrix);
54std::istream& operator >>(std::istream& is, JntSpaceInertiaMatrix& jntspaceinertiamatrix);
55
56//Builds a string containing the "branches" of a Tree using indentation or another
57//user-supplied pattern, so that it is easier to visualize its structure. It is
58//also possible to specify a "preamble", ie, a string to be included at the
59//beginning of each new line.
60std::string tree2str(const Tree& tree, const std::string& separator=" ", const std::string& preamble="");
61std::string tree2str(const SegmentMap::const_iterator it, const std::string& separator=" ", const std::string& preamble="", unsigned int level=0);
62
63 /*
64template<typename T>
65std::ostream& operator<<(std::ostream& os, const std::vector<T>& vec) {
66 os << "[";
67 for (unsigned int i = 0; i < vec.size(); i++)
68 os << vec[i] << " ";
69 os << "]";
70 return os;
71}
72;
73
74template<typename T>
75std::istream& operator >>(std::istream& is, std::vector<T>& vec) {
76 return is;
77}
78;
79 */
80}
81#endif
Definition: articulatedbodyinertia.cpp:26
std::string tree2str(const SegmentMap::const_iterator it, const std::string &separator, const std::string &preamble, unsigned int level)
Definition: kinfam_io.cpp:117
std::ostream & operator<<(std::ostream &os, const VectorAcc &r)
Definition: frameacc_io.hpp:32
std::istream & operator>>(std::istream &is, Vector &v)
Definition: frames_io.cpp:129