Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef KDL_ARTICULATEDBODYINERTIA_HPP
00023 #define KDL_ARTICULATEDBODYINERTIA_HPP
00024
00025 #include "frames.hpp"
00026
00027 #include "rotationalinertia.hpp"
00028 #include "rigidbodyinertia.hpp"
00029
00030 #include <Eigen/Core>
00031
00032 namespace KDL {
00033
00040 class ArticulatedBodyInertia{
00041 public:
00042
00046 ArticulatedBodyInertia(){
00047 *this=ArticulatedBodyInertia::Zero();
00048 }
00049
00054 ArticulatedBodyInertia(const RigidBodyInertia& rbi);
00055
00060 explicit ArticulatedBodyInertia(double m, const Vector& oc=Vector::Zero(), const RotationalInertia& Ic=RotationalInertia::Zero());
00061
00065 static inline ArticulatedBodyInertia Zero(){
00066 return ArticulatedBodyInertia(Eigen::Matrix3d::Zero(),Eigen::Matrix3d::Zero(),Eigen::Matrix3d::Zero());
00067 };
00068
00069
00070 ~ArticulatedBodyInertia(){};
00071
00072 friend ArticulatedBodyInertia operator*(double a,const ArticulatedBodyInertia& I);
00073 friend ArticulatedBodyInertia operator+(const ArticulatedBodyInertia& Ia,const ArticulatedBodyInertia& Ib);
00074 friend ArticulatedBodyInertia operator+(const ArticulatedBodyInertia& Ia,const RigidBodyInertia& Ib);
00075 friend ArticulatedBodyInertia operator-(const ArticulatedBodyInertia& Ia,const ArticulatedBodyInertia& Ib);
00076 friend ArticulatedBodyInertia operator-(const ArticulatedBodyInertia& Ia,const RigidBodyInertia& Ib);
00077 friend Wrench operator*(const ArticulatedBodyInertia& I,const Twist& t);
00078 friend ArticulatedBodyInertia operator*(const Frame& T,const ArticulatedBodyInertia& I);
00079 friend ArticulatedBodyInertia operator*(const Rotation& R,const ArticulatedBodyInertia& I);
00080
00085 ArticulatedBodyInertia RefPoint(const Vector& p);
00086
00087 ArticulatedBodyInertia(const Eigen::Matrix3d& M,const Eigen::Matrix3d& H,const Eigen::Matrix3d& I);
00088
00089 Eigen::Matrix3d M;
00090 Eigen::Matrix3d H;
00091 Eigen::Matrix3d I;
00092 };
00093
00097 ArticulatedBodyInertia operator*(double a,const ArticulatedBodyInertia& I);
00103 ArticulatedBodyInertia operator+(const ArticulatedBodyInertia& Ia,const ArticulatedBodyInertia& Ib);
00104 ArticulatedBodyInertia operator+(const ArticulatedBodyInertia& Ia,const RigidBodyInertia& Ib);
00105 ArticulatedBodyInertia operator-(const ArticulatedBodyInertia& Ia,const ArticulatedBodyInertia& Ib);
00106 ArticulatedBodyInertia operator-(const ArticulatedBodyInertia& Ia,const RigidBodyInertia& Ib);
00107
00112 Wrench operator*(const ArticulatedBodyInertia& I,const Twist& t);
00113
00117 ArticulatedBodyInertia operator*(const Frame& T,const ArticulatedBodyInertia& I);
00122 ArticulatedBodyInertia operator*(const Rotation& R,const ArticulatedBodyInertia& I);
00123
00124 }
00125 #endif