Autoware.Auto
|
|
This file includes common functionality for 2D geometry, such as dot products. More...
#include <common/types.hpp>
#include <cmath>
#include <limits>
#include <stdexcept>
#include "autoware_auto_planning_msgs/msg/trajectory_point.hpp"
#include "geometry/interval.hpp"
Go to the source code of this file.
Namespaces | |
autoware | |
This file defines the lanelet2_map_provider_node class. | |
autoware::common | |
autoware::common::geometry | |
autoware::common::geometry::point_adapter | |
Temporary namespace for point adapter methods, for use with nonstandard point types. | |
autoware::common::geometry::details | |
Contains computation geometry functions not intended for the end user to directly use. | |
Functions | |
template<typename PointT > | |
auto | autoware::common::geometry::point_adapter::x_ (const PointT &pt) |
Gets the x value for a point. More... | |
auto | autoware::common::geometry::point_adapter::x_ (const autoware_auto_planning_msgs::msg::TrajectoryPoint &pt) |
Gets the x value for a TrajectoryPoint message. More... | |
template<typename PointT > | |
auto | autoware::common::geometry::point_adapter::y_ (const PointT &pt) |
Gets the y value for a point. More... | |
auto | autoware::common::geometry::point_adapter::y_ (const autoware_auto_planning_msgs::msg::TrajectoryPoint &pt) |
Gets the y value for a TrajectoryPoint message. More... | |
template<typename PointT > | |
auto | autoware::common::geometry::point_adapter::z_ (const PointT &pt) |
Gets the z value for a point. More... | |
auto | autoware::common::geometry::point_adapter::z_ (const autoware_auto_planning_msgs::msg::TrajectoryPoint &pt) |
Gets the z value for a TrajectoryPoint message. More... | |
template<typename PointT > | |
auto & | autoware::common::geometry::point_adapter::xr_ (PointT &pt) |
Gets a reference to the x value for a point. More... | |
auto & | autoware::common::geometry::point_adapter::xr_ (autoware_auto_planning_msgs::msg::TrajectoryPoint &pt) |
Gets a reference to the x value for a TrajectoryPoint. More... | |
template<typename PointT > | |
auto & | autoware::common::geometry::point_adapter::yr_ (PointT &pt) |
Gets a reference to the y value for a point. More... | |
auto & | autoware::common::geometry::point_adapter::yr_ (autoware_auto_planning_msgs::msg::TrajectoryPoint &pt) |
Gets a reference to the y value for a TrajectoryPoint. More... | |
template<typename PointT > | |
auto & | autoware::common::geometry::point_adapter::zr_ (PointT &pt) |
Gets a reference to the z value for a point. More... | |
auto & | autoware::common::geometry::point_adapter::zr_ (autoware_auto_planning_msgs::msg::TrajectoryPoint &pt) |
Gets a reference to the z value for a TrajectoryPoint. More... | |
template<typename IT > | |
IT | autoware::common::geometry::details::circular_next (const IT begin, const IT end, const IT current) noexcept |
template<typename T1 , typename T2 , typename T3 > | |
auto | autoware::common::geometry::ccw (const T1 &pt, const T2 &q, const T3 &r) |
compute whether line segment rp is counter clockwise relative to line segment qp More... | |
template<typename T1 , typename T2 > | |
auto | autoware::common::geometry::cross_2d (const T1 &pt, const T2 &q) |
compute p x q = p1 * q2 - p2 * q1 More... | |
template<typename T1 , typename T2 > | |
auto | autoware::common::geometry::dot_2d (const T1 &pt, const T2 &q) |
compute p * q = p1 * q1 + p2 * q2 More... | |
template<typename T > | |
T | autoware::common::geometry::minus_2d (const T &p, const T &q) |
Compute the 2d difference between two points, p - q. More... | |
template<typename T > | |
T | autoware::common::geometry::minus_2d (const T &p) |
The unary minus or negation operator applied to a single point's 2d fields. More... | |
template<typename T > | |
T | autoware::common::geometry::plus_2d (const T &p, const T &q) |
The 2d addition operation, p + q. More... | |
template<typename T > | |
T | autoware::common::geometry::times_2d (const T &p, const float32_t a) |
The scalar multiplication operation, p * a. More... | |
template<typename T > | |
T | autoware::common::geometry::intersection_2d (const T &pt, const T &u, const T &q, const T &v) |
solve p + t * u = q + s * v Ref: https://stackoverflow.com/questions/563198/ whats-the-most-efficent-way-to-calculate-where-two-line-segments-intersect More... | |
template<typename T > | |
void | autoware::common::geometry::rotate_2d (T &pt, const float32_t cos_th, const float32_t sin_th) |
rotate point given precomputed sin and cos More... | |
template<typename T > | |
T | autoware::common::geometry::rotate_2d (const T &pt, const float32_t th_rad) |
rotate by radian angle th in z direction with ccw positive More... | |
template<typename T > | |
T | autoware::common::geometry::get_normal (const T &pt) |
compute q s.t. p T q, or p * q = 0 This is the equivalent of a 90 degree ccw rotation More... | |
template<typename T > | |
auto | autoware::common::geometry::norm_2d (const T &pt) |
get magnitude of x and y components: More... | |
template<typename T > | |
T | autoware::common::geometry::closest_segment_point_2d (const T &p, const T &q, const T &r) |
Compute the closest point on line segment p-q to point r Based on equations from https://stackoverflow.com/a/1501725 and http://paulbourke.net/geometry/pointlineplane/. More... | |
template<typename T > | |
T | autoware::common::geometry::closest_line_point_2d (const T &p, const T &q, const T &r) |
Compute the closest point on the line going through p-q to point r. More... | |
template<typename T > | |
auto | autoware::common::geometry::point_line_segment_distance_2d (const T &p, const T &q, const T &r) |
Compute the distance from line segment p-q to point r. More... | |
template<typename T > | |
T | autoware::common::geometry::make_unit_vector2d (float th) |
Make a 2D unit vector given an angle. More... | |
template<typename OUT = float32_t, typename T1 , typename T2 > | |
OUT | autoware::common::geometry::squared_distance_2d (const T1 &a, const T2 &b) |
Compute squared euclidean distance between two points. More... | |
template<typename OUT = float32_t, typename T1 , typename T2 > | |
OUT | autoware::common::geometry::distance_2d (const T1 &a, const T2 &b) |
Compute euclidean distance between two points. More... | |
template<typename T > | |
auto | autoware::common::geometry::check_point_position_to_line_2d (const T &p1, const T &p2, const T &q) |
Check the given point's position relative the infinite line passing from p1 to p2. Logic based on http://geomalgorithms.com/a01-_area.html#isLeft() More... | |
template<typename IT > | |
bool | autoware::common::geometry::all_ordered (const IT begin, const IT end) noexcept |
template<typename IT > | |
auto | autoware::common::geometry::area_2d (const IT begin, const IT end) noexcept |
template<typename IT > | |
auto | autoware::common::geometry::area_checked_2d (const IT begin, const IT end) |
template<typename IteratorType , typename PointType > | |
bool | autoware::common::geometry::is_point_inside_polygon_2d (const IteratorType &start_it, const IteratorType &end_it, const PointType &p) |
Check if the given point is inside or on the edge of the given polygon. More... | |
This file includes common functionality for 2D geometry, such as dot products.