Frankx  0.2.0
A High-Level Motion API for Franka
path.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <iostream>
4 #include <memory>
5 
6 #include <Eigen/Core>
7 
8 #include <affx/affine.hpp>
9 #include <movex/waypoint.hpp>
10 #include <movex/path/segment.hpp>
11 
12 
13 namespace movex {
14 
15 class Path {
16  using Affine = affx::Affine;
17 
18  std::vector<double> cumulative_lengths;
19 
20  double length {0.0};
21 
22  void init_path_points(const std::vector<Waypoint>& waypoints);
23 
24 public:
25  constexpr static size_t degrees_of_freedom {7};
26 
27  std::vector<std::shared_ptr<Segment>> segments;
28  size_t get_index(double s) const;
29  std::tuple<std::shared_ptr<Segment>, double> get_local(double s) const;
30 
31  explicit Path() { }
32  explicit Path(const std::vector<Waypoint>& waypoints);
33  explicit Path(const std::vector<Affine>& waypoints, double blend_max_distance = 0.0);
34 
35  double get_length() const;
36 
37  Vector7d q(double s) const;
38  Vector7d q(double s, const Affine& frame) const;
39  Vector7d pdq(double s) const;
40  Vector7d pddq(double s) const;
41  Vector7d pdddq(double s) const;
42 
43  Vector7d dq(double s, double ds) const;
44  Vector7d ddq(double s, double ds, double dds) const;
45  Vector7d dddq(double s, double ds, double dds, double ddds) const;
46 
47  Vector7d max_pddq() const;
48  Vector7d max_pdddq() const;
49 };
50 
51 } // namespace movex
movex::Path::degrees_of_freedom
constexpr static size_t degrees_of_freedom
Definition: path.hpp:25
movex::Path
Definition: path.hpp:15
movex::Path::pdq
Vector7d pdq(double s) const
Definition: path.cpp:108
movex::Path::Path
Path()
Definition: path.hpp:31
movex::Path::segments
std::vector< std::shared_ptr< Segment > > segments
Definition: path.hpp:27
movex::Path::dq
Vector7d dq(double s, double ds) const
Definition: path.cpp:123
movex::Path::get_length
double get_length() const
Definition: path.cpp:94
movex::Path::q
Vector7d q(double s) const
Definition: path.cpp:98
movex::Path::pddq
Vector7d pddq(double s) const
Definition: path.cpp:113
movex::Path::max_pddq
Vector7d max_pddq() const
Definition: path.cpp:138
movex::Path::ddq
Vector7d ddq(double s, double ds, double dds) const
Definition: path.cpp:128
movex::Path::pdddq
Vector7d pdddq(double s) const
Definition: path.cpp:118
frankx::Affine
affx::Affine Affine
Definition: motion_generator.hpp:15
movex::Vector7d
Eigen::Matrix< double, 7, 1 > Vector7d
Definition: segment.hpp:10
movex::Path::dddq
Vector7d dddq(double s, double ds, double dds, double ddds) const
Definition: path.cpp:133
movex::Path::max_pdddq
Vector7d max_pdddq() const
Definition: path.cpp:149
movex::Path::get_index
size_t get_index(double s) const
Definition: path.cpp:6
movex
Definition: motion_impedance.hpp:13
waypoint.hpp
movex::Path::get_local
std::tuple< std::shared_ptr< Segment >, double > get_local(double s) const
Definition: path.cpp:12
segment.hpp