KDL  1.4.0
frames_io.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  frames_io.h - description
3  -------------------------
4  begin : June 2006
5  copyright : (C) 2006 Erwin Aertbelien
6  email : firstname.lastname@mech.kuleuven.ac.be
7 
8  History (only major changes)( AUTHOR-Description ) :
9 
10  Ruben Smits - Added output for jacobian and jntarray 06/2007
11 
12  ***************************************************************************
13  * This library is free software; you can redistribute it and/or *
14  * modify it under the terms of the GNU Lesser General Public *
15  * License as published by the Free Software Foundation; either *
16  * version 2.1 of the License, or (at your option) any later version. *
17  * *
18  * This library is distributed in the hope that it will be useful, *
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
21  * Lesser General Public License for more details. *
22  * *
23  * You should have received a copy of the GNU Lesser General Public *
24  * License along with this library; if not, write to the Free Software *
25  * Foundation, Inc., 59 Temple Place, *
26  * Suite 330, Boston, MA 02111-1307 USA *
27  * *
28  ***************************************************************************/
76 #ifndef FRAMES_IO_H
77 #define FRAMES_IO_H
78 
79 #include "utilities/utility_io.h"
80 #include "frames.hpp"
81 #include "jntarray.hpp"
82 #include "jacobian.hpp"
83 
84 namespace KDL {
85 
88 
89 
90  // I/O to C++ stream.
91  std::ostream& operator << (std::ostream& os,const Vector& v);
92  std::ostream& operator << (std::ostream& os,const Rotation& R);
93  std::ostream& operator << (std::ostream& os,const Frame& T);
94  std::ostream& operator << (std::ostream& os,const Twist& T);
95  std::ostream& operator << (std::ostream& os,const Wrench& T);
96  std::ostream& operator << (std::ostream& os,const Vector2& v);
97  std::ostream& operator << (std::ostream& os,const Rotation2& R);
98  std::ostream& operator << (std::ostream& os,const Frame2& T);
99 
100 
101 
102  std::istream& operator >> (std::istream& is,Vector& v);
103  std::istream& operator >> (std::istream& is,Rotation& R);
104  std::istream& operator >> (std::istream& is,Frame& T);
105  std::istream& operator >> (std::istream& os,Twist& T);
106  std::istream& operator >> (std::istream& os,Wrench& T);
107  std::istream& operator >> (std::istream& is,Vector2& v);
108  std::istream& operator >> (std::istream& is,Rotation2& R);
109  std::istream& operator >> (std::istream& is,Frame2& T);
110 
111 
112 } // namespace Frame
113 
114 #endif
KDL::Rotation::SetInverse
void SetInverse()
Sets the value of *this to its inverse.
Definition: frames.inl:648
KDL::Vector::data
double data[3]
Definition: frames.hpp:163
KDL::Rotation2::operator()
double operator()(int i, int j) const
Access to elements 0..1,0..1, bounds are checked when NDEBUG is not set.
Definition: frames.inl:853
frames.hpp
KDL::Frame::Identity
static Frame Identity()
Definition: frames.inl:695
KDL::Twist::rot
Vector rot
The rotational velocity of that point.
Definition: frames.hpp:723
KDL::Frame2
A 2D frame class, for further documentation see the Frames class for methods with unchanged semantics...
Definition: frames.hpp:1094
KDL::Frame::Inverse
Frame Inverse() const
Gives back inverse transformation of a Frame.
Definition: frames.inl:422
KDL::Vector::Set2DZX
void Set2DZX(const Vector2 &v)
a 3D vector where the 2D vector v is put in the ZX plane
Definition: frames.inl:475
KDL::Vector2::Set3DYZ
void Set3DYZ(const Vector &v)
projects v in its YZ plane, and sets *this to these values
Definition: frames.inl:820
KDL::operator*
ArticulatedBodyInertia operator*(double a, const ArticulatedBodyInertia &I)
Scalar product: I_new = double * I_old.
Definition: articulatedbodyinertia.cpp:51
KDL::Frame2::Frame2
Frame2(void)
KDL::posrandom
IMETHOD void posrandom(doubleVel &F)
Definition: framevel.hpp:70
KDL::Rotation::Inverse
Rotation Inverse() const
Gives back the inverse rotation matrix of *this.
Definition: frames.inl:632
KDL::Vector::Zero
static Vector Zero()
Definition: frames.inl:138
KDL::Vector2::operator-=
Vector2 & operator-=(const Vector2 &arg)
Definition: frames.inl:772
KDL::Frame::Frame
Frame()
Definition: frames.hpp:584
KDL::Frame::Integrate
void Integrate(const Twist &t_this, double frequency)
The twist <t_this> is expressed wrt the current frame.
Definition: frames.inl:619
KDL::Rotation::DoRotZ
void DoRotZ(double angle)
The DoRot...
Definition: frames.inl:583
KDL::Rotation::operator()
double & operator()(int i, int j)
Access to elements 0..2,0..2, bounds are checked when NDEBUG is not set.
Definition: frames.inl:488
jntarray.hpp
KDL::random
IMETHOD void random(doubleVel &F)
Definition: framevel.hpp:66
KDL::Frame::p
Vector p
origine of the Frame
Definition: frames.hpp:572
frames_io.hpp
KDL::Rotation::Rotation
Rotation()
Definition: frames.hpp:306
KDL::Vector2::operator=
Vector2 & operator=(const Vector2 &arg)
Definition: frames.inl:732
KDL::Rotation2::c
double c
Definition: frames.hpp:1052
KDL::Rotation::RotY
static Rotation RotY(double angle)
The Rot... static functions give the value of the appropriate rotation matrix back.
Definition: frames.inl:605
KDL::Rotation::DoRotX
void DoRotX(double angle)
The DoRot...
Definition: frames.inl:551
KDL::Vector::Set2DYZ
void Set2DYZ(const Vector2 &v)
a 3D vector where the 2D vector v is put in the YZ plane
Definition: frames.inl:466
KDL::Frame2::SetInverse
void SetInverse()
Definition: frames.inl:944
KDL::Rotation2::Rotation2
Rotation2()
c,s represent cos(angle), sin(angle), this also represents first col.
Definition: frames.hpp:1057
KDL::addDelta
IMETHOD Vector addDelta(const Vector &p_w_a, const Vector &p_w_da, double dt=1)
adds vector da to vector a.
KDL
Definition: articulatedbodyinertia.cpp:28
KDL::Rotation2::s
double s
Definition: frames.hpp:1052
KDL::Vector
A concrete implementation of a 3 dimensional vector class.
Definition: frames.hpp:160
KDL::operator==
bool operator==(const Rotation &a, const Rotation &b)
Definition: frames.cpp:462
KDL::Frame2::operator*
Vector2 operator*(const Vector2 &arg) const
Definition: frames.inl:928
KDL::Vector::Set2DPlane
void Set2DPlane(const Frame &F_someframe_XY, const Vector2 &v_XY)
a 3D vector where the 2D vector v_XY is put in the XY plane of the frame F_someframe_XY.
Definition: frames.inl:702
operator-
IMETHOD Vector operator-(const Vector &lhs, const Vector &rhs)
Definition: frames.inl:66
KDL::Twist
represents both translational and rotational velocities.
Definition: frames.hpp:720
KDL::Rotation::DoRotY
void DoRotY(double angle)
The DoRot...
Definition: frames.inl:567
KDL::Vector2::y
double y() const
Definition: frames.inl:795
KDL::Rotation2::operator*
Vector2 operator*(const Vector2 &v) const
Definition: frames.inl:849
KDL::Wrench::torque
Vector torque
Torque that is applied at the origin of the current ref frame.
Definition: frames.hpp:882
dot
IMETHOD double dot(const Vector &lhs, const Vector &rhs)
Definition: frames.inl:1005
KDL::Frame2::SetIdentity
void SetIdentity()
Definition: frames.inl:938
KDL::Frame2::operator=
Frame2 & operator=(const Frame2 &arg)
Definition: frames.inl:959
KDL::Vector2::ReverseSign
void ReverseSign()
Definition: frames.inl:801
KDL::Rotation::RotZ
static Rotation RotZ(double angle)
The Rot... static functions give the value of the appropriate rotation matrix back.
Definition: frames.inl:610
KDL::Rotation::Identity
static Rotation Identity()
Gives back an identity rotaton matrix.
Definition: frames.inl:547
KDL::Wrench
represents both translational and rotational acceleration.
Definition: frames.hpp:878
KDL::Rotation2::Inverse
Rotation2 Inverse() const
Definition: frames.inl:871
KDL::operator-
ArticulatedBodyInertia operator-(const ArticulatedBodyInertia &Ia, const ArticulatedBodyInertia &Ib)
Definition: articulatedbodyinertia.cpp:62
KDL::Rotation2::SetIdentity
void SetIdentity()
Definition: frames.inl:883
KDL::Vector2::Set3DZX
void Set3DZX(const Vector &v)
projects v in its ZX plane, and sets *this to these values
Definition: frames.inl:826
KDL::Frame
Definition: frames.hpp:570
KDL::Rotation::operator*
Vector operator*(const Vector &v) const
Defines a multiplication R*V between a Rotation R and a Vector V.
Definition: frames.inl:521
KDL::Vector2::x
double x() const
Definition: frames.inl:794
KDL::Rotation2
A 2D Rotation class, for conventions see Rotation.
Definition: frames.hpp:1050
KDL::Rotation::EulerZYZ
static Rotation EulerZYZ(double Alfa, double Beta, double Gamma)
Gives back a rotation matrix specified with EulerZYZ convention :
Definition: frames.cpp:263
operator*
Vector operator*(const Vector &lhs, double rhs)
Definition: frames.inl:83
KDL::Frame::DH
static Frame DH(double a, double alpha, double d, double theta)
Definition: frames.cpp:71
operator!=
IMETHOD bool operator!=(const Frame &a, const Frame &b)
Definition: frames.inl:1277
KDL::Vector::Set2DXY
void Set2DXY(const Vector2 &v)
a 3D vector where the 2D vector v is put in the XY plane
Definition: frames.inl:458
KDL::Vector2::Set3DXY
void Set3DXY(const Vector &v)
projects v in its XY plane, and sets *this to these values
Definition: frames.inl:814
KDL::Twist::vel
Vector vel
The velocity of that point.
Definition: frames.hpp:722
KDL::operator>>
std::istream & operator>>(std::istream &is, Vector &v)
Definition: frames_io.cpp:154
KDL::Frame2::operator()
double operator()(int i, int j)
Treats a frame as a 3x3 matrix and returns element i,j Access to elements 0..2,0.....
Definition: frames.inl:971
KDL::Frame2::p
Vector2 p
origine of the Frame
Definition: frames.hpp:1097
KDL::Rotation::data
double data[9]
Definition: frames.hpp:304
KDL::Vector2::Set3DPlane
void Set3DPlane(const Frame &F_someframe_XY, const Vector &v_someframe)
projects v_someframe in the XY plane of F_someframe_XY, and sets *this to these values expressed wrt ...
Definition: frames.inl:833
Rot
IMETHOD Rotation Rot(const Vector &axis_a_b)
axis_a_b is a rotation vector, its norm is a rotation angle axis_a_b rotates the a frame towards the ...
Definition: frames.inl:1100
KDL::Rotation::EulerZYX
static Rotation EulerZYX(double Alfa, double Beta, double Gamma)
EulerZYX constructs a Rotation from the Euler ZYX parameters:
Definition: frames.hpp:469
KDL::Vector::Norm
double Norm() const
Definition: frames.cpp:118
KDL::Rotation::Rot
static Rotation Rot(const Vector &rotvec, double angle)
Along an arbitrary axes.
Definition: frames.cpp:294
KDL::Equal
IMETHOD bool Equal(const FrameAcc &r1, const FrameAcc &r2, double eps=epsilon)
KDL::Vector2::Zero
static Vector2 Zero()
Definition: frames.inl:779
KDL::Rotation2::GetRot
double GetRot() const
Gets the angle (in radians)
Definition: frames.inl:897
KDL::Frame::M
Rotation M
Orientation of the Frame.
Definition: frames.hpp:573
operator+
IMETHOD Vector operator+(const Vector &lhs, const Vector &rhs)
Definition: frames.inl:57
KDL::Vector::ReverseSign
void ReverseSign()
Reverses the sign of the Vector object itself.
Definition: frames.inl:440
KDL::Frame2::Inverse
Frame2 Inverse() const
Definition: frames.inl:952
KDL::operator<<
std::ostream & operator<<(std::ostream &os, const VectorAcc &r)
Definition: frameacc_io.hpp:49
operator/
Vector operator/(const Vector &lhs, double rhs)
Definition: frames.inl:101
KDL::Rotation2::operator=
Rotation2 & operator=(const Rotation2 &arg)
Definition: frames.inl:844
KDL::Rotation::operator=
Rotation & operator=(const Rotation &arg)
Definition: frames.inl:515
KDL::Rotation::RotX
static Rotation RotX(double angle)
The Rot... static functions give the value of the appropriate rotation matrix back.
Definition: frames.inl:600
KDL::Vector2
2D version of Vector
Definition: frames.hpp:959
KDL::Rotation::RPY
static Rotation RPY(double roll, double pitch, double yaw)
Gives back a rotation matrix specified with RPY convention: first rotate around X with roll,...
Definition: frames.cpp:238
KDL::Vector2::Vector2
Vector2()
Does not initialise to Zero().
Definition: frames.hpp:964
KDL::Frame::operator()
double operator()(int i, int j)
Treats a frame as a 4x4 matrix and returns element i,j Access to elements 0..3,0.....
Definition: frames.inl:662
KDL::Rotation2::SetRot
void SetRot(double angle)
The SetRot.. functions set the value of *this to the appropriate rotation matrix.
Definition: frames.inl:889
KDL::Vector2::operator+=
Vector2 & operator+=(const Vector2 &arg)
Definition: frames.inl:765
KDL::Rotation2::Identity
static Rotation2 Identity()
Definition: frames.inl:879
KDL::operator+
ArticulatedBodyInertia operator+(const ArticulatedBodyInertia &Ia, const ArticulatedBodyInertia &Ib)
addition I: I_new = I_old1 + I_old2, make sure that I_old1 and I_old2 are expressed in the same refer...
Definition: articulatedbodyinertia.cpp:55
KDL::SetToZero
void SetToZero(Jacobian &jac)
Definition: jacobian.cpp:80
KDL::Vector2::data
double data[2]
Definition: frames.hpp:961
KDL::diff
IMETHOD Vector diff(const Vector &p_w_a, const Vector &p_w_b, double dt=1)
determines the difference of vector b with vector a.
KDL::Rotation2::SetInverse
void SetInverse()
Definition: frames.inl:867
jacobian.hpp
KDL::Wrench::force
Vector force
Force that is applied at the origin of the current ref frame.
Definition: frames.hpp:881
KDL::Vector2::operator()
double operator()(int index) const
Access to elements, range checked when NDEBUG is not set, from 0..1.
Definition: frames.inl:783
KDL::Rotation2::Rot
static Rotation2 Rot(double angle)
The Rot... static functions give the value of the appropriate rotation matrix bac.
Definition: frames.inl:893
KDL::Frame2::M
Rotation2 M
Orientation of the Frame.
Definition: frames.hpp:1098
KDL::Rotation
represents rotations in 3 dimensional space.
Definition: frames.hpp:301