31 #include <kdl/path.hpp> 32 #include <kdl/path_line.hpp> 33 #include <kdl/rotational_interpolation.hpp> 34 #include <kdl/rotational_interpolation_sa.hpp> 35 #include <kdl/trajectory.hpp> 36 #include <kdl/trajectory_segment.hpp> 37 #include <kdl/trajectory_stationary.hpp> 38 #include <kdl/velocityprofile.hpp> 39 #include <kdl/velocityprofile_spline.hpp> 53 std::istringstream ss(data);
60 for (
int i = 0; i <
n; ++i)
62 for (
int j = 0; j < m; ++j)
109 std::ostringstream ss;
111 ss <<
data_.rows() <<
" " <<
data_.cols() <<
"\n";
118 if (!(data.cols() == 4 || data.cols() == 7 || data.cols() == 8) || data.rows() < 2)
ThrowPretty(
"Invalid trajectory data size!\nNeeds to contain 4, 7, or 8 columns and at least 2 rows.");
120 for (
int i = 0; i < data.rows() - 1; ++i)
124 double dt = data(i + 1, 0) - data(i, 0);
125 if (dt <= 0)
ThrowPretty(
"Time indices must be monotonically increasing! " << i <<
" (" << dt <<
")");
KDL::Twist GetAcceleration(double t)
KDL::Twist GetVelocity(double t)
Eigen::MatrixXd GetData()
IMETHOD bool Equal(const FrameAcc &r1, const FrameAcc &r2, double eps=epsilon)
const Eigen::Ref< const Eigen::MatrixXd > & MatrixXdRefConst
void ConstructFromData(Eigen::MatrixXdRefConst data, double radius)
KDL::Frame GetFrame(Eigen::VectorXdRefConst val)
KDL::Frame GetPosition(double t)
std::shared_ptr< KDL::Trajectory_Composite > trajectory_