36 #define BOOST_PARAMETER_MAX_ARITY 7
38 #include <jsk_topic_tools/log_utils.h>
43 PolyLine::PolyLine(
const std::vector < Eigen::Vector3f > &points) :
Line(points[points.size()-1] - points[0], points[0])
45 int n = points.size();
47 for (
int i = 0;
i < n-1;
i++) {
59 Eigen::Vector3f& foot_point,
60 double& distance_to_goal,
62 double& foot_alpha)
const
64 double min_len = DBL_MAX;
65 Eigen::Vector3f
point;
66 double from_start_to_foot = 0;
67 double distance_from_start = 0;
76 foot_alpha = (
segments[
i]->length() - to_goal);
77 from_start_to_foot = distance_from_start + foot_alpha;
79 distance_from_start +=
segments[
i]->length();
81 distance_to_goal = distance_from_start - from_start_to_foot;
94 Eigen::Vector3f& foot_point)
const
103 segments[index]->getDirection(output);
114 double distance_from_start = 0;
116 distance_from_start +=
segments[
i]->length();
118 return distance_from_start;
129 marker.type = visualization_msgs::Marker::LINE_STRIP;
131 marker.scale.x = 0.02;
132 marker.color.a = 1.0;
133 marker.color.r = 0.0;
134 marker.color.g = 1.0;
135 marker.color.b = 1.0;
137 marker.pose.position.x = 0;
138 marker.pose.position.y = 0;
139 marker.pose.position.z = 0;
140 marker.pose.orientation.x = 0;
141 marker.pose.orientation.y = 0;
142 marker.pose.orientation.z = 0;
143 marker.pose.orientation.w = 1;
145 marker.points.resize(0);
149 geometry_msgs::Point pt;
153 marker.points.push_back(pt);
158 geometry_msgs::Point pt;
162 marker.points.push_back(pt);
170 os <<
", " << pl.
origin_[2] <<
"]";
175 os <<
" -- [" <<
p[0];
177 os <<
", " <<
p[2] <<
"]";