12 #include <eigen3/Eigen/Dense> 39 const std::vector<Eigen::Vector3f> &positions,
40 const std::vector<Eigen::Vector3f> &orientations,
51 const std::vector<Eigen::Vector3f> &positions,
52 const std::vector<Eigen::Vector3f> &orientations
75 Eigen::Vector3f &position,
76 Eigen::Vector3f &orientation,
84 std::vector<Eigen::Vector3f>
p_;
85 std::vector<Eigen::Vector3f>
o_;
86 std::vector< std::vector<Eigen::Vector3f> >
a_;
129 const std::vector<double> &s,
130 std::vector<double> &dsdt,
float last_t_
Time instant of the last evaluated point.
float compute_abscissa(float t)
Computes the curvilinear abscissa corresponding to a time instant.
void compute_parameters()
Computes the spline parameters.
float speed_
Constant speed to adopt on the path.
std::vector< Eigen::Vector3f > o_
Corresponding orientations.
void evaluate(float t, Eigen::Vector3f &position, Eigen::Vector3f &orientation, bool &last_reached)
Evaluates the spline at a specific time instant (assuming constant speed)
std::vector< Eigen::Vector3f > p_
Positions to interpolate.
Eigen::Vector3f compute_orientation(float s)
Computes the orientation at a specific curvilinear abscissa.
void set_poses(const std::vector< Eigen::Vector3f > &positions, const std::vector< Eigen::Vector3f > &orientations)
Sets the poses to interpolate.
int n_
Number of poses to interpolate.
std::vector< std::vector< Eigen::Vector3f > > a_
Spline parameters for each segment (ie between each pose)
float last_s_
Curvilinear abscissa of the last evaluated point.
void deriv_abscissa(const std::vector< double > &s, std::vector< double > &dsdt, const double t)
Computes the derivative of the curvilinear abscissa wrt time.
void set_speed(float speed)
Set the desired speed on the path.
bool prepared_
Whether the class is ready for interpolation.
Eigen::Vector3f evaluate_position(float s)
Evaluates the spline at a specific curvilinear abscissa.
Spline()
Default constructor.
void prepare()
Prepares the class for interpolation.
Class for spline interpolation.