quaternion_to_rpy.h
Go to the documentation of this file.
1 #ifndef QUATERNION_TO_RPY_H
2 #define QUATERNION_TO_RPY_H
3 
5 
7 {
8 public:
10 
11  const char* name() const override
12  {
13  return "quaternion_to_RPY";
14  }
15 
16  void reset() override;
17 
18  int numInputs() const override
19  {
20  return 4;
21  }
22 
23  int numOutputs() const override
24  {
25  return 3;
26  }
27 
28  void setScale(double scale)
29  {
30  _scale = scale;
31  }
32 
33  void setWarp(bool wrap)
34  {
35  _wrap = wrap;
36  }
37 
38  void calculate() override;
39 
40  void calculateNextPoint(size_t index, const std::array<double, 4>& quat,
41  std::array<double, 3>& rpy);
42 
43 private:
44  double _prev_roll = 0;
45  double _prev_yaw = 0;
46  double _prev_pitch = 0;
47  double _roll_offset = 0;
48  double _pitch_offset = 0;
49  double _yaw_offset = 0;
50  double _scale = 1.0;
51  bool _wrap = true;
52  double _last_timestamp = std::numeric_limits<double>::lowest();
53 };
54 
55 #endif // QUATERNION_TO_RPY_H
QuaternionToRollPitchYaw::calculateNextPoint
void calculateNextPoint(size_t index, const std::array< double, 4 > &quat, std::array< double, 3 > &rpy)
Definition: quaternion_to_rpy.cpp:73
QuaternionToRollPitchYaw::_yaw_offset
double _yaw_offset
Definition: quaternion_to_rpy.h:49
QuaternionToRollPitchYaw::reset
void reset() override
Definition: quaternion_to_rpy.cpp:10
QuaternionToRollPitchYaw::setWarp
void setWarp(bool wrap)
Definition: quaternion_to_rpy.h:33
QuaternionToRollPitchYaw::numInputs
int numInputs() const override
Definition: quaternion_to_rpy.h:18
QuaternionToRollPitchYaw::_prev_yaw
double _prev_yaw
Definition: quaternion_to_rpy.h:45
QuaternionToRollPitchYaw
Definition: quaternion_to_rpy.h:6
transform_function.h
QuaternionToRollPitchYaw::_wrap
bool _wrap
Definition: quaternion_to_rpy.h:51
QuaternionToRollPitchYaw::_prev_pitch
double _prev_pitch
Definition: quaternion_to_rpy.h:46
PJ::TransformFunction
Generic interface for a multi input - multi output transformation function. Contrariwise to other plu...
Definition: transform_function.h:22
QuaternionToRollPitchYaw::QuaternionToRollPitchYaw
QuaternionToRollPitchYaw()
Definition: quaternion_to_rpy.cpp:5
QuaternionToRollPitchYaw::_prev_roll
double _prev_roll
Definition: quaternion_to_rpy.h:44
QuaternionToRollPitchYaw::calculate
void calculate() override
Definition: quaternion_to_rpy.cpp:21
QuaternionToRollPitchYaw::numOutputs
int numOutputs() const override
Definition: quaternion_to_rpy.h:23
QuaternionToRollPitchYaw::_pitch_offset
double _pitch_offset
Definition: quaternion_to_rpy.h:48
QuaternionToRollPitchYaw::_last_timestamp
double _last_timestamp
Definition: quaternion_to_rpy.h:52
QuaternionToRollPitchYaw::_roll_offset
double _roll_offset
Definition: quaternion_to_rpy.h:47
QuaternionToRollPitchYaw::_scale
double _scale
Definition: quaternion_to_rpy.h:50
QuaternionToRollPitchYaw::setScale
void setScale(double scale)
Definition: quaternion_to_rpy.h:28
QuaternionToRollPitchYaw::name
const char * name() const override
Name of the plugin type, NOT the particular instance.
Definition: quaternion_to_rpy.h:11


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:45