Autoware.Auto
autoware::tracking_test_framework::Circle Class Reference

This is the class which represents the pedestrians as circles in 2D and defines the function intersect_with_line which gives the intersection points of circle with a line. More...

#include <shapes.hpp>

Inheritance diagram for autoware::tracking_test_framework::Circle:
Collaboration diagram for autoware::tracking_test_framework::Circle:

Public Member Functions

 Circle (const Eigen::Vector2f &center, const autoware::common::types::float32_t radius)
 constructor More...
 
EigenStlVector< Eigen::Vector2f > intersect_with_line (const Line &line, const autoware::common::types::bool8_t closest_point_only) const override
 Method to get intersection points of circle and the line. More...
 
- Public Member Functions inherited from autoware::tracking_test_framework::Shape
virtual ~Shape ()=default
 Virtual destructor. More...
 

Detailed Description

This is the class which represents the pedestrians as circles in 2D and defines the function intersect_with_line which gives the intersection points of circle with a line.

Constructor & Destructor Documentation

◆ Circle()

autoware::tracking_test_framework::Circle::Circle ( const Eigen::Vector2f &  center,
const autoware::common::types::float32_t  radius 
)

constructor

Member Function Documentation

◆ intersect_with_line()

EigenStlVector< Eigen::Vector2f > autoware::tracking_test_framework::Circle::intersect_with_line ( const Line line,
const autoware::common::types::bool8_t  closest_point_only 
) const
overridevirtual

Method to get intersection points of circle and the line.

Parameters
[in]linethe Line object
[in]closest_point_onlythe boolean to determine if closest intersection to be returned or all
Returns
returns the intersection points

Given a line in the form of \((๐‘=๐‘_0+๐‘กโ‹…๐‘‘)\) , where \((๐‘)\) is a point on a line, \((๐‘_0)\) is the 2D starting point of the line, \((๐‘ก)\) is a scale parameter and \( (๐‘‘)\) is the normalized direction vector and a circle in the form of \((๐‘ฅโˆ’๐‘ฅ_c)^2+(๐‘ฆโˆ’๐‘ฆ_c) ^2 = ๐‘Ÿ^2\) , where \((๐‘ฅ,๐‘ฆ)\) are coordinates of a point on a circle, \((๐‘ฅ_c,๐‘ฆ_c)\) are the coordinates of the center of the circle and \((๐‘Ÿ)\) is the radius of this circle, we can form a single equation from which we look for such values of \((๐‘ก)\) that the resulting point lies both on the point and on the circle.

Sort the intersections with closest being the first

If invalid distance return empty vector

Implements autoware::tracking_test_framework::Shape.


The documentation for this class was generated from the following files: