OpenWalker Project
Documentation of the ROS Packages
angular_position.h
Go to the documentation of this file.
1 
34 #ifndef OPEN_WALKER_CORE_ANGULAR_POSITION_H
35 #define OPEN_WALKER_CORE_ANGULAR_POSITION_H
36 
37 #include <ow_core/conversions.h>
39 
40 namespace ow_core
41 {
49 template <typename _Scalar>
51  public AngularPositionRef<Eigen::Matrix<_Scalar,4,1> >
52 {
53 public:
54  typedef _Scalar Scalar;
55  typedef Eigen::Matrix<Scalar,4,1> Derived;
57 
58 protected:
59  Derived data_;
60 
61 public:
66  Base(data_)
67  {
68  }
69 
76  AngularPosition(const Scalar& w, const Scalar& x, const Scalar& y, const Scalar& z) :
77  data_(x,y,z,w),
78  Base(data_)
79  {
80  }
81 
86  template <typename OtherDerived>
87  AngularPosition(const Eigen::EigenBase<OtherDerived>& other) :
88  data_(other),
89  Base(data_)
90  {
91  }
92 
97  template <typename OtherDerived>
98  AngularPosition(const Eigen::QuaternionBase<OtherDerived>& other) :
99  data_(other.x(),other.y(),other.z(),other.w()),
100  Base(data_)
101  {
102  }
103 
107  using Base::operator=;
108 
109 };
110 
111 } // namespace ow_core
112 
113 #endif // OPEN_WALKER_CORE_ANGULAR_POSITION_H
The AngularPosition class.
Definition: angular_position.h:50
AngularPosition(const Scalar &w, const Scalar &x, const Scalar &y, const Scalar &z)
Assignment from Scalar values.
Definition: angular_position.h:76
AngularPosition(const Eigen::QuaternionBase< OtherDerived > &other)
Copy constructor from QuaternionBase.
Definition: angular_position.h:98
AngularPosition()
Default Constructor.
Definition: angular_position.h:65
Contains global conversion functions.
Definition: angular_acceleration.h:39
The AngularPositionRef class.
Definition: angular_position_ref.h:56
AngularPosition(const Eigen::EigenBase< OtherDerived > &other)
Copy constructor from EigenBase.
Definition: angular_position.h:87