18 #ifndef FETCH_AUTO_DOCK_ICP_2D_H 19 #define FETCH_AUTO_DOCK_ICP_2D_H 21 #include <geometry_msgs/Point.h> 22 #include <geometry_msgs/Transform.h> 46 std::vector<geometry_msgs::Point>
47 transform(
const std::vector<geometry_msgs::Point>& points,
57 getCentroid(
const std::vector<geometry_msgs::Point> points);
67 bool alignPCA(
const std::vector<geometry_msgs::Point> source,
68 const std::vector<geometry_msgs::Point> target,
69 geometry_msgs::Transform & transform);
79 bool alignSVD(
const std::vector<geometry_msgs::Point> source,
80 const std::vector<geometry_msgs::Point> target,
81 geometry_msgs::Transform & transform);
91 double alignICP(
const std::vector<geometry_msgs::Point> source,
92 const std::vector<geometry_msgs::Point> target,
93 geometry_msgs::Transform & transform,
94 size_t max_iterations = 10,
95 double min_delta_rmsd = 0.000001);
99 #endif // FETCH_AUTO_DOCK_ICP_2D_H std::vector< geometry_msgs::Point > transform(const std::vector< geometry_msgs::Point > &points, double x, double y, double theta)
Transform a vector of points in 2d.
double alignICP(const std::vector< geometry_msgs::Point > source, const std::vector< geometry_msgs::Point > target, geometry_msgs::Transform &transform, size_t max_iterations=10, double min_delta_rmsd=0.000001)
Perform Iterative Closest Point (ICP) algorithm to align two point clouds in a two dimensional plane...
double thetaFromQuaternion(const geometry_msgs::Quaternion &q)
Get the 2d rotation from a quaternion.
geometry_msgs::Point getCentroid(const std::vector< geometry_msgs::Point > points)
Get the centroid of a set of points.
bool alignSVD(const std::vector< geometry_msgs::Point > source, const std::vector< geometry_msgs::Point > target, geometry_msgs::Transform &transform)
Perform SVD optimization to align two point clouds in a two dimensional plane.
bool alignPCA(const std::vector< geometry_msgs::Point > source, const std::vector< geometry_msgs::Point > target, geometry_msgs::Transform &transform)
Perform PCA algorithm to align two point clouds in a two dimensional plane.