38#include <kdl/path.hpp>
39#include <kdl/path_roundedcomposite.hpp>
40#include <kdl/rotational_interpolation_sa.hpp>
41#include <kdl/utilities/error.h>
51class PathPolylineGenerator
59 const std::vector<KDL::Frame>& waypoints,
60 KDL::RotationalInterpolation* rot_interpo,
double smoothness,
69 static std::vector<KDL::Frame>
filterWaypoints(
const KDL::Frame& start_pose,
const std::vector<KDL::Frame>& waypoints);
70 static double computeBlendRadius(
const std::vector<KDL::Frame>& waypoints_,
double smoothness);
74 PathPolylineGenerator(){};
76 static constexpr double MIN_SEGMENT_LENGTH{ 0.2e-3 };
77 static constexpr double MIN_SMOOTHNESS{ 0.01 };
78 static constexpr double MAX_SMOOTHNESS{ 0.99 };
79 static constexpr double MIN_COLINEAR_NORM{ 1e-9 };
87 return "Three collinear consecutive waypoints."
88 " A Polyline Path cannot be created.";
92 return ERROR_CODE_COLINEAR_CONSECUTIVE_WAYPOINTS;
96 static constexpr int ERROR_CODE_COLINEAR_CONSECUTIVE_WAYPOINTS{ 3104 };
int GetType() const override
const char * Description() const override
static std::vector< KDL::Frame > filterWaypoints(const KDL::Frame &start_pose, const std::vector< KDL::Frame > &waypoints)
compute the maximum rounding radius from KDL::Path_RoundedComosite
static std::unique_ptr< KDL::Path > polylineFromWaypoints(const KDL::Frame &start_pose, const std::vector< KDL::Frame > &waypoints, KDL::RotationalInterpolation *rot_interpo, double smoothness, double eqradius)
set the path polyline from waypoints
static double computeBlendRadius(const std::vector< KDL::Frame > &waypoints_, double smoothness)
static void checkConsecutiveColinearWaypoints(const KDL::Frame &p1, const KDL::Frame &p2, const KDL::Frame &p3)