36 #ifndef JSK_RECOGNITION_UTILS_GEO_POLYLINE_H_ 37 #define JSK_RECOGNITION_UTILS_GEO_POLYLINE_H_ 39 #include <Eigen/Geometry> 40 #include <boost/shared_ptr.hpp> 43 #include "visualization_msgs/Marker.h" 61 PolyLine(
const std::vector < Eigen::Vector3f > &points);
76 Eigen::Vector3f& foot_point)
const;
84 Eigen::Vector3f& foot_point,
85 double& distance_to_goal,
87 double& foot_alpha)
const;
95 virtual void getDirection(
int index, Eigen::Vector3f& output)
const;
102 virtual double length()
const;
114 void toMarker(visualization_msgs::Marker& marker)
const;
friend std::ostream & operator<<(std::ostream &os, const PolyLine &pl)
virtual double distanceWithInfo(const Eigen::Vector3f &from, Eigen::Vector3f &foot_point, double &distance_to_goal, int &foot_index, double &foot_alpha) const
compute a distance to a point, get various information
std::vector< Segment::Ptr > segments
virtual PolyLine::Ptr flipPolyLine() const
void toMarker(visualization_msgs::Marker &marker) const
PolyLine(const std::vector< Eigen::Vector3f > &points)
Construct a polyline from points. The polyline consists of lines which starts with p[i] and ends with...
virtual void point(double alpha, Eigen::Vector3f &ouptut)
Compute a point on normal from alpha parameter.
Class to represent 3-D polyline (not closed).
virtual double length() const
get total length of the polyline
virtual Segment::Ptr at(int index) const
virtual double distance(const Eigen::Vector3f &point, Eigen::Vector3f &foot_point) const
compute a distance to a point
virtual Eigen::Vector3f getDirection() const
get normalized direction vector of the line.
Class to represent 3-D straight line.
boost::shared_ptr< PolyLine > Ptr