Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
trajectory_interpolator.h
Go to the documentation of this file.
1
27/* Based on MoveIt code authored by: Ioan Sucan, Adam Leeper */
28
29#ifndef TESSERACT_VISUALIZATION_TRAJECTORY_INTERPOLATOR_H
30#define TESSERACT_VISUALIZATION_TRAJECTORY_INTERPOLATOR_H
31
34#include <vector>
35#include <memory>
37
39
41{
43{
44public:
45 using UPtr = std::unique_ptr<TrajectoryInterpolator>;
46
48 virtual ~TrajectoryInterpolator() = default;
53
54 tesseract_common::JointState getState(double request_duration) const;
55
56 double getStateDuration(long index) const;
57
58 long getStateCount() const;
59
60 bool empty() const;
61
62private:
64 std::vector<double> duration_from_previous_;
65
66 void findStateIndices(const double& duration, long& before, long& after, double& blend) const;
67
70 double t);
71};
72} // namespace tesseract_visualization
73#endif // TESSERACT_VISUALIZATION_TRAJECTORY_INTERPOLATOR_H
Definition: joint_state.h:39
Represents a joint trajectory.
Definition: joint_state.h:78
Definition: trajectory_interpolator.h:43
long getStateCount() const
Definition: trajectory_interpolator.cpp:143
tesseract_common::JointState getState(double request_duration) const
Definition: trajectory_interpolator.cpp:101
tesseract_common::JointTrajectory trajectory_
Definition: trajectory_interpolator.h:63
double getStateDuration(long index) const
Definition: trajectory_interpolator.cpp:131
std::unique_ptr< TrajectoryInterpolator > UPtr
Definition: trajectory_interpolator.h:45
bool empty() const
Definition: trajectory_interpolator.cpp:164
TrajectoryInterpolator(const TrajectoryInterpolator &)=delete
std::vector< double > duration_from_previous_
Definition: trajectory_interpolator.h:64
static tesseract_common::JointState interpolate(const tesseract_common::JointState &start, const tesseract_common::JointState &end, double t)
Definition: trajectory_interpolator.cpp:145
TrajectoryInterpolator & operator=(TrajectoryInterpolator &&)=delete
TrajectoryInterpolator(TrajectoryInterpolator &&)=delete
TrajectoryInterpolator & operator=(const TrajectoryInterpolator &)=delete
void findStateIndices(const double &duration, long &before, long &after, double &blend) const
Definition: trajectory_interpolator.cpp:70
Tesseract Joint State.
Common Tesseract Macros.
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
Definition: macros.h:71
Definition: create_convex_hull.cpp:36
Definition: conversions.h:39
JointTrajectory trajectory
Definition: tesseract_common_serialization_unit.cpp:95