Franky  0.9.1
A High-Level Motion API for Franka
relative_dynamics_factor.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 
5 namespace franky {
6 
14  public:
19 
20  // Suppress implicit conversion warning
21 #pragma clang diagnostic push
22 #pragma clang diagnostic ignored "-Wimplicit-conversion"
28  RelativeDynamicsFactor(double value);
29 #pragma clang diagnostic pop
30 
36  RelativeDynamicsFactor(double velocity, double acceleration, double jerk);
37 
43  return {1.0, 1.0, 1.0, true};
44  }
45 
49  [[nodiscard]] inline double velocity() const {
50  return velocity_;
51  }
52 
56  [[nodiscard]] inline double acceleration() const {
57  return acceleration_;
58  }
59 
63  [[nodiscard]] inline double jerk() const {
64  return jerk_;
65  }
66 
70  [[nodiscard]] inline bool max_dynamics() const {
71  return max_dynamics_;
72  }
73 
75 
76  private:
77  static double checkInBounds(double value, const std::string &name);
78 
79  RelativeDynamicsFactor(double velocity, double acceleration, double jerk, bool max_dynamics);
80 
81  double velocity_, acceleration_, jerk_;
82  bool max_dynamics_;
83 };
84 
85 } // namespace franky
Relative dynamics factors.
Definition: relative_dynamics_factor.hpp:13
double jerk() const
Jerk factor.
Definition: relative_dynamics_factor.hpp:63
double acceleration() const
Acceleration factor.
Definition: relative_dynamics_factor.hpp:56
bool max_dynamics() const
Whether the maximum dynamics should be used.
Definition: relative_dynamics_factor.hpp:70
RelativeDynamicsFactor()
Default constructor which initializes all values to 1.0.
Definition: relative_dynamics_factor.cpp:8
static RelativeDynamicsFactor MAX_DYNAMICS()
Special factor which causes the maximum dynamics to be used, independent of other factors applied els...
Definition: relative_dynamics_factor.hpp:42
RelativeDynamicsFactor operator*(const RelativeDynamicsFactor &other) const
Definition: relative_dynamics_factor.cpp:29
double velocity() const
Velocity factor.
Definition: relative_dynamics_factor.hpp:49
Definition: gripper.cpp:3