Frankx
0.2.0
A High-Level Motion API for Franka
|
Go to the documentation of this file.
26 return pddq(s) * std::pow(ds, 2) +
pdq(s) * dds;
29 Vector7d dddq(
double s,
double ds,
double dds,
double ddds)
const {
30 return 3 * ds *
pddq(s) * dds + std::pow(ds, 3) *
pdddq(s) +
pdq(s) * ddds;
61 return Vector7d::Zero();
65 return Vector7d::Zero();
69 return Vector7d::Zero();
73 return Vector7d::Zero();
89 void integrate_path_length() {
93 const size_t steps {5000};
94 const double step_length =
s_length / steps;
95 const double step_length_squared = std::pow(step_length, 2);
96 for (
int i = 1; i < steps; i += 1) {
97 f_s_new =
q(i * step_length);
98 length += std::sqrt((f_s_new - f_s).squaredNorm() + step_length_squared);
99 std::swap(f_s_new, f_s);
109 Vector7d sAbs_ = ((-16*max_diff)/(3.*(
lm -
rm).array())).abs();
110 double s_abs_min = std::min<double>({sAbs_.minCoeff(), s_abs_max});
113 b = (
lm -
rm).array() / (16.*std::pow(s_abs_min, 3));
114 c = (-
lm +
rm).array() / (4.*std::pow(s_abs_min, 2));
116 f =
lb.array() +
lm.array()*(-s_abs_min + s_mid);
124 return f + s * (
e + s * (s * (
c + s *
b)));
128 return e + s * (s * (3 *
c + s * 4 *
b));
132 return s * (6 *
c + s * 12 *
b);
136 return 6 *
c + s * 24 *
b;
141 return (-3*(
lm -
rm))/(4.*s_abs);
146 return (3*(
lm -
rm))/(2.*std::pow(s_abs,2));
double length
Definition: segment.hpp:13
Vector7d pddq(double s) const
Definition: segment.hpp:131
double get_length() const
Definition: segment.hpp:48
Vector7d dq(double s, double ds) const
Definition: segment.hpp:21
Vector7d c
Definition: segment.hpp:105
Definition: segment.hpp:88
virtual Vector7d pdddq(double s) const =0
LineSegment(const Vector7d &start, const Vector7d &end)
Definition: segment.hpp:42
Vector7d start
Definition: segment.hpp:40
Vector7d e
Definition: segment.hpp:105
Vector7d rm
Definition: segment.hpp:106
Vector7d q(double s) const
Definition: segment.hpp:123
Vector7d pdddq(double s) const
Definition: segment.hpp:64
Vector7d pdddq(double s) const
Definition: segment.hpp:135
double get_length() const
Definition: segment.hpp:119
Vector7d pddq(double s) const
Definition: segment.hpp:60
Vector7d rb
Definition: segment.hpp:106
Vector7d b
Definition: segment.hpp:105
QuarticBlendSegment(const Vector7d &lb, const Vector7d &lm, const Vector7d &rb, const Vector7d &rm, double s_mid, double max_diff, double s_abs_max)
Definition: segment.hpp:108
Vector7d f
Definition: segment.hpp:105
Vector7d max_pdddq() const
Definition: segment.hpp:144
Vector7d ddq(double s, double ds, double dds) const
Definition: segment.hpp:25
Vector7d pdq(double s) const
Definition: segment.hpp:127
Vector7d max_pdddq() const
Definition: segment.hpp:72
virtual Vector7d max_pddq() const =0
Definition: segment.hpp:83
virtual Vector7d pddq(double s) const =0
virtual double get_length() const =0
Definition: segment.hpp:38
Vector7d dddq(double s, double ds, double dds, double ddds) const
Definition: segment.hpp:29
Eigen::Matrix< double, 7, 1 > Vector7d
Definition: segment.hpp:10
Vector7d lm
Definition: segment.hpp:106
Definition: segment.hpp:12
Vector7d q(double s) const
Definition: segment.hpp:52
Vector7d max_pddq() const
Definition: segment.hpp:68
virtual Vector7d q(double s) const =0
Vector7d end
Definition: segment.hpp:40
Definition: segment.hpp:78
Vector7d lb
Definition: segment.hpp:106
Definition: motion_impedance.hpp:13
virtual Vector7d pdq(double s) const =0
virtual Vector7d max_pdddq() const =0
Vector7d pdq(double s) const
Definition: segment.hpp:56
double s_length
Definition: segment.hpp:104
Vector7d max_pddq() const
Definition: segment.hpp:139