15 #ifndef GEOMETRY__POLYGON__LINE_SEGMENT_
16 #define GEOMETRY__POLYGON__LINE_SEGMENT_
19 #include <geometry_msgs/msg/point.hpp>
20 #include <geometry_msgs/msg/pose.hpp>
21 #include <geometry_msgs/msg/quaternion.hpp>
22 #include <geometry_msgs/msg/vector3.hpp>
35 const geometry_msgs::msg::Point &
start_point,
const geometry_msgs::msg::Vector3 & vec,
41 auto getPoint(
const double s,
const bool denormalize_s =
false) const
42 -> geometry_msgs::msg::Point;
43 auto
getPose(const
double s, const
bool denormalize_s = false, const
bool fill_pitch = true) const
44 -> geometry_msgs::msg::Pose;
45 auto
isIntersect2D(const geometry_msgs::msg::Point & point) const ->
bool;
48 const geometry_msgs::msg::Point & point, const
bool denormalize_s = false) const
49 ->
std::optional<
double>;
51 ->
std::optional<
double>;
53 ->
std::optional<geometry_msgs::msg::Point>;
55 const geometry_msgs::msg::Pose & pose,
double threshold_distance,
bool denormalize_s) const
56 ->
std::optional<
double>;
57 auto
getVector() const -> geometry_msgs::msg::Vector3;
59 auto
get2DVector() const -> geometry_msgs::msg::Vector3;
64 const geometry_msgs::msg::Point & point, const
double s, const
bool denormalize_s = false) const
67 const geometry_msgs::msg::Point & point, const
double s, const
bool denormalize_s = false) const
68 -> geometry_msgs::msg::Vector3;
71 auto denormalize(const
std::optional<
double> & s, const
bool throw_error_on_out_of_range = true)
72 const ->
std::optional<
double>;
73 auto denormalize(const
double s) const ->
double;
77 const
std::vector<geometry_msgs::msg::Point> & points, const
bool close_start_end = false)
Definition: line_segment.hpp:30
auto get2DLength() const -> double
Definition: line_segment.cpp:285
auto getSquaredDistanceVector(const geometry_msgs::msg::Point &point, const double s, const bool denormalize_s=false) const -> geometry_msgs::msg::Vector3
Get 3D vector from specified 3D point to specified 3D point on line segment.
Definition: line_segment.cpp:318
auto getIntersection2DSValue(const geometry_msgs::msg::Point &point, const bool denormalize_s=false) const -> std::optional< double >
Find intersection point of 1 line segment and 1 point.
Definition: line_segment.cpp:170
auto getSquaredDistanceIn2D(const geometry_msgs::msg::Point &point, const double s, const bool denormalize_s=false) const -> double
Get squared distance (Square of euclidean distance) between specified 3D point and specified 3D point...
Definition: line_segment.cpp:304
auto getLength() const -> double
Definition: line_segment.cpp:290
auto getNormalVector() const -> geometry_msgs::msg::Vector3
Get normal vector of the line segment.
Definition: line_segment.cpp:267
auto getVector() const -> geometry_msgs::msg::Vector3
Definition: line_segment.cpp:252
~LineSegment()
Definition: line_segment.cpp:56
LineSegment(const geometry_msgs::msg::Point &start_point, const geometry_msgs::msg::Point &end_point)
Definition: line_segment.cpp:29
auto getIntersection2D(const LineSegment &line) const -> std::optional< geometry_msgs::msg::Point >
Find intersection point of two line segments.
Definition: line_segment.cpp:241
const geometry_msgs::msg::Point start_point
Definition: line_segment.hpp:39
auto getPose(const double s, const bool denormalize_s=false, const bool fill_pitch=true) const -> geometry_msgs::msg::Pose
Get pose on the line segment from s value. Orientation of thee return value was calculated from the v...
Definition: line_segment.cpp:99
auto isIntersect2D(const geometry_msgs::msg::Point &point) const -> bool
Checking the intersection with 1 line segment and 1 point in 2D (x,y) coordinate. Ignore z axis.
Definition: line_segment.cpp:121
auto get2DVector() const -> geometry_msgs::msg::Vector3
Definition: line_segment.cpp:277
LineSegment & operator=(const LineSegment &)
Definition: line_segment.cpp:362
auto getSValue(const geometry_msgs::msg::Pose &pose, double threshold_distance, bool denormalize_s) const -> std::optional< double >
Definition: line_segment.cpp:126
auto getSlope() const -> double
Definition: line_segment.cpp:292
auto getPoint(const double s, const bool denormalize_s=false) const -> geometry_msgs::msg::Point
Get point on the line segment from s value.
Definition: line_segment.cpp:64
const geometry_msgs::msg::Point end_point
Definition: line_segment.hpp:40
auto getLineSegments(const std::vector< geometry_msgs::msg::Point > &points, const bool close_start_end=false) -> std::vector< LineSegment >
Get the line segments from points.
Definition: line_segment.cpp:370
Definition: bounding_box.hpp:32