|
Autoware.Auto
|
|
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>
Public Member Functions | |
| Circle (const Eigen::Vector2f ¢er, 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... | |
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.
| autoware::tracking_test_framework::Circle::Circle | ( | const Eigen::Vector2f & | center, |
| const autoware::common::types::float32_t | radius | ||
| ) |
constructor
|
overridevirtual |
Method to get intersection points of circle and the line.
| [in] | line | the Line object |
| [in] | closest_point_only | the boolean to determine if closest intersection to be returned or all |
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.