RML  1.0
Robotics Mathematical Library
Loading...
Searching...
No Matches
EulerRPY.h
Go to the documentation of this file.
1
8#ifndef INCLUDE_EULER_RPY_H_
9#define INCLUDE_EULER_RPY_H_
10
11#include <eigen3/Eigen/Dense>
12#include <iostream>
13
14#include "Types.h"
15
16namespace rml {
17
25class EulerRPY {
26public:
28 EulerRPY(double roll, double pitch, double yaw);
29 EulerRPY(Eigen::Vector3d vec3);
30 EulerRPY(Eigen::Quaterniond q);
31
32 virtual ~EulerRPY();
33
34 friend std::ostream& operator<<(std::ostream& os, EulerRPY const& a)
35 {
36 return os << a.roll_ << "\t" << a.pitch_ << "\t" << a.yaw_ << "\t";
37 }
38
39 auto Yaw() const -> double { return this->yaw_; }
40 auto Yaw(double yaw) -> void { this->yaw_ = yaw; }
41
42 auto Pitch() const -> double { return this->pitch_; }
43 auto Pitch(double pitch) -> void { this->pitch_ = pitch; }
44
45 auto Roll() const -> double { return this->roll_; }
46 auto Roll(double roll) -> void { this->roll_ = roll; }
47
48 auto RPY(double roll, double pitch, double yaw) -> void
49 {
50 this->roll_ = roll;
51 this->pitch_ = pitch;
52 this->yaw_ = yaw;
53 }
54
55 auto RPY(Eigen::Vector3d rpy) -> void
56 {
57 this->roll_ = rpy[0];
58 this->pitch_ = rpy[1];
59 this->yaw_ = rpy[2];
60 }
61
62 auto ToVector() const -> Eigen::Vector3d { return Eigen::Vector3d(roll_, pitch_, yaw_); }
63
65
73 Eigen::Vector3d Derivative(const Eigen::Vector3d& omega) const;
80 Eigen::Vector3d Omega(const Eigen::Vector3d& rpyDerivarives) const;
81 Eigen::Quaterniond ToQuaternion() const;
82
83private:
84 double roll_, pitch_, yaw_;
85};
86}
87
88#endif /* INCLUDE_EULER_RPY_H_ */
This class extends the Eigen::Matrix3d.
Definition RotMatrix.h:26
Euler RPY angle representation.
Definition EulerRPY.h:25
Eigen::RotationMatrix ToRotationMatrix() const
Eigen::Quaterniond ToQuaternion() const
auto RPY(Eigen::Vector3d rpy) -> void
Definition EulerRPY.h:55
auto RPY(double roll, double pitch, double yaw) -> void
Definition EulerRPY.h:48
EulerRPY(Eigen::Quaterniond q)
Eigen::Vector3d Derivative(const Eigen::Vector3d &omega) const
GetDerivative computes the euler rates (derivative) of 'this', given the angular velocity omega of th...
auto ToVector() const -> Eigen::Vector3d
Definition EulerRPY.h:62
EulerRPY(double roll, double pitch, double yaw)
auto Roll(double roll) -> void
Definition EulerRPY.h:46
auto Yaw() const -> double
Definition EulerRPY.h:39
Eigen::Vector3d Omega(const Eigen::Vector3d &rpyDerivarives) const
GetOmega computes the angular velocity of the frame given euler rates (derivative) of 'this',...
auto Roll() const -> double
Definition EulerRPY.h:45
EulerRPY(Eigen::Vector3d vec3)
virtual ~EulerRPY()
auto Pitch() const -> double
Definition EulerRPY.h:42
auto Pitch(double pitch) -> void
Definition EulerRPY.h:43
auto Yaw(double yaw) -> void
Definition EulerRPY.h:40
friend std::ostream & operator<<(std::ostream &os, EulerRPY const &a)
Definition EulerRPY.h:34
This namespace is used to extend the Eigen Dense library functionalities.
Definition RotMatrix.h:13
Types and algorithms for robotic mobile manipulation.
Definition ArmModel.h:19