trajectory.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "hebi.h"
4 #include "Eigen/Eigen"
5 #include "util.hpp"
6 #include <vector>
7 #include <memory>
8 
9 using namespace Eigen;
10 
11 namespace hebi {
12 namespace trajectory {
13 
17 class Trajectory final
18 {
19  private:
23  std::vector<HebiTrajectoryPtr> trajectories_;
24 
28  const size_t number_of_joints_;
29 
33  const size_t number_of_waypoints_;
34 
38  const double start_time_;
39 
43  const double end_time_;
44 
48  Trajectory(std::vector<HebiTrajectoryPtr> trajectories, size_t number_of_waypoints, double start_time, double end_time);
49 
50  public:
51 
80  static std::shared_ptr<Trajectory> createUnconstrainedQp(
81  const VectorXd& time_vector,
82  const MatrixXd& positions,
83  const MatrixXd* velocities = nullptr,
84  const MatrixXd* accelerations = nullptr);
85 
89  ~Trajectory() noexcept;
90 
95  size_t getJointCount() const { return number_of_joints_; }
96 
100  size_t getWaypointCount() const { return number_of_waypoints_; }
101 
105  double getStartTime() const { return start_time_; }
106 
110  double getEndTime() const { return end_time_; }
111 
116  double getDuration() const;
117 
131  bool getState(double time, VectorXd* position, VectorXd* velocity, VectorXd* acceleration) const;
132 
133  private:
138 };
139 
140 } // namespace trajectory
141 } // namespace hebi
Definition: color.hpp:5
Definition: LDLT.h:16
double getStartTime() const
Get the time (in seconds) at which the defined trajectory begins.
Definition: trajectory.hpp:105
#define HEBI_DISABLE_COPY_MOVE(Class)
Definition: util.hpp:7
const size_t number_of_waypoints_
Definition: trajectory.hpp:33
double getEndTime() const
Get the time (in seconds) at which the defined trajectory ends.
Definition: trajectory.hpp:110
Represents a smooth trajectory through a set of waypoints.
Definition: trajectory.hpp:17
size_t getWaypointCount() const
The number of fixed waypoints that each joint is moving through.
Definition: trajectory.hpp:100
std::vector< HebiTrajectoryPtr > trajectories_
Definition: trajectory.hpp:23


hebiros
Author(s): Xavier Artache , Matthew Tesch
autogenerated on Thu Sep 3 2020 04:09:39