InterpolatedRotation.h
Go to the documentation of this file.
1 /*
2  * Copyright 2015-2019 CNRS-UM LIRMM, CNRS-AIST JRL
3  */
4 
5 #pragma once
6 
8 #include <mc_trajectory/Spline.h>
9 #include <mc_trajectory/api.h>
10 
11 #include <Eigen/Geometry>
12 #include <utility>
13 #include <vector>
14 
15 namespace mc_trajectory
16 {
17 
22 : Spline<Eigen::Matrix3d, std::vector<std::pair<double, Eigen::Matrix3d>>>
23 {
24  using waypoint_t = std::pair<double, Eigen::Matrix3d>;
25 
26 public:
36  InterpolatedRotation(double duration,
37  const Eigen::Matrix3d & start,
38  const Eigen::Matrix3d & target,
39  const std::vector<waypoint_t> & waypoints = {});
40 
41  void update() override;
42 
49  Eigen::Matrix3d eval(double t);
50 
56  void waypoint(size_t idx, const Eigen::Matrix3d & ori);
63  const waypoint_t & waypoint(size_t idx) const;
64 
65 protected:
66  std::vector<waypoint_t> all_waypoints_;
67 };
68 
69 } // namespace mc_trajectory
mc_trajectory::InterpolatedRotation
Describes a trajectory with smoothly interpolate rotation between waypoints.
Definition: InterpolatedRotation.h:21
mc_trajectory::InterpolatedRotation::waypoint_t
std::pair< double, Eigen::Matrix3d > waypoint_t
Definition: InterpolatedRotation.h:24
StateBuilder.h
mc_trajectory
Definition: BSpline.h:14
api.h
mc_trajectory::Spline
Definition: Spline.h:14
MC_TRAJECTORY_DLLAPI
#define MC_TRAJECTORY_DLLAPI
Definition: api.h:50
mc_trajectory::InterpolatedRotation::all_waypoints_
std::vector< waypoint_t > all_waypoints_
Definition: InterpolatedRotation.h:66
Spline.h